| | |
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
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxhelp ajaxjspservlets animate array automatically beta box browser captchaformproblem cart child close codes column css date debugger decimal dependent design disablefirebug dom download element embed engine enter error events ext file firefox focus form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe index java javascript javascripthelp2020 jawascriptruntimeerror jquery jsp jump libcurl listbox maps masterpage math media menu microsoft mimic mp4 onmouseoutdivproblem onmouseover onreadystatechange paypal pdf php player position post problem programming prototype redirect safari scale scriptlets scroll search security select software sql toggle unicode variables w3c web website window windowofwords \n





