Hi,
I m designing a HTML page(index.html),here i have 2 frames,by defult both frames have index1.html and index2.html as their source .
in first frame(index.html) ,i have some redio buttons,and a submmit button.
so when I select one ption and click the submit button in the left side frame(or frame 1 or in index1.html) my right side frame should be reloded with a new html page as per the javascript method in main html page.
but insted I am getting no change in frame two,but an
Error "An error has occured in the script of this page
Line 10
Char 1
Error Object expected
Code 0
URL file://D:\Profiles\ncm863\Local Settings\Temporary Internet
Files\FrontPageTempDir\pvw14.htm
Do u want to continue anyway
yes/no
code for the above
index.html
[HTML]<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Servlet DemoServlet</title>
<script language="javascript" >
function displayNxtPage()
{
if(document.frame[0].Option[0].checked)
{
document.frame[1].location="/D:/Profiles/ncm863/Desktop/htmltest/jscript.html";
}
else if(document.frame[0].Option[1].checked)
{
document.frame[1].location="/D:/Profiles/ncm863/Desktop/htmltest/jscript.html";
}
else if(document.frame[0].Option[2].checked)
{
document.frame[1].location="/D:/Profiles/ncm863/Desktop/htmltest/jscript.html";
}
else if(document.frame[0].Option[3].checked)
{
document.frame[1].target="/D:/Profiles/ncm863/Desktop/htmltest/jscript.html";
}
else
{
document.frame[1].target="/D:/Profiles/ncm863/Desktop/htmltest/index5.html";
}
}
</script>
</head>
<FRAMESET cols="24%,74%">
<NOFRAMES>SORRY NO FRAME SUPPORT</NOFRAMES>
<FRAME SRC="index1.html" ID="first" scrolling="auto" name="first" marginwidth="2" marginheight="3"/>
<FRAME SRC="index2.html" ID="second" marginwidth="2" marginheight="3" scrolling="auto" name="second"/>
</FRAMESET>
</html>[/HTML]
index1.html
[HTML]<html>
<body>
<table width="97%" name="table" border="1">
<tr><td>
<form method="POST" >
<p><input type="radio" value="Error" name="Option" ></p>
<p><input type="radio" value="Debug" name="Option"></p>
<p><input type="radio" value="Warn" name="Option"></p>
<p><input type="radio" value="All" name="Option"></p>
<p><input type="button" value="Show" onClick="displayNxtPage()"></p>
</form>
</td></tr>
</table>
</body>
</html>
index3.html is a simple file to display
html>
<head>
<title>New Page 1</title>
</head>
<body>
//some containt
</body>
</html>[/HTML]
Please post code using code tags - moderator