| | |
getting values of non-standard attributes
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Mar 2007
Posts: 29
Reputation:
Solved Threads: 1
Is it possible to get the value of a non-standard attribute in firefox?
I am trying to capture the value of attribute required. In IE I am able to get the value using document.form.required but in firefox it just returns undefined.
Thanks in advance.
I am trying to capture the value of attribute required. In IE I am able to get the value using document.form.required but in firefox it just returns undefined.
html Syntax (Toggle Plain Text)
<html> <head><title></title></head> <body> <form id="form" name="form"> <input type="text" name="txt" id="txt" value="val" required="1" /> </form> </body> </html>
Thanks in advance.
Last edited by blufab; Nov 20th, 2008 at 12:53 pm.
•
•
•
•
Is it possible to get the value of a non-standard attribute in firefox?
I am trying to capture the value of attribute required. In IE I am able to get the value using document.form.required but in firefox it just returns undefined.
html Syntax (Toggle Plain Text)
<html> <head><title></title></head> <body> <form id="form" name="form"> <input type="text" name="txt" id="txt" value="val" required="1" /> </form> </body> </html>
Thanks in advance.
Try this:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
document.getElementById('txt').attributes['required'].value;
Regards...
IF SOMEONE FEELS THAT THEY HAD NEVER MADE A MISTAKE IN THEIR LIFE, THEN IT MEANS THEY HAD NEVER TRIED A NEW THING IN THEIR LIFE
![]() |
Similar Threads
- C serial com port terminal program (C)
- Setting up a form in PHP (PHP)
- Linker Error (C++)
- modify script (Perl)
- Source Code that don't work? (Java)
- Urgent Help Needed!!!! Plzzz (Java)
- Java practice questions (Java)
- Dynamically modifying the CSS attributes through Javascript (JavaScript / DHTML / AJAX)
- Backp/Restore HardDisk Image (C++)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Search data Using ajax without press search button??
- Next Thread: Converting document.writeln output to textarea box
Views: 884 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxcode ajaxhelp animate api automatically beta box browser bug button calendar captchaformproblem card checkbox child class close cookies createrange() cursor dependent disablefirebug dom dropdown editor element engine events explorer ext file firehose flash form forms game google gwt gxt highlightedword html htmlform ie8 iframe image() images internet java javascript jawascriptruntimeerror jquery jsf jsfile jump margin math matrixcaptcha microsoft mimic mp3 mysql object offline onmouseoutdivproblem onreadystatechange parent passing pdf php player post progressbar rated regex runtime scroll search session shopping size solutions sql star stars stretch synchronous text textarea twitter validation web website window windowofwords windowsxp wysiwyg xml xspf \n





