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

Javascript dialog box problem


I'm hoping that someone can help me. I know little javascript and only need
a very small amount in an asp.net application. I have most of it working
with one problem. I'm attempting to open a modal dialog box from a parent
window. The dialog box opens fine with the code below associated with the
parent. In the child window, I have a button with the simple self.close()
code associated with it. Obviously, I want to use the button to close the
child window (I've also tried window.close()). When the button is clicked,
the dialog box closes, but the info.aspx page is then re-displayed in
another regular window that opens. I found some reference to the problem on
the web with an explanation that it only occurs in IE after version 5, but
I've found no solution. ...and it still occurs in both IE6 and IE7.

Can someone tell me what I'm missing?

In parent window
window.showModalDialog('Info.aspx','
','dialogHeight:150px,dialogWidth:200px')

In child window
self.close()

Thanks in advance

Jeff
--
Posted via a free Usenet account from http://www.teranews.com

Dec 15 '06 #1
2 2085
Hi Jeff,
try this
in ur popup page at the <headlevel mention
<script language="javascript">woindow.name="popup.aspx";</script>
<!-- Popup.aspx is ur popup window name -->
and in form tag of ur popup window set attribute target to "popup.aspx"
target="Popup.aspx"

hope this will help u
sri

On Dec 15, 7:56 pm, "Jeff" <n...@none.comwrote:
I'm hoping that someone can help me. I know little javascript and only need
a very small amount in an asp.net application. I have most of it working
with one problem. I'm attempting to open a modal dialog box from a parent
window. The dialog box opens fine with the code below associated with the
parent. In the child window, I have a button with the simple self.close()
code associated with it. Obviously, I want to use the button to close the
child window (I've also tried window.close()). When the button is clicked,
the dialog box closes, but the info.aspx page is then re-displayed in
another regular window that opens. I found some reference to the problem on
the web with an explanation that it only occurs in IE after version 5, but
I've found no solution. ...and it still occurs in both IE6 and IE7.

Can someone tell me what I'm missing?

In parent window
window.showModalDialog('Info.aspx','
','dialogHeight:150px,dialogWidth:200px')

In child window
self.close()

Thanks in advance

Jeff

--
Posted via a free Usenet account fromhttp://www.teranews.com
Dec 18 '06 #2

"con3" <sr*********@gmail.comwrote in message
news:11**********************@48g2000cwx.googlegro ups.com...
Hi Jeff,
try this
in ur popup page at the <headlevel mention
<script language="javascript">woindow.name="popup.aspx";</script>
<!-- Popup.aspx is ur popup window name -->
and in form tag of ur popup window set attribute target to "popup.aspx"
target="Popup.aspx"

hope this will help u
sri
Thanks. There were actually two problems. The above was one of the problems
and the other was a left over "onblur" command that was in the wrong place
and causing seemingly random behavior.

I have it working now.

Jeff
--
Posted via a free Usenet account from http://www.teranews.com

Dec 19 '06 #3

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

Similar topics

6
by: tshad | last post by:
I am trying to set up a Javascript popup box that has a way of sending back a message to asp.net on how to process some data. At the moment I am just doing: ...
8
by: rn5a | last post by:
I have gone through a no. of posts in this NewsGroup regarding my problem but alas, couldn't come across one which would have helped me in resolving the issue. My problem is this: An ASPX Form...
14
by: MartinRinehart | last post by:
I can load a dialog by loading an HTML page or by constructing the dialog with JavaScript. What should I be thinking about when I look at this choice?
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...
1
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: 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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.