473,545 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RegisterStartup Script Fails in Modal Dialog

I have a frameset aspx page that enables users to upload photos. One
frame/page shows a thumbnail list of prevously-uploaded images, and the
other frame/page includes the controls that enable selecting and uploading
additional photos. After uploading a file, the list of thumbnail images
needs to get refreshed to show the newly uploaded picture. This is
accomplished by using the following code:

string scriptString = "<script
language=JavaSc ript>parent.thu mbFrame.locatio n.reload(true)</script>";
if(!this.IsClie ntScriptBlockRe gistered("clien tScript")){
this.RegisterSt artupScript("cl ientScript", scriptString);

This setup works great - but only as long as the frameset is opened by
itself (i.e., not as a modal dialog). When the frameset is opened as a modal
dialog (from client-side JavaScript using window.showModa lDialog()), the
page in thumbFrame does not reload. It is as if the JavaScript registered
through RegisterStartup Script is not executed on the client.

How can I get the thumbFrame to reload when the frameset has been opened as
a modal dialog?

Thanks!

Nov 18 '05 #1
2 2573
Guadala Harry wrote:
I have a frameset aspx page that enables users to upload photos. One
frame/page shows a thumbnail list of prevously-uploaded images, and the
other frame/page includes the controls that enable selecting and uploading
additional photos. After uploading a file, the list of thumbnail images
needs to get refreshed to show the newly uploaded picture. This is
accomplished by using the following code:

string scriptString = "<script
language=JavaSc ript>parent.thu mbFrame.locatio n.reload(true)</script>";
if(!this.IsClie ntScriptBlockRe gistered("clien tScript")){
this.RegisterSt artupScript("cl ientScript", scriptString);

This setup works great - but only as long as the frameset is opened by
itself (i.e., not as a modal dialog). When the frameset is opened as a modal
dialog (from client-side JavaScript using window.showModa lDialog()), the
page in thumbFrame does not reload. It is as if the JavaScript registered
through RegisterStartup Script is not executed on the client.

How can I get the thumbFrame to reload when the frameset has been opened as
a modal dialog?

Thanks!


I don't know the technical reason this occurs, but I've overcome it by
having the modal dialog consist of only an IFRAME, which then contains
the real aspx page.
Nov 18 '05 #2
I will be happy to use an IFrame if that is necessary. AS a followup
question: I thought I read somewhere that IFrames were being "phased out".
Is there anything to that - or was that just someone's biased *opinion*
against IFrames?

-G

"John Hann" <jovinhan@SPAM_ FREEyahoo.com> wrote in message
news:uH******** ******@TK2MSFTN GP10.phx.gbl...
Guadala Harry wrote:
I have a frameset aspx page that enables users to upload photos. One
frame/page shows a thumbnail list of prevously-uploaded images, and the
other frame/page includes the controls that enable selecting and uploading additional photos. After uploading a file, the list of thumbnail images
needs to get refreshed to show the newly uploaded picture. This is
accomplished by using the following code:

string scriptString = "<script
language=JavaSc ript>parent.thu mbFrame.locatio n.reload(true)</script>";
if(!this.IsClie ntScriptBlockRe gistered("clien tScript")){
this.RegisterSt artupScript("cl ientScript", scriptString);

This setup works great - but only as long as the frameset is opened by
itself (i.e., not as a modal dialog). When the frameset is opened as a modal dialog (from client-side JavaScript using window.showModa lDialog()), the
page in thumbFrame does not reload. It is as if the JavaScript registered through RegisterStartup Script is not executed on the client.

How can I get the thumbFrame to reload when the frameset has been opened as a modal dialog?

Thanks!


I don't know the technical reason this occurs, but I've overcome it by
having the modal dialog consist of only an IFRAME, which then contains
the real aspx page.

Nov 18 '05 #3

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

Similar topics

2
3618
by: Patrick Lim | last post by:
Here is the problem: I have written a non-modal frame class in Java for displaying help text when a user is using an application. It works as desired in that if the user selects "help" again, the same frame is used -- this is done using a singleton. The user can do other stuff in the main window while the help window is up. However,...
2
12228
by: martin de vroom | last post by:
Hi, I have a web page that opens a modal dialog (client side) in the following manner onclick="window.showModalDialog('/dialog.asp',null,'dialogHeight: 200px; dialogWidth: 400px; dialogTop: 300px; dialogLeft: 150px; edge: Sunken; center: Yes; help: No; resizable: No; status: No;');"> and the page loads in the modal dialog no problem.
2
6706
by: Gilles T. | last post by:
Hi, How I can refresh a modal dialog in asp.net? I open a modal dialog in first with a dropdownlist. To add a element in my dropdownlist (table), I open a second modal dialog to ask element and save. When I return in my first modal dialog, dropdownlist is not refreshed. I don't know how to refresh my first modal dialog to view my new...
2
2547
by: cassidyc | last post by:
Hi, I was wondering if anyone has come accross this issue? And if they have any solutions I have that can create new copies of itself Form1 as = new form1(); af.show(); This form can also bring up a modal dialog (MessageBox)
6
1976
by: Bill Jones | last post by:
I'm trying to use this.RegisterStartupScript to add some javascript to and aspx page that will run when the page is loaded. Does anyone know if this function only works in the Page_Load function? Or can I put it anywhere. Right now it is inside the eventhandler function that is called on the "CheckChanged" event of a checkbox, but it never...
2
3672
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the dialog. To be more specific I want to have a confirmation dialog that is shown when a user clicks on a Delete button (which deletes some values from...
11
2339
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have realized that despite suggestions to use DHTML-based modal dialogs are very common? there is not a single fully functional reliable copyright-free...
2
3490
by: diogenes | last post by:
I have created many shortcut/popup (aka context, or right-click) menus for my application - instead of toolbars or standard drop-down menus. Within my custom menu, I am using =ShowMainMenu("item") in the On Action event where ShowMainMenu is a public function in frmMain, and "item" is a string mapping to a button click event. (error...
0
7478
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...
0
7410
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...
0
7668
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. ...
0
7923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5984
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...
0
4960
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...
0
3466
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...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
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

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.