What I want to happen is this: Frametest.htm is loaded in browser, you see the jscript menu on top, on bottom is a blank frame.
You select an option from the menu and the corresponding page is loaded into the 'f1' frame and the 'menu' frame is reloaded.
I'm not sure how to go about this.
Last edited by TwoD; 08-29-07 at 09:00 PM.
Reason: Replaced [code] with [html] to get highlighting
You don't need Visual J++ (Which is for Java, if I'm correct, not JavaScript) at all.
You don't need a .js file, but it would make the other code on the page a bit more readable since you only need one tag to load the .js file.
I'm not sure why you use document.write() that much since it's much easier just to write it in normal HTML, instead of using JavaScript to output the same HTML to the browser.
There is currently no need to reload the menupage each time someone clicks a link, because nothing changes on it.
To change the page in a frame, reference to the frame by its id and change the src-atribute. I usually use document.getElementById('frame_id').src=something to do this.
Btw, you can't tell a funcion where to execute. It will always execute on the page it's physically located at. But you can reference to other frames and windows using the window.opener.../window.parent... objects.
Window.opener is used instead of window.parent when you have used window.open() method to create the window.
in the following code that annexed him to continucacion, Since I do to him so that the answer of this triple stand for casks box habra in inframe in the part of down, so and as they have it in the examples of above
__________________________________________________ _______________
HTML Code:
<html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><FORM name="isc"><table border="0" cellspacing="0" cellpadding="0"><tr align="center"><td nowrap height="11"> <select name="example" size="1" onChange="redirect(this.options.selectedIndex)"><option selected>---Select1-------------</option><option>Gildan</option><option>M&O</option><option>Dimeo</option><option>Optima</option><option>Migliore</option><option>Big-Bang</option><option>Bibo</option></select><select name="stage2" size="1" onChange="redirect1(this.options.selectedIndex)"><option value=" " selected></option><option value=" " selected>---Select2--------------</option><option value=" " selected>---Select2--------------</option><option value=" " selected>---Select2--------------</option><option value=" " selected>---Select2--------------</option><option value=" " selected>---Select2--------------</option><option value=" " selected>---Select2--------------</option><option value=" " selected>---Select2--------------</option></select><select name="stage3" size="1" onChange="redirect2(this.options.selectedIndex)"><option value=" " selected></option><option value=" " selected>---Select3----------------</option><option value=" " selected>---Select3----------------</option><option value=" " selected>---Select3----------------</option><option value=" " selected>---Select3----------------</option><option value=" " selected>---Select3----------------</option><option value=" " selected>---Select3----------------</option><option value=" " selected>---Select3----------------</option></select><input type="button" name="test" value="Go!"
onClick="go()"></p><script><!--
/*
Triple Combo Script Credit
By Hamid Cheheltani/ JavaScript Kit ([url]http://www.javascriptkit.com[/url])
Visit [url]http://javascriptkit.com[/url] for this and over 400+ other scripts
*/
var groups=document.isc.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()
group[0][0]=new Option("---Select2---"," ");
group[1][0]=new Option("Now Select This One"," ");
group[1][1]=new Option("Sudaderas y Pants","47");
group[1][2]=new Option("Playeras Cuello Redondo","46");
group[1][3]=new Option("Playeras Tipo Polo","45");
group[2][0]=new Option("Now Select This One"," ");
group[2][1]=new Option("Camison Dama","115");
group[2][2]=new Option("Playera Musculos","116");
group[2][3]=new Option("Playeras Cuello Redondo","117");
group[2][4]=new Option("Playeras Tipo Polo","118");
group[2][5]=new Option("Playera Tank Top","119");
group[2][6]=new Option("Tirantes Dama","120");
group[3][0]=new Option("Now Select This One"," ");
group[3][1]=new Option("Playeras Tipo Polo","218");
group[4][0]=new Option("Now Select This One"," ");
group[4][1]=new Option("Sudaderas y Pants","318");
group[4][2]=new Option("Pantalones","319");
group[4][3]=new Option("Playeras Cuello Redondo","320");
group[4][4]=new Option("Playeras Tipo Polo","321");
group[5][0]=new Option("Now Select This One"," ");
group[5][1]=new Option("Playeras Cuello Redondo","420");
var temp=document.isc.stage2
function redirect(x){
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
redirect1(0)
}
var secondGroups=document.isc.stage2.options.length
var secondGroup=new Array(groups)
for (i=0; i<groups; i++) {
secondGroup[i]=new Array(group[i].length)
for (j=0; j<group[i].length; j++) {
secondGroup[i][j]=new Array() }}
secondGroup[0][0][0]=new Option("---Select 3---"," ");
secondGroup[1][0][0]=new Option("---Select 3---"," ");
secondGroup[1][1][0]=new Option("Now Select This One"," ");
secondGroup[1][1][1]=new Option("Unisex","http://javascriptkit.com");
secondGroup[1][2][0]=new Option("Dama y Niña"," ");
secondGroup[1][2][1]=new Option("Unisex","http://www.dynamicdrive.com");
secondGroup[1][2][2]=new Option("Unisex Juvenil","http://www.geocities.com/ResearchTriangle/Facility/4490/");
secondGroup[1][3][0]=new Option("Unisex"," ");
secondGroup[1][3][1]=new Option("Unisex Juvenil","http://www.cgi-resources.com");
secondGroup[2][0][0]=new Option("---Select 3---"," ");
secondGroup[2][1][0]=new Option("Now Select This One"," ");
secondGroup[2][1][1]=new Option("Dama y NIña","http://www.cnn.com");
secondGroup[2][2][0]=new Option("Now Select A Page"," ");
secondGroup[2][2][1]=new Option("Caballero","http://www.news.com");
secondGroup[2][3][0]=new Option("Now Select A Page"," ");
secondGroup[2][3][1]=new Option("Dama y Niña","http://www.news.com");
secondGroup[2][3][2]=new Option("Unisex"," ");
secondGroup[2][3][3]=new Option("Unisex Juvenil","http://www.news.com");
secondGroup[2][3][4]=new Option("Unisex Manga Larga Juvenil"," ");
secondGroup[2][3][5]=new Option("Unisex Manga Larga Adulto","http://www.news.com");
secondGroup[2][4][0]=new Option("Now Select A Page"," ");
secondGroup[2][4][1]=new Option("Dama y Niña","http://www.news.com");
secondGroup[2][4][2]=new Option("Unisex","http://www.news.com");
secondGroup[2][5][0]=new Option("Now Select A Page"," ");
secondGroup[2][5][1]=new Option("Dama y Niña","http://www.news.com");
secondGroup[2][5][2]=new Option("Unisex","http://www.news.com");
secondGroup[2][6][0]=new Option("Now Select A Page"," ");
secondGroup[2][6][1]=new Option("Dama y Niña","http://www.news.com");
secondGroup[3][0][0]=new Option("---Select 3---"," ");
secondGroup[3][1][0]=new Option("Now Select This One"," ");
secondGroup[3][1][1]=new Option("Unisex","http://www.cnn.com");
secondGroup[4][0][0]=new Option("---Select 3---"," ");
secondGroup[4][1][0]=new Option("Now Select This One"," ");
secondGroup[4][1][1]=new Option("Unisex","http://www.cnn.com");
secondGroup[4][2][0]=new Option("Now Select A Page"," ");
secondGroup[4][2][1]=new Option("Caballero","http://www.news.com");
secondGroup[4][3][0]=new Option("Now Select A Page"," ");
secondGroup[4][3][1]=new Option("Dama y Niña","http://www.news.com");
secondGroup[4][3][2]=new Option("Unisex"," ");
secondGroup[4][4][0]=new Option("Now Select A Page"," ");
secondGroup[4][4][1]=new Option("Dama y Niña","http://www.news.com");
secondGroup[4][4][2]=new Option("Unisex","http://www.news.com");
secondGroup[4][4][3]=new Option("Unisex Juvenil","http://www.news.com");
secondGroup[5][0][0]=new Option("---Select 3---"," ");
secondGroup[5][1][0]=new Option("Now Select This One"," ");
secondGroup[5][1][1]=new Option("Dama y Niña","http://www.cnn.com");
secondGroup[5][1][2]=new Option("Unisex","http://www.cnn.com");
secondGroup[5][1][3]=new Option("Unisex Juvenil","http://www.news.com");
var temp1=document.isc.stage3
function redirect1(y){
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
for (i=0;i<secondGroup[document.isc.example.options.selectedIndex][y].length;i++){
temp1.options[i]=new Option(secondGroup[document.isc.example.options.selectedIndex][y][i].text,secondGroup[document.isc.example.options.selectedIndex][y][i].value)
}
temp1.options[0].selected=true
}
function go(){
location=temp1.options[temp.selectedIndex].value
}
//--></script></td></tr></table></FORM></body></html>
Last edited by Christian; 08-29-07 at 12:50 PM.
Reason: English please.