Hi there,
I'm trying to get one image to serve as two links, depending on the type of event handler that's used. If a user clicks once with their mouse, webpage1 should load in an iframe called EC Content. (EC = event calendar). Likewise, if a user double clicks, webpage2 should load into EC Content.
The result of my simple efforts is that href is processed wonderfully by IE, NS, and Mozilla Firefox, but onDblClick won't work in any of the three browers.
I used this approach:
<a href="next_meeting.htm" target="EC Content" onDblClick="parent.frames['EC Content'].location='bottom.htm';"><img src="calendar_mainpage.jpg"></a>
I suspect the problem is linked to the hierarchy of event handlers, which has href/onClick evaluated before onDblClick, and of course, the fact that onDblClick calls onClick into action, making things worse.
I found javascript code that separates the two actions (with a delaying technique), but I'm failing to correctly replace the alert function with code that will have webpage1 and webpage2 load into the correct iframe (EC Content).
Here's a link to the javascript code: http://www.webxpertz.net/forums/show...?threadid=2188
*look towards the bottom and you'll see it.
I've tried: self.document.location.href="webpage2.htm"; which works, but since it doesn't encompass the name of the iframe I want to target, webpage2.htm does not load into the right iframe. The word "self" is messing things up.
I'm not experienced at writing Javascript, although I've looked at a lot of it. lol. Does anyone have a suggestion?



Reply With Quote


Bookmarks