|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Javascript clock and XHTML strict problem
I have put a clock on my XHTML strict webpage. It is inside a form which is called 'clockform'
The problem is that the javascript clock will only work when I use the code: Code:
<form name="clockform> But that is not XHTML strict valid, when I use the XHTML Strict valid code: Code:
<form id="clockform> the clock won't work because it does not 'see' a 'name' element in the code. HOw do I get the javascript to look for the 'id' element? |
|
#2
|
||||
|
||||
|
You can use document.getElementById('clockform') to get an object that represents your form based on ID.
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter! DevArticles Forum Moderator "The net is a waste of time, and that's exactly what's right about it." -- William Gibson |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Javascript clock and XHTML strict problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|