spiritualghost — 2011-07-01T00:10:11-04:00 — #1
Please have a look at the page here. Below is a screenshot where the problem lies:
anarch — 2011-07-01T00:33:02-04:00 — #2
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"
chris_upjohn — 2011-07-01T00:41:17-04:00 — #3
anarch — 2011-07-01T00:48:14-04:00 — #4
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()?
chris_upjohn — 2011-07-01T00:51:00-04:00 — #5
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.
spiritualghost — 2011-07-01T00:58:57-04:00 — #6
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
chris_upjohn — 2011-07-01T01:01:17-04:00 — #7
No problem, the most simple issues will and can give you a bigger headache then then want.
spiritualghost — 2011-07-01T01:01:20-04:00 — #8
PS: I am loving Sitepoint I'll be more regular here! Seeing great guys who really know their stuff!!
anarch — 2011-07-01T01:12:57-04:00 — #9
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!
spiritualghost — 2011-07-01T01:21:12-04:00 — #10
Thanks for the tip. I'll get it.
chris_upjohn — 2011-07-01T01:22:52-04:00 — #11
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.