Click to See Complete Forum and Search --> : Netui tag problem in Firefox
ptanmoy
August 22nd, 2006, 05:46 AM
I am facing javascript problem when am using netui tags in weblogic 8.1 with Firefox.
My script is like shown below:
function callSubmit(){
var strName = document[getNetuiTagName('SubmitForm')][getNetuiTagName('name')].value;
alert(strName);
}
The above code runs perfectly in IE but not in Firefox. This gives a javascript error!!
Can anybody help??
PeejAvery
August 24th, 2006, 01:58 PM
The above code runs perfectly in IE but not in Firefox. This gives a javascript error!!
Can anybody help??
What is the error that it gives and on what is the coding of the line error?
ptanmoy
September 2nd, 2006, 01:37 AM
I have found out the solution finally...
rather than scripting it like:
document[getNetuiTagName('submitForm')][getNetuiTagName('name')].value;
use:
document.forms[0][getNetuiTagName('name')].value;
This works both in IE and Firefox...as well as in Netscape.
PeejAvery
September 2nd, 2006, 06:51 AM
Yes, that will work, but it might cause warnings in Firefox.
The proper way is to give an ID to tags.
<input type="text" id="screenname" value="peejavery">
<script language="JavaScript">
alert(document.getElementById('screenname').value);
</script>
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.