Forum Moderators: open
any help appreciated.
my snippets of code look like this:
// here is the function which should open
// store.jsp in the main frame.
function jumpPage(form) {
var i = form.SelectMenu.selectedIndex;
if (i == 0) return;
form.submit(); // this currently opens
// Store.jsp
// in the side frame, which is
// incorrect.
}
....
<FORM Name="selectionForm" ACTION="Store.jsp" METHOD=POST >
....
<SCRIPT>
function MakeArray()
{
this.length = MakeArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i+1] = MakeArray.arguments[i]
}
var siteopt = new MakeArray("Roland",
"Novation",
"Korg",
"Nord",
"Clavia",
"Access");
var url = new MakeArray("",
"Store.jsp",
"Store.jsp",
"Store.jsp",
"Store.jsp",
"Store.jsp");
document.writeln('<FORM><SELECT NAME="SelectMenu" onChange="jumpPage(this.form)">');
tot = siteopt.length;
for (var i = 1; i <= tot; i++)
document.write("<OPTION>" +siteopt[i]);
document.writeln('</SELECT>');
document.writeln('</FORM>');
</SCRIPT>
This part creates the select option dropdown menu
<SCRIPT>
function MakeArray()
{
this.length = MakeArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i+1] = MakeArray.arguments[i]
}
var siteopt = new MakeArray("Roland",
"Novation",
"Korg",
"Nord",
"Clavia",
"Access");
var url = new MakeArray("", //this url array is
//not actually needed.
"Store.jsp",
"Store.jsp",
"Store.jsp",
"Store.jsp",
"Store.jsp");
document.writeln('<FORM><SELECT NAME="SelectMenu" onChange="jumpPage(this.form)">');
tot = siteopt.length;
for (var i = 1; i <= tot; i++)
document.write("<OPTION>" +siteopt[i]);
document.writeln('</SELECT>');
document.writeln('</FORM>');
</SCRIPT>
I do not know how to target the middle frame with the form.submit(), this is what I'd like to do.
Say the middle frame is called middle.htm, how do I get the jsp page to appear in this when the user selects an option
I'm quite new to javascript programming and have done my website development using sample code for the most part.
again, any help appreciated.