Good Morning All...

I am really baffled with what I am getting from a form input using an image...

Here is the form...

Basically it is a single form with 4 separate input images, each reloading the same page, but changing the value of the variable 'name'.

<form name="display" action="<?php echo $_SERVER['PHP_SELF'];?>">
<INPUT TYPE="image" name="page" value="Prep Zone" SRC="images/PrepZoneButton.png" HEIGHT="67" WIDTH="155" BORDER="0" ALT="Prep Zone">
<INPUT TYPE="image" name="page" value="Ramp Zone" SRC="images/RampZoneButton.png" HEIGHT="67" WIDTH="155" BORDER="0" ALT="Ramp Zone">
<INPUT TYPE="image" name="page" value="Light Zone" SRC="images/LightZoneButton.png" HEIGHT="67" WIDTH="155" BORDER="0" ALT="Light Zone">
<INPUT TYPE="image" name="page" value="Quantum Zone" SRC="images/QuantumZoneButton.png" HEIGHT="67" WIDTH="155" BORDER="0" ALT="Quantum Zone">
 </form>

Upon reloading the page, the script determines which value is present, and shows the corresponding page display.

if ($page=='Prep Zone'){
  $image='<img src="images/PrepZoneChartbanner.png" width="702" height="56">';
  $pref='Prep';
}elseif($page=='Ramp Zone'){
  $image='<img src="images/RampZoneChartbanner.png" width="702" height="56">';
  $pref='Ramp';
}elseif($page=='Light Zone'){
  $image='<img src="images/LightZoneChartbanner.png" width="702" height="56">';
  $pref='Light';
}elseif($page=='Quantum Zone'){
  $image='<img src="images/QuantumZoneChartBanner.png" width="702" height="56">';
  $pref='Quantum';
}else{
  $image='';
}

It works fine in firefox, although I notice something strange in the resulting URL

/zone_display.php?page.x=62&page.y=42&page=Ramp+Zone

That is everything past the domain name.
What I am confused with is the page.x=62&page.y=42& part.

I have no idea where that came from or what it represents... the page should be equal to 'Ramp+Zone'

And now I tested it on IE, and it shows /zone_display.php?page.x=50&page.y=41 in the url without the 'Ramp+Zone' part, so consequently it doesn't display the page at all that it is supposed to.

Any suggestions?

First on the apparent coodinates and second on why IE views it differently (like that is something new... LOL)

Thanks in advance.

Recommended Answers

All 6 Replies

Member Avatar for diafol

Get rid of the spaces in the values.

Thanks ardav for your reply, but it didn't have any effect. I took out the spaces and it still displays what appears to be coordinates in the url and still doesn't show any of the linked data when click on in IE...

I cut this out and am sending it to you in a private message..

decided it might be better that way.

Thanks in advance for your time...

Douglas

Member Avatar for diafol

Read my signature:

> Don't PM me unless I've upset you, in which case I won't reply to you anyway.

Everything on the thread. I'm not an expert, so advice coming from everybody will be to your advantage. Also, I will learn from the advice of others.

Post it here.

OK ardav,

I decided not to post the url on the forum because I don't think it is a good idea to open up a half done website to the masses.

Thanks anyway. I'm sure I will find the resolution to the issue.

Douglas

Member Avatar for diafol

You sure? You can always put up a test site as a subdomain and put UNDER CONSTRUCTION or TEST SITE on it. Nobody would give a fig. Well, just put a noindex on it so that Google etc don't start including it in their roundups. Well, after the Farmer debacle, they probably won't anyway.

Seriously, we're here to help. I've got about 10 websites in mid-production and I keep them all on remote (subdomain/non-indexed) and local servers.

ardav,

I got it resolved.

Just FYI... The coordinates were actually the placement of the cursor when I clicked on the link. Why, I still don't know, but that made sense, since they were never exactly the same.

The resolution to the basic issue was to not use a form to display the buttons.
Simply by changing to straight graphics with links and passing the desired variable value in the link took care of everything, including working in the IE environment.

Honestly, in retrospect, I don't really know why I was using a form in the first place. As someone pointed out to me, I was using the Wrong Tool for the job.

Thanks for your feedback and support.

Douglas

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.