[SOLVED]clickable input field for IE possible?[YES]

Post non-phpwcms related topics here - but I don't want to see "hey check this or that other cms". Post if you have a point or worthwhile comment, don't post just to increase you post count!
Post Reply
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

[SOLVED]clickable input field for IE possible?[YES]

Post by update »

Imagine the following:

Code: Select all

<a href="index.php?shop"><input type="button" name="shop_link" value="weiter einkaufen" class="goonshopping" /></a>
Since this is within a form I cannot set up a new form tag. It is working in Safari, Opera, Firefox, but -guess- not in IE6, IE7
I thought about some conditional comments, but it isn't really appealing either. How can it be achieved to have the field to behave in IE the same way as in the other browsers? Some js perhaps - how would it look like then...?
Ideas are really welcome :wink:
Last edited by update on Sat 16. Feb 2008, 22:03, edited 1 time in total.
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: clickable input field for IE possible?

Post by juergen »

Sorry for newby question ... but what is the form action defined as ? And why an input field wrapped in a link ?
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: clickable input field for IE possible?

Post by update »

Sorry for newby question ...
:lol:
I wanted the same look and feel as the other buttons "recalc cart" and "checkout"
Since I don't define the button as a submitting one it shouldn't trigger the form action (me thinking ;) )
But in IE it isn't triggering anything at all!

Well, this should work:

Code: Select all

<input type="button" name="shop_link" value="weiter einkaufen" class="goonshopping" onClick="window.open('shop.phtml', '_self');" />
Testing :wink: Seems to work for all of them now...
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: clickable input field for IE possible?

Post by update »

OK, this is working:

Code: Select all

		<input type="button" name="cart_link" value="Warenkorb korrigieren" class="inputcorrect" onClick="window.open('{CART_LINK}', '_self');" />
		<input type="button" name="shop_link" value="weiter einkaufen" class="goonshopping" onClick="window.open('{SHOP_LINK}', '_self');" />
It is working from within any form with any action and is working outside of a form
AND it is working in FF, Opera, Safari, IE 6+7
AND this is cool :lol:
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Post Reply