Forum Moderators: open

Message Too Old, No Replies

XHTML <form >

name attribute is replaced with id

         

bumpaw

8:19 pm on May 16, 2004 (gmt 0)

10+ Year Member



In xhtml 1.0 strict the form name attribute is gone and id is in. The problem is that the Javascript that is associated with the form doesn't seem to like just changing to

<form id="jnl2_sign_form" action="">

I know nothing of Javascript but believe the key to lie here:

document.jnl2_sign_form.post

BlobFisk

8:26 pm on May 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi bumpaw,

What about:

document.getElementById('jnl2_sign_form').submit();

Accessing the ID should allow you to manipulate the form?

bumpaw

9:34 pm on May 16, 2004 (gmt 0)

10+ Year Member



Hey BlobFisk,
Very good! It works fine. I'm trying to validate a site that has several scripts so this problem will come up again for sure. I wonder if there is a reference site for Java the equivalent to www.php.net

Thanks,

BlobFisk

11:03 pm on May 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[java.sun.com...] would be the equivalent Java site.... But don't forget that Java is very different to JavaScript! Java is a programming language - JavaScript is a client side scriping language...

HTH

bumpaw

3:09 pm on May 17, 2004 (gmt 0)

10+ Year Member



But don't forget that Java is very different to JavaScript!

I don't forget but have a bad habit of typing Java when I mean JavaScript. I think this tutorial at w3c looks like a place for me to start. [w3schools.com...] I see also that there is a Forum here on the subject.

BlobFisk

3:27 pm on May 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are a number of excellent (*cough*) jumpstart tutorials in the JavaScript Forum Library [webmasterworld.com] that are also worth a look. A lot of common uses of JavaScript are outlined there.

HTH