473,383 Members | 1,748 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,383 software developers and data experts.

how to communicate between 2 browser window?

Hello,
I try to communicate some data from a parent aspx page
to a child page
the only solution I have found was with

Response.Write("<body><script>window.showModalDial og(......)");

it works fine.

To transfert the data, I put those I need in Session variables and in
the page load after I close the modal windows I simply read them.

but the page opener in the background become blank when the child page
open....

this is a pb as no data can be viewed anymore...

Is there any workaround?
Thanks for any help?

Franck
Nov 19 '05 #1
3 2298
you should open the dialog on the onopen event after the html has been
rendered.

<body onload=window.showModalDialog(......)">

a better approach would store the values in a hidden field, and have the
dialog page fetch the data from its parent windiw.

-- bruce (sqlwork.com)

"Franck" <fh@fh.com> wrote in message
news:de**********@s1.news.oleane.net...
Hello,
I try to communicate some data from a parent aspx page
to a child page
the only solution I have found was with

Response.Write("<body><script>window.showModalDial og(......)");

it works fine.

To transfert the data, I put those I need in Session variables and in the
page load after I close the modal windows I simply read them.

but the page opener in the background become blank when the child page
open....

this is a pb as no data can be viewed anymore...

Is there any workaround?
Thanks for any help?

Franck

Nov 19 '05 #2
It looks like you're opening this child window as soon as the page
loads. If so, wouldn't you have all the information you need to
populate the child at that time? Why not just pass the necessary
information on the querystring when you create the new window?

If you actually need to have the two windows communicate, you can do
this without a postback. The child will have a reference to its
parent, and you'll get a reference to your new window when you create
it. So in the child, you could say:

document.FormName.FieldName.value =
parent.document.ParentFormName.ParentFieldName.val ue;
// flip this around to push data back to the parent.

And in the parent, you can pull information back from the child just as
easilly:

var childWindow = *window.showModalDialog(......);
document.FormName.FieldName.value = childWindow
..document.ChildFormName.ChildFieldName.value;
Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

Nov 19 '05 #3
I am not sure if I understood the problem correctly..

Response.Write("<script>window.showModalDialog('.. ....aspx')</script>");
would cause any server side code after that statement to stop
processing until the modal dialog is closed. thats the default
behaviour of modal dialog..

instead try

Page.RegisterStartupScript("somename","<script>win dow.showModalDialog('urpopup.aspx')</script>");
To transfer data, you could use query parameters to pass values to
popup
window.showModalDialog('urpopup.aspx?param1=value2 &param2=value2')
To receive value to the parent page , you will be able use the
returnValue property

more details here
http://msdn.microsoft.com/library/de...odaldialog.asp

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
1
by: bscofield | last post by:
Hi, I'm a db app. developer and I am re-writing some helps in javascript & HTML. The Javascript is for form flow and design and HTML just to display the helps. I use a seperate app. development...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
33
by: randau | last post by:
Linking to a Targeted Browser Window I'd like to open reference links to other web sites in a separate browser window from the browser window hosting my own web site pages. The Link Target...
6
by: G Dean Blake | last post by:
in my aspx app I am writing a stream that works fine but it replaces what is in the client browser window. The code is as follows: .. .. HttpContext.Current.Response.ClearHeaders()...
0
by: toeffetommy | last post by:
Hello, I need a piece of functionality developed for our Website and I need some technical advice on how get there. Essentially, what I want to develop is a browser-within-browser...
9
by: tsung-yu | last post by:
Hello any expert, I has a vb.net program. For user requirement, I need to run and communicate an old DOS execution file. But, how to run and communicate a DOS program in a VB.NET program?...
2
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I communicate between frames in a web browser?...
0
by: philaphan80 | last post by:
I'm hoping someone can offer some guidance regarding a concept I have. I'm trying to perform the following within Windows Explorer: 1. Add an entry to the context menu which should be executed...
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.