faqts : Computers : Internet : Browser : Mozilla

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 19 people (47%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

When I am using 'this.form.submit()' java script in firefox, with body{ background-image:url();}
When I am using 'this.form.submit()' java script in firefox, with body{ background-image:url();}
When I am using 'this.form.submit()' java script in firefox, with body{ background-image:url();}

Jan 18th, 2006 22:45
Prasanth Jose,


When I am using the code below it doesnt work with FireFox properly. But
with IE its fine.
Here in the  code, I have used onchange='this.form.submit()' for SELECT
element.
Once the user selects one of the option values the corresponding value
details will be displayed
in the text box below(name="some_name").
In FireFox, when I select the option button for the first time it works,
then
the values go blank.(No problem with IE).
I tried elimination method to identify the error, where I found that,
in the css used for the body {background-image:url();},
if the url part is not empty it does work, in firefox.
But if empty it doesn't work with FireFoX,but IE no problem..
Can any body help me out in this.
<style>
body  {
   background-image:url();
 }
 .........
 ......
 ....
 ...
 ..
 .
 .
 .
 .
 </style>
<body>
<!-- some code above-->
 <fieldset>
	<legend> Some Heading </legend>
        <SELECT  size="1" name="some_name" onchange='this.form.submit()'>
	<?php
		print "<option ";
		if ($some_variable == '')
		{
			print " selected ";
		}
		print "value =\"\"></option>";
		while(list($colval1,$colval2)= mysql_fetch_row($resultset))  
		{
			print "<OPTION ";
			if ($some_variable == $some_variable)
			{
				print " selected ";
			}
			print "value=\"some_value\"> $colval2 </OPTION>";
		}
	?>
	</SELECT><br>
	Address :
	<input type=text readonly name="some_name"   value="<?php  print
some_value; ?>"><br>
</fieldset>
<!-- some code below -->
</body>