473,396 Members | 2,011 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,396 software developers and data experts.

RegisterStartupScript 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=JavaScript>parent.thumbFrame.location.rel oad(true)</script>";
if(!this.IsClientScriptBlockRegistered("clientScri pt")){
this.RegisterStartupScript("clientScript", 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.showModalDialog()), the
page in thumbFrame does not reload. It is as if the JavaScript registered
through RegisterStartupScript 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 2562
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=JavaScript>parent.thumbFrame.location.rel oad(true)</script>";
if(!this.IsClientScriptBlockRegistered("clientScri pt")){
this.RegisterStartupScript("clientScript", 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.showModalDialog()), the
page in thumbFrame does not reload. It is as if the JavaScript registered
through RegisterStartupScript 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**************@TK2MSFTNGP10.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=JavaScript>parent.thumbFrame.location.rel oad(true)</script>";
if(!this.IsClientScriptBlockRegistered("clientScri pt")){
this.RegisterStartupScript("clientScript", 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.showModalDialog()), the
page in thumbFrame does not reload. It is as if the JavaScript registered through RegisterStartupScript 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
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,...
2
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:...
2
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...
2
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...
6
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? ...
2
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...
11
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...
2
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.