Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple - How to target on this script?

Status
Not open for further replies.

cepiscipher

Programmer
Jan 24, 2005
8
PR
Hello

I have this script:

Code:
<script language="JavaScript">
function menuRedirect(){
var select = eval(window.redirectForm.elements[0].selectedIndex);
var choise1 = "../html/menu/azul/index.htm";
var choise2 = "../html/menu/chinita/index.htm";

if (select==0) void(0);
else if (select==1) {window.open(choise1,"menu"); cRedirect(choise1);}
else if (select==2) {window.open(choise2,"menu"); cRedirect(choise2);}
}
</script>

How can I target a frame in this part of the script:

Code:
var choise1 = "../html/menu/azul/index.htm";

Thanks
 
Try something like this:
Code:
var choi[COLOR=red]c[/color]e = window.frames[0];

Also as a side note, when you encapsulate code inside [code] tags, make sure to make the word code in lowercase letters.

-kaht

Do the chickens have large talons?
 
cLFlaVA

Where should I put this?

Code:
top.frames['frameName'].location = choise1;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top