473,805 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.showModa lDialog('Info.a spx','
','dialogHeight :150px,dialogWi dth: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 2102
Hi Jeff,
try this
in ur popup page at the <headlevel mention
<script language="javas cript">woindow. name="popup.asp x";</script>
<!-- Popup.aspx is ur popup window name -->
and in form tag of ur popup window set attribute target to "popup.aspx "
target="Popup.a spx"

hope this will help u
sri

On Dec 15, 7:56 pm, "Jeff" <n...@none.comw rote:
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.showModa lDialog('Info.a spx','
','dialogHeight :150px,dialogWi dth:200px')

In child window
self.close()

Thanks in advance

Jeff

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

"con3" <sr*********@gm ail.comwrote in message
news:11******** **************@ 48g2000cwx.goog legroups.com...
Hi Jeff,
try this
in ur popup page at the <headlevel mention
<script language="javas cript">woindow. name="popup.asp x";</script>
<!-- Popup.aspx is ur popup window name -->
and in form tag of ur popup window set attribute target to "popup.aspx "
target="Popup.a spx"

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
1949
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: myNextButton.Attributes.Add("onclick", "return confirm('Are you sure you want finish this test?');") to attach a popup box to a button. The problem is that the buttons only say OK and Cancel. OK will take me to the event tied to the button and Cancel,
8
4036
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 has a Button. When the Button is clicked, I want a JavaScript confirm dialog to pop-up with the options 'OK' & 'Cancel'. I have done this using the following code: Sub Page_Load(....) btnClick.Attributes.Add("OnClick", "javascript:return...
14
1687
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
9716
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
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10607
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
10364
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
9182
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...
1
7645
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4317
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
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.