473,326 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How to open a sub window from another sub window

3
Hi! I am facing a problem here. I wish to open a sub window from another sub window which means when i click on the main parent window a small window will appear then when i click on the button on the small window another smaller window will appear. Thanks in advance. Here is my code:
[HTML]<html>
<head><title>Date Picker</title>
<script language="JavaScript">
var newwindow=undefined;
var editwindow=undefined;
function pop(){
newwindow= window.open("javascript:''","","Height=200,Width=2 00");
if (window.focus) {newwindow.focus()}
newwindow.document.open();
newwindow.document.write("<html><head><title>Choos e Colour</title></head>"+
"<body><form name='tstest'><input type='Text' name='timestamp' value=''>"+
"<img src='cal.gif' width='16' height='16' border='0' alt='Click Here to select the times' >"+
"<input type='button' value='press' onclick=''>"+
"</form></body></html>");
newwindow.document.close();

}

function pop2(){
newwindow.close();
editwindow=window.open("javascript:''","name","hei ght=400,width=620");
if (window.focus) {editwindow.focus()}
editwindow.document.open();
editwindow.document.write("<html><head><title>colo r</title></head><body>hi</body></html>");
editwindow.document.close();
}
</script>
</head>
<body>
<input type="button" name="enter" value="click here" onclick="pop()">

</body>
</html>[/HTML]
Jul 3 '07 #1
1 2092
acoder
16,027 Expert Mod 8TB
Multiple popups is not a good idea. Are you sure you can't do what you require using DHTML?

Anyway, opening another window from a popup is easy. Just call window.open again as you did for the parent window. Note that this code must go inside the popup window.
Jul 3 '07 #2

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

Similar topics

1
by: Cam | last post by:
Hi I'm using this simple rss parser that i would like to have open in another window. But I'm very much a beginner in php scripting. Here is the script on the page <?php ...
2
by: monika | last post by:
Hi all... I am able to select a student's story and open it in a word doc. the teacher then corrects the story, highlight in colors the comments, strikethrough. In fact all the privileges I...
3
by: eddie wang | last post by:
I have an the following asp. How to have this asp to open in another window when it is called? Thanks! <% something %> *** Sent via Developersdex http://www.developersdex.com *** Don't...
40
by: Brian Jorgenson | last post by:
On my web page, I have a few hyperlinks with target frame of _blank. The hyperlink brings up a second window, but everytime I click on thie hperlink, it keeps bringing up a new window and not...
0
by: | last post by:
I'm using this code to export the crystal report file into pdf format and stream the file to the browser: ReportDocument oRpt = new ReportDocument(); oRpt.Load(MapPath("MyReport.rpt"));...
1
by: JIM.H. | last post by:
Hello, Response.Clear(); Response.ContentType = "Application/pdf"; Response.WriteFile(Server.MapPath(myFileName)); Response.End(); I am using this to open a pdf file. How can I make sure...
5
by: rockdale | last post by:
Hi, all: I have a linkbutton and I use javascript to open another webpage in a new window. I also want to set my session variable value when this linkbutton get clicked. These session variable...
4
by: MichaelK | last post by:
Hello. I have all data already collected on the current page? I want to open another window with the form, fill the fields and submit that form. So basically the question is how can I fill all...
1
by: Ramachand | last post by:
Actually I have to call a dialog window "Dwin1" from a Parent Window. From Dwin1, I have to call another Dialog Window "Dwin2".if user close the Dialog Window "Dwin2", i have to refersh the Dwin1....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.