NameSilo

Javascript link for multiple iframes

SpaceshipSpaceship
SpaceshipSpaceship
NamecheapNamecheap
Watch

onlymu

New Member
Impact
0
I'm trying to get a single link to update three iframes...

I swiped the quoted bit off of another webdevelopers' forum.
However, it was used for links on a drop-down menu (my link is an image). I know no Javascripting, so I'd just like to figure out how into integrate this into my website. :| The first bit goes into a <script> tag (I think, correct me if I'm wrong) but where would I call the function? In the href of an <a> tag around my <img>?

Code for javascript linking to multiple <iframe>'s uses this function:
function loadFrames(frame1,page1,frame2,page2) {
eval("parent."+frame1+".location='"+page1+"'");
eval("parent."+frame2+".location='"+page2+"'");
}

The code to activate the multi-links is:
url=javascript:loadFrames('FrameA','http://www.google.com','FrameB','http://www.yahoo.com')
This could easily expand to however many iframes you need!

Alternatively, if you give me another workaround for this, I'd greatly appreciate it. :) Thanks.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back