Please have a look at the page here. Below is a screenshot where the problem lies:
lets see some code! what do you mean "hover"-what does hover have to do with anything? surely you're not using onhover for user input of a button...
it shouldn't be more complicated than
<input type=button onclick(window.location.href = new location) /> for each button set to different "new locations"
sorry, it's not my problem Sgt but what do you mean label? are you talking about "name=" or a div ID?
Why would either of those attributes changed the functionality of onclick()?
This is his page source in Firebug
<label class="formFieldQuestion"><h3>I would like to <input type="button" onclick="document.location = 'http://audiquattrofinal.tigersportsmarketing.com/attending/index.html';" value="Confirm"> / <input type="button" onclick="document.location = 'thankyou.html';" value="Regret"> my participation in the Audi quattro Cup 2011 - India Finals</h3></label>
His HTML is wrapped by a label element which by default gets event handlers set by the browser and anything inside it gets rendered useless unless you absolutely position it on the page.
Thanks a ton I removed the label class and its working fine now! I was going mad trying to figure out what went wrong
Actually yes the hover has nothing to do with it. But I noticed that when you hover the mouse on a button there is a light blue highlight on it. Now when I was hovering the mouse on the "Regret" button it was highlighting both the buttons instead of one. Now its been resolved and only the relevant button is being highlighted on hover. Phew
No problem, the most simple issues will and can give you a bigger headache then then want.
PS: I am loving Sitepoint I'll be more regular here! Seeing great guys who really know their stuff!!
oooh that label... bahaha i didn't even know there was label tag in html. :lol:
I didn't know there was source included but I suppose searching for his words in the screenshot would of made it easy to find
spiritualghost - get firebug!! after developing in pre-dynamic html, firebug-like plugins or programs are a god send!
Thanks for the tip. I'll get it.
I'm a front end web developer by trade so i have to know these things
There wasn't, he included a link within his post which allowed me to see the source.
I second this, Firebug is the most powerful web development tool for Firefox and i haven't looked back on any other since.