Hi,
I need some help here.. I would like to pass parameters from 1 js file to another js file. My code works with IE browser unfortunately not in Firefox, why is that?
Below are the sample codes:
sample1.js
[CODE=javascript]document.writel n('<input name="test" type="text" value="0" class="textfiel d" size="3"\/>');
document.write( '<input name="Submit" type="image" src="'+img_path +'images\/btn_searchnow.g if" onClick="javasc ript:alert1(tes t.value);">');
[/CODE]sample2.js
[CODE=javascript]function sample(x){
alert(x);
}
[/CODE]
I have tried to enclosed the textbox to a form and pass form.test instead of test it works with mozilla but not in IE...
Thanks in advance...=)
I need some help here.. I would like to pass parameters from 1 js file to another js file. My code works with IE browser unfortunately not in Firefox, why is that?
Below are the sample codes:
sample1.js
[CODE=javascript]document.writel n('<input name="test" type="text" value="0" class="textfiel d" size="3"\/>');
document.write( '<input name="Submit" type="image" src="'+img_path +'images\/btn_searchnow.g if" onClick="javasc ript:alert1(tes t.value);">');
[/CODE]sample2.js
[CODE=javascript]function sample(x){
alert(x);
}
[/CODE]
I have tried to enclosed the textbox to a form and pass form.test instead of test it works with mozilla but not in IE...
Thanks in advance...=)
Comment