473,763 Members | 8,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problems frame's display using java script

3 New Member
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.htm l) ,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\ncm 863\Local Settings\Tempor ary Internet
Files\FrontPage TempDir\pvw14.h tm

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>Servle t DemoServlet</title>
<script language="javas cript" >
function displayNxtPage( )
{
if(document.fra me[0].Option[0].checked)
{

document.frame[1].location="/D:/Profiles/ncm863/Desktop/htmltest/jscript.html";
}
else if(document.fra me[0].Option[1].checked)
{

document.frame[1].location="/D:/Profiles/ncm863/Desktop/htmltest/jscript.html";
}

else if(document.fra me[0].Option[2].checked)
{

document.frame[1].location="/D:/Profiles/ncm863/Desktop/htmltest/jscript.html";
}
else if(document.fra me[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>SOR RY NO FRAME SUPPORT</NOFRAMES>
<FRAME SRC="index1.htm l" ID="first" scrolling="auto " name="first" marginwidth="2" marginheight="3 "/>
<FRAME SRC="index2.htm l" 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="displa yNxtPage()"></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
Mar 14 '07 #1
3 2855
Logician
210 New Member
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.htm l) ,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
Expand|Select|Wrap|Line Numbers
  1. onClick="displayNxtPage()"
should be
Expand|Select|Wrap|Line Numbers
  1. onClick="parent.displayNxtPage()"
and that function's addressing of the form elements is incorrect. Try:
Expand|Select|Wrap|Line Numbers
  1. if( window.frames[0].document.forms[0].Option[0].checked )
Mar 14 '07 #2
rajarya
3 New Member
Expand|Select|Wrap|Line Numbers
  1. onClick="displayNxtPage()"
should be
Expand|Select|Wrap|Line Numbers
  1. onClick="parent.displayNxtPage()"
and that function's addressing of the form elements is incorrect. Try:
Expand|Select|Wrap|Line Numbers
  1. if( window.frames[0].document.forms[0].Option[0].checked )
Thanks Logician...
That thing is working fine while i used Microsoft front page to design and preview that . But when I used Internetexplore r or Mozila firefox to open the same page, I am not getting any change in the second frame which I am supposed to get.

Please suggest me
modified codes are
mainpage(index. html)

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Servle t DemoServlet</title>
<script language="javas cript" >
function displayNxtPage( )
{
if(window.frame s[0].document.forms[0].Option[0].checked )
{

document.frames[1].location="/D:/Profiles/ncm863/Desktop/htmltest/jscript.html";
}
else if(window.frame s[0].document.forms[0].Option[1].checked )
{

document.frames[1].location="/D:/Profiles/ncm863/Desktop/htmltest/jscript.html";
}

else if(window.frame s[0].document.forms[0].Option[2].checked )
{

document.frames[1].location="/D:/Profiles/ncm863/Desktop/htmltest/jscript.html";
}
else if(window.frame s[0].document.forms[0].Option[0].checked )
{

document.frames[1].target="/D:/Profiles/ncm863/Desktop/htmltest/jscript.html";
}
else
{
document.frames[1].target="/D:/Profiles/ncm863/Desktop/htmltest/index5.html";

}

}
</script>

</head>
<FRAMESET cols="24%,74%">
<NOFRAMES>SOR RY NO FRAME SUPPORT</NOFRAMES>
<FRAME SRC="index4.htm l" ID="first" scrolling="auto " name="first" marginwidth="2" marginheight="3 "/>
<FRAME SRC="index5.htm l" ID="second" marginwidth="2" marginheight="3 " scrolling="auto " name="second"/>

</FRAMESET>

</html>
Mar 15 '07 #3
Logician
210 New Member
Thanks Logician...
That thing is working fine while i used Microsoft front page to design and preview that . But when I used Internetexplore r or Mozila firefox to open the same page, I am not getting any change in the second frame which I am supposed to get.
frames is a property of window not document. Try changing all your references.
Mar 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1687
by: DL | last post by:
Hello, I am teaching a java course. When some of my students tried to run a very simple java program that displays a JFrame, it appeared that even though the program was compiled OK on all machines in the lab (running windows 2000), a couple of the machines did not display the Frame at all. There wasn't any error message printed in the console window where we started the program. They just didn't display the frame.
1
3255
by: bayouprophet | last post by:
Cant get menu script to to put linked page in the same frame. I am new to Java and I am wondering what am I doing wrong? below are my java applet file, frame.html file, and my text file and one of my link file that should load next to the menu on the same page. And Thank You in advance. Here is my menu applet: <html>
2
2245
by: Chris Podmore | last post by:
This is driving me mad so any help will be much appreciated. I have an html page with 3 frames, banner, left and right. The banner frames source is an aspx page. The aspx page has two buttons, both need to run some code and then redirect the user somewhere else. The problem is the redirected page is being displayed in the banner frame. How do I tell either Response.Redirect or Server.Transfer what frame to display the page in or that the...
3
3834
by: Al Wilkerson | last post by:
Hey, I have a Web Form with a drop down list, textbox, and search button. When click the search button an SQL server database is queried fordata. Once I have the data in a dataset I use the dataset to dynamically create a Html Table control. I want to display the table on another frame page (target="main") without the web form controls (i.e. the textbox, search button, and dropdown list). I just want the table displayed only on the...
11
16961
by: Rob | last post by:
I know, I know, don't use frames. Well, I'm stuck with these frames and I'm trying to add functionality without a complete redsign. You can look at this as a nostalgic journey. Anyway, I've got the following frame structure at the top level: FRAMESET CODE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"> <html><head><title>Server List</title></head> <frameset frameborder="1" border="1" framespacing="1" rows="10%,89%">
1
3598
by: Michael Yanowitz | last post by:
Hello: Below I have included a stripped down version of the GUI I am working on. It contains 2 dialog boxes - one main and one settings. It has the following problems, probably all related, that I am hoping someone knows what I am doing wrong: 1) Pressing the Settings.. Button multiple times, brings up many instances of the Settings Panel. I just want it to bring up one. Is there an easy way to do that?
4
2750
by: ArrK | last post by:
I want to use a control frame to create and/or modify the content (images and text) of a display frame - all files and images are client side. . When I try to write to the display frame from the control frame I get the error message: "window.parent.pictureFrame has no properties" and all content of the display frame disappears. My plan was to populate the DOM image object for the display frame with the URIs for the graphics (a variable...
1
1329
by: dileep60 | last post by:
Hi friends, Here is my problem.My requirement is in the main window i have 2 frames.Bottom frame has few values with radio buttons.when i select the radio button and click on the update button a popup window will be open and the corresponding values of that radio button are prepoulated in the popup in the editable form.When the user updates the popup the request will go to the server and if the updation those values are overlaping the other...
2
2610
by: vertozia | last post by:
Hey there, ive been having difficulty placing an image, this is my screenshot, and what ive done so far: http://img341.imageshack.us/img341/9894/gridwg2.jpg /** * ConnectFourGUI * Provide the GUI for the Connect Four game */ import javax.swing.*; import javax.swing.border.*;
0
9564
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10148
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.