|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
1 link 2 targets
Hi
I have problem. There is page with frame set: top, bottom, main and left. I hawe jpg picture in bottom frame and i want htat after click on it new pages apears in left and main frame... Could any one tell me how to do that? Regards |
|
#2
|
||||
|
||||
|
You'll need javascript to do that. Try this code out in your bottom frame.
Code:
<script type="text/javascript">
function doLink() {
fraLeft.location.href='left.htm' // assuming your left frame is called 'fraLeft'
fraMain.location.href='main.htm' // assuming your main frame is called 'fraMain'
}
</script>
<img src="images/blah.jpg" onclick="doLink()">
I haven't tested it, but should be fine ![]() |
|
#3
|
|||
|
|||
|
Is It Possible To Do The Same Thing With IFRAME?
Hello,
I was wondering if it was possible to do the same thing with an IFRAME. I would like to click on some text and have one frame switch two windows. Thanks! John Quote:
|
|
#4
|
||||
|
||||
|
Yes, using the same technique Stumpy suggested four years ago...
to update the code slightly, a modern DOM example would use: document.getElementByID('fraLeft').location.href=' left.htm' document.getElementByID('fraRight').location.href= 'right.htm'
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter! DevArticles Forum Moderator "The net is a waste of time, and that's exactly what's right about it." -- William Gibson |
|
#5
|
|||
|
|||
|
Thanks for the response. I was able to figure out how to do the switch- but I don't want it to be linked to an image- I'd like to use (gasp) text! I was able to achieve this using SPAN- but is there any way to make the links look and act like links? Currently, I can only get the cursor to switch.
Thanks! John Last edited by jdmcmah : November 1st, 2006 at 11:27 AM. Reason: Somewhat Figured It Out... |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Development > 1 link 2 targets |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|