Posts: 11619
Joined: Mon Nov 13, 2000 4:06 am

Javascript Help Anyone?

Mon Dec 17, 2007 6:30 pm

Greetings and Salutations,

I have the following code which I extracted from somewhere else. I want it to target an IFrame called "Manchester" for example but after pouring through a few IFRAME guides on the internet, notably, I can't get it to target the Iframe.

Any help would be appreciated.


//,'1ARES', ' menubar,resizable,status,location,scrollbars,toolbar,left=0,top=0,width=' + screenW + ',height=' + screenH + '');,"1ARES","toolbar,status,resizable,scrollbars,top=0,left=0,width="+(screen.width*0.99)+",height="+(screen.height*0.88))
Anyone can fly, only the best Soar.
User avatar
Posts: 4281
Joined: Fri Jul 29, 2005 7:01 am

RE: Javascript Help Anyone?

Mon Dec 17, 2007 9:02 pm

SQ I'm not sure exactly what you're trying to do. If you are simply trying to get different content to show in a single IFRAME based on the selection in a drop down list you can try something like this.

To achive this you need to know the exact ID of the IFRAME for targeting reasons. YOu can use a tools like the IE developer toolbar or Firebug for Firefox to find out what the name of the frame is. Once you know this you can "get" that element from the page using the relevant object model. Something along the lines of

var targetIFRAME = document.getElementById('ThisPage_anIFRAME');
var dropDownList = document.getElementById('aDropDown');

targetFrame.src = dropDownList.GetSelectedValue() //where selected value return the required URL

this will load the content of say into the frame if is selected from the DDL.

I would recommend using this resource, it's my JS cheatsheet:


Who is online

Users browsing this forum: Acheron, FriscoHeavy, LittleFokker and 9 guests