onClick Checkbox not working in Opera 7.02

openmind's picture

He has: 945 posts

Joined: Aug 2001

I have an onClick function attached to a checkbox that works fine in IE but not in Opear 7.02. My code looks thus:

<input type="checkbox" name="fave" value="#prodID#" onclick="window.location.href('#base#mystore.cfm?action=addToFave&prodID=#prodID#')">&nbsp;tick this box to add to your favourites'

You can see the page here . I know there's a couple of other cross browser issues but this one has me foxed...

Any ideas?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Phil, it doesn't work in Safari either. I think that essentially that should be a form that is submitted and it's not submitting? Is there any way to not make it a JavaScript function but just a real form?

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Try window.location.href=blah instead of window.location.href(blah). If it still fails, you could default to window.location=blah. Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.