Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php problem in IE but not in other browers? 1

Status
Not open for further replies.

pushyr

Programmer
Jul 2, 2007
159
GB
hi, can you take a look at my site and advise why its not working in internet explorer but works using other browser?


here's the problem...

1) click on a car image (either fun, performance or executive)
2) drop down menu then appears
3) click select to choose a car brand

in IE the submit button (select) doesn't work, but it works using all other browsers. i'm scratching my head with this one???
 
Hi

Look at the HTTP headers and you will see. The [tt]value[/tt] attribute is quite useless for [tt]input[/tt]s of [tt]type[/tt] [tt]image[/tt], so Explorer does not send its value to the server. And probably your PHP script heavily relies on it.

Feherke.
 
hi feherke, can you elaborate a little more. i'm not sure what part of the page you mean regarding the headers.

so does that mean i can't use image buttons with value attributes, or if i correct the header would i then be able to use it?

 
Hi

Did you looked at the HTTP headers ? They explain all. Use add-ons for that
[ul]
[li]FireFox - Live HTTP Headers[/li]
[li]Explorer - ieHTTPheaders[/li]
[/ul]
As a correction you can add that field as [tt]hidden[/tt] and remove the [tt]name[/tt] of the [tt]image[/tt].
Code:
<form action="index.php" method="post">
<select name="item_brand" class="textboxborder">
<option value="Porsche 997">Porsche 997</option>
<option value="BMW">BMW</option>
<option value="Lamborghini">Lamborghini</option>
<option value="Ferrari">Ferrari</option>
</select>
<input type="submit" class="textboxborder"/>
[red]<input type="hidden" name="submit_item_brand" value="search"/>[/red]
</form>
Not that I also corrected you markup errors. I suggest to continue and correct them all.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top