OZONE Asylum
Forums
DHTML/Javascript
Error: document.form has no properties
This page's ID:
27669
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Hi, I read this post, tried things but still am not able to fix the problem in my code. I have a form nested in another form, which is in turn into a div. Now I am trying to submit this form. I have been successful in accessing the test fields into that form, an changing them. But when I try to submit the form, it gives me error. When I try document.getElementById['myForm'].submit(); it gives me this error: document.getElementById.myForm has no properties document.forms['myForm'].submit(); it gives me this error: document.forms.myForm has no properties Any help would be highly appreciated. This is my javascript: <script type="text/javascript"> function launch() { var frm = document.getElementById("myForm"); var srcTxt = document.getElementById("dirName"); var dstTxt = document.getElementById("name"); dstTxt.value = '/xml' + '/' + srcTxt.value; alert(frm); // Gives null document.forms['myForm'].submit(); } </script> I an calling launch() on onclick() event of a button in the form. Thanks, ankit
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »