Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hyperlinks not working FF 2

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
hi,

I'm very confused, why do the hyperlinks on this page not work...


the yes/no images should be hyperlinks, reset questions and the privacy policy, it all works fine in IE6/7

I'm stumped, surely
Code:
<a href="javascript:idd_popup();"><img src="/images/no.jpg" alt="No" title="No" /></a>
is acceptable code, i've ran the page through W3C Valdator

So i'm completely stumped.

thanks 1DMF.


"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Code:
<br />
                <a href="quote_notqual.html"><img src="/images/yes.jpg" alt="Yes" title="Yes" /></a>
                <img src="/images/no.jpg" alt="No" title="No" onclick="document.getElementById('q2').style.display='block';" />

That's your first set of links.

If you change the JS in that second, non accessible, 'link' does it work?

My guess is tht you have more than 1 element with an id of 'q2'

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
My guess was wrong.

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
Either way, I'm pretty sure it's a Javascript problem.

There seems to be an element called idd_wrapper that is sitting over the top of everything. This could be preventing the click being registered by javascript.

It seems to be absolutely positioned. I'll wager that's your problem.

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
Hi

Why that idd_wrapper [tt]div[/tt] is there ? That covers those buttons and "steals" all clicks. Move it somewhere else, set its [tt]display[/tt] to [tt]none[/tt], set its [tt]visibility[/tt] to [tt]hidden[/tt], set its [tt]zIndex[/tt] to -1 or anything else.


Feherke.
 
Yep, the Show Element Info and Show CSS functions are absolutely invaluable.

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
On a side note.

I don't know if you have finished sorting the clicks out, but you really should consider using unobtrusive Javascript with a standard HTML link fallback for non-javascript environments.

Also, do not use the javascript: psuedo protocol. It will fail in some circumstances (older browsers).

Create simple, straightforward HTML. Give your links ID's or put them in a container so you can easily target them. Then use external javascript to attach event handlers to them with a 'return false' to prevent the HTML click working.

That way, if the Javascript doesn't work, the HTML click will still work and your page won't be totally unusable.

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
whoa slow down guys, the idd_wrapper is a hidden elemnet which i want to pop up after a set of questions have been answered.

are you saying it's a z-index issue?

I need to make the z-index low and reset with javascript when I want to display it?

oh and foamy, I know the site won't work properly without JS enabled, and I have a <no script> tag telling people this.

the quote engine(not controlled by me) won't work without JS and so basically if you don't have JS you can't use the site, unfortunately a limitation we are happy to live with ;-)

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
ps I tried that web developer link plugin , the options is gives me is find / save / cancel , how do I install it ?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Is the 'pop up' element hidden or set to display:none?

If it's visibility:hidden then it's still there, just invisible. If it's display:none then it's not there and won't get in the way.

You could always create it on the fly using Javascript if you aren't concerned with non JS users.

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
yup i looked back at it and realised my school boy error ,the wrapper div (used because applying margin:auto; won't work direct on the IDD div), i'd forgot to put display:none; do'h , it was a div covering the page but it's content was hidden, what a doughnut ! lol

[hammer]

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
on a side note to my other problem, why does google tool bar see a form being submitted targeting a new window (ie, target='_blank') as a pop up and block it.

The button pressed is a submit button on a form being submitted how on earth is that a pop up in any way, shape or form?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Hi

1DMF said:
I tried that web developer link plugin , the options is gives me is find / save / cancel , how do I install it ?
If add-on installation is enabled :
[ul]
[li]Click [highlight #A4FD58][black]Install Now[/black][/highlight][/li]
[li]Wait while the counter in the Software Installation window reaches 0.[/li]
[li]Click the Install Now button.[/li]
[/ul]
Check the [tt]xpinstall.enabled[/tt] option in the about:config list. It has to be [tt]true[/tt] to be able to install add-ons.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top