I find the html/php option simpler and more "accessible". I've got it
working now. I only needed to use unique input names and test for the
posted variable according to w3c standards.
Here is the relevant w3c definition:
"When a pointing device is used to click on the image, the form is
submitted and the click coordinates passed to the server. The x value
is measured in pixels from the left of the image, and the y value in
pixels from the top of the image. The submitted data includes name.x=x-
value and name.y=y-value where "name" is the value of the name
attribute, and x-value and y-value are the x and y coordinate values,
respectively."
PHP modifies the posted variable name to name_x, name_y to comply with
PHP's variable naming convention requirements.
Thanks to those all responded for pointing me in the right direction.
On Jan 1, 2009, at 11:25 AM, Phpster wrote:
What about using the onclick to set a js variable to be sent to the
server? That should be more cross server compliant.
Bastien
Sent from my iPod
On Dec 31, 2008, at 8:37 PM, "L. Herbert"
<lherbert@xxxxxxxxxxxxxxxx> wrote:
Bastien,
Thanks for your response. The curious thing is that the value is
passed when using FF, but not passed when using IE.
Here is the relevant form html:
<div id="switch-theme">
<form action="" method="post">
<label>Flip It!</label>
<input name="style" type="image" src="images/
switch-button-grey.gif" title="Default Theme" id="style1"
value="default" />
<input name="style" type="image" src="himages/
switch-button-default.gif" title="Alternate Theme" id="style2"
value="alternate" />
</form>
</div>
The action attribute is left blank so the form posts to the current
page. The theme switcher script is at the top of each page and
intercepts the posted variables.
Any thoughts?
On Dec 31, 2008, at 11:02 AM, Phpster wrote:
Try checking to see if the value was passed with var_dump($_REQUEST)
Also try (!empty($_REQUEST['style']))
Bastien
Sent from my iPod
On Dec 31, 2008, at 10:24 AM, "L. Herbert" <lherbert@xxxxxxxxxxxxxxxx
> wrote:
Hello all,
Anyone have insight to share on the following issue:
I have a simple theme switcher script that functions as expected
in FF, Safari, etc. but does not work in IE 6 or 7. It appears
that the posted form variables are not detected in IE. I am
using the following check within the script:
if(isset($_REQUEST['style'])) {
$style = $_REQUEST['style'];
}
Thanks in advance for your assistance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php