[thelist] input type="image" vs. input type="button"
Peter Brunone (EasyListBox.com)
peter at easylistbox.com
Wed Aug 23 12:29:27 CDT 2006
I kind of figured you were in "out the door" mode, which was why I threw in my very best slapdash solution (not to mention I was in a hurry myself).
However, after getting my wrist slapped (head stomped, crotch kicked, etc) I figured I should apologize and suggest something a bit more universal.
If you stay with your input type=image, you can submit the form and then pick up the form values and redirect to an appropriate page. I haven't done any PHP in years (and then it was just a day's work retrieving a table from Access), but with a bit of googling, I came up with this:
1) Retrieve the value of the select element (assuming "pagename" was the name of the dropdown list):
$pagename = $_POST["pagename"];
2) Redirect based on that value. I didn't find a whole lot on this subject, which makes me wonder what PHP has to offer. The choices seem to be as follows:
a) Use a php header. I'm not sure how dynamic this is, and it seems to be more geared toward permanently moved pages.
b) Write out a META tag using echo.
c) Use a custom redirect function, like the one at http://www.edoceo.com/creo/php-redirect.php . This seems like a crazy amount of code to do an HTTP redirect, so maybe there's something I'm missing.
Hopefully that helps a little bit...
Peter
From: jono at charlestonwebsolutions.com
>No, just simply and utterly no. You just cannot rely on JavaScript
>being available and an image without a link around it wouldn't even be
>keyboard accessible.
>
>It is really not that hard to make JavaScript enhanced forms, but it
>is really impossible to get any sense of accessibility into framework
>or IDE providers when we keep offering quick shot solutions like this
>one.
If anyone has a better solutions - PHP based would be great - that is
accessible, and better constructed than what I am working with; I would
love to check it out.
My original post example was an in-a-pinch-gotta-get-it-done approach. I
am all for ditching my first attempt for something more accessible. It
is going to become a significant part of a website soon, so it will be
very beneficial to make it top notch before hand.
I want to be able to use a custome image for the button, and a
select/drop-down box; other than that I'm all ears.
Thanks!
--
Jono Young
Designer | Developer | Illustrator
Charleston Web Solutions
Bringing Higher Standards to the Lowcountry
http://www.charlestonwebsolutions.com
More information about the thelist
mailing list