LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-05-2008, 12:36 AM   #1
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Rep: Reputation: 52
Can I use "onMouse" events and bypass their effect?


Here is a sample of a number of "onMouseOver/onMouseOut" statements in my script. They work from the bottom of the contents of one frame and the result shows in another.

<a href="" onMouseOver='top.panl.location="../../definitions/rules/definition.php"' onMouseOut='top.panl.location="../../toc.htm"'>Rules</a><br>

As it is, it works almost fine in that if the content to be shown in the other frame is bigger than the screen real estate, I can click the link when the mouse is over it and gain access to the other frame with the mouse for scrolling.

However, the frame in which the "onMouse..." event happen returns to the top of the page. How can I avoid this and still have access to the other frame as explained above?

If I change '<a href=""' to '<a href="#"' (or some other value) then I lose access to the other frame, the same happen if I use the "onClick" event to return to the same part of the frame.

Thank you for your help.
 
Old 03-05-2008, 11:20 PM   #2
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
I think the root of this problem is that clicking on a link (an <A> tag) will generate a page-load (or frame-load); either you get a new page, or a refresh of the old one.

The only way I have ever found to keep a clicked-on <A> tag from reloading the frame (or page) is to put in an explicit javascript function:
Code:
<a href="javascript:doClickAction()">
Otherwise, as you noted, either you don't actually have a link (href="#") or you get a page reload. This is quite often irritating, but I have found that putting the javascript pseudo-URL produces the result that I think you are after.
 
Old 03-08-2008, 04:50 AM   #3
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Original Poster
Rep: Reputation: 52
Thank you for the answer, I'll do that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
red hat enterprise linux "ostrich effect" pwc101 Linux - Security 5 05-04-2006 03:59 PM
Is there a way to use "system bell" for KDE events, like error, etc. Old_Fogie Linux - Software 2 04-25-2006 04:12 AM
"Widescreen Effect" with Dell Inspiron 4000 Alekti Linux - Laptop and Netbook 6 05-13-2004 12:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration