|
-
Oct 15th, 2002, 12:34 PM
#1
Thread Starter
Lively Member
Open link with onmouseover in a different frame????
Hi, I need help with whis problem.
I want to load a page in a different frame on an "onmouseover" event.
Does anyone know how I do this?
This works but not in a different frame
QUOTE]<a href="länk1.htm" onMouseover="location.href='länk1pre.htm'">Länk 1</a>[/QUOTE]
Thanks!
-
Oct 16th, 2002, 03:28 AM
#2
Fanatic Member
This should do it...
Code:
<a href="länk1.htm" onMouseover="document.frames('frame1').src='länk1pre.htm'">Länk 1</a>
To elaborate,
The javascript document object has a frames collection. You specify which frame you want to 'control' and then supply the function/method name.
eg. document.frames('framename').function.method (=var);
-
Oct 16th, 2002, 05:12 AM
#3
Frenzied Member
Remember though that some browsers/users don't have JavaScript so it will break in some browsers. You can also provide a backup for those users using the <noscript></noscript> tags.
-
Oct 16th, 2002, 08:22 AM
#4
Thread Starter
Lively Member
Thanks!
JavaScript is supported in the most common browsers like IE, Opera and Netscape and the other 0.01% am I going to ignore =)
Thanks once again!
// Johan
-
Oct 16th, 2002, 10:33 AM
#5
Frenzied Member
Well it's up to you obviously, but just because the browsers have JavaScript doesn't mean everyone keeps it turnt on.
-
Oct 16th, 2002, 11:34 AM
#6
Thread Starter
Lively Member
ah! God point!
Well, I have to think about it then...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|