473,418 Members | 4,847 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,418 software developers and data experts.

Modal Dialog - This Almost Works

I have a modal dialog that currently does all of the following except item
4.

1. lets users select a graphic from a list of thumbnails (and when selected,
displays the full-size image in a preview DIV)
2. when users close the dialog, the application receives the URL to the
selected graphic.
3. the modal dialog lets the users upload a new graphic if the dialog does
not present them with one they are already happy with.
4. upon uploading a new graphic, the newly uploaded graphic appears in the
dialog along with the existing thumbnails.

What I started with (and does items 1-3 just fine) was a frameset aspx page
that included two frames - one frame for the thumbnails, and another frame
that provided (1) a preview area for the full-sized version of the selected
thumbnail, and (2) the controls required for uploading new graphics. In
order to accomplish item 4, I had a RegisterStartupScript line that would
cause the thumbnail frame to reload itself. Please note that this setup
works (all items 1-4 work fine) when the frameset is viewed by itself. But
when viewed as a modal dialog, item 4 does not happen... as if the
RegisterStartupScript line isn't executed (but it in fact is). But because I
need to display this as a modal dialog, this arrangement won't work.

I received some advice to get away from a frameset and use IFrames instead.
So I converted the above frameset to be one aspx page that contains two
IFrames (one for thumbnails and the other for the full-size/preview and
upload controls). This is same as before, just with IFrames. Still no dice.

So, at this point I'm thinking it might make sense to have one aspx page
with one IFrame. The aspx page would provide all of the preview/upload
controls, and the IFrame would display the thumbnails. Would this get me all
of items 1-4?

I'd sure appreciate some suggestions that would would give me all of items
1-4 as a modal dialog.

Thanks!!!

-GH



Nov 18 '05 #1
10 2724
Hi,

Try putting:

<BASE target="_self">

In your <head> tag. Also, what isn't it doing? Not posting back? Image
not changing? Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I have a modal dialog that currently does all of the following except item
4.

1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a preview DIV)
2. when users close the dialog, the application receives the URL to the
selected graphic.
3. the modal dialog lets the users upload a new graphic if the dialog does
not present them with one they are already happy with.
4. upon uploading a new graphic, the newly uploaded graphic appears in the
dialog along with the existing thumbnails.

What I started with (and does items 1-3 just fine) was a frameset aspx page that included two frames - one frame for the thumbnails, and another frame
that provided (1) a preview area for the full-sized version of the selected thumbnail, and (2) the controls required for uploading new graphics. In
order to accomplish item 4, I had a RegisterStartupScript line that would
cause the thumbnail frame to reload itself. Please note that this setup
works (all items 1-4 work fine) when the frameset is viewed by itself. But
when viewed as a modal dialog, item 4 does not happen... as if the
RegisterStartupScript line isn't executed (but it in fact is). But because I need to display this as a modal dialog, this arrangement won't work.

I received some advice to get away from a frameset and use IFrames instead. So I converted the above frameset to be one aspx page that contains two
IFrames (one for thumbnails and the other for the full-size/preview and
upload controls). This is same as before, just with IFrames. Still no dice.
So, at this point I'm thinking it might make sense to have one aspx page
with one IFrame. The aspx page would provide all of the preview/upload
controls, and the IFrame would display the thumbnails. Would this get me all of items 1-4?

I'd sure appreciate some suggestions that would would give me all of items
1-4 as a modal dialog.

Thanks!!!

-GH


Nov 18 '05 #2
I tried putting <BASE target="_self"> in (I placed it in the <head> of the
aspx page that contains the IFrames)... no dice.

Specifically, what is not working is that upon uploading a new image, the
page that appears in the thumbFrame does not reload, and therefore users
don't see the thumbnail of the newly uploaded graphic.

Here is the code that I expect would cause the page in thumbFrame to reload.
This code executes in the code-behind module behind the page that loads into
mainFrame.
string scriptString = "<script
language=JavaScript>parent.thumbFrame.location.rel oad(true)</script>";
if(!this.IsClientScriptBlockRegistered("clientScri pt")){
this.RegisterStartupScript("clientScript", scriptString);
}

Here is all the code in the ASPX page that contains the IFrames (there is no
code-behind logic for this page):
<%@ Page %>
<%@ OutputCache Location="none" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Select Image</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<BASE target="_self">
</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0">
<form id="Form1" method="post" runat="server">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="225px">
<iframe id="thumbFrame" name="thumbFrame" src="SelectAssetThumbs.aspx"
frameborder="0" scrolling="auto" style="width: 225px; height:
410px"></iframe>
</td>
<td width="100%">
<iframe id="mainFrame" name="mainFrame" src="SelectAssetFull.aspx"
frameborder="0" scrolling="no" style="width: 100%; height: 410px"></iframe>
</td>
</tr>
</table>
</form>
</body>
</html>

Thanks for any guidance on making this work!

-GH

"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
Hi,

Try putting:

<BASE target="_self">

In your <head> tag. Also, what isn't it doing? Not posting back? Image
not changing? Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I have a modal dialog that currently does all of the following except item 4.

1. lets users select a graphic from a list of thumbnails (and when selected,
displays the full-size image in a preview DIV)
2. when users close the dialog, the application receives the URL to the
selected graphic.
3. the modal dialog lets the users upload a new graphic if the dialog does not present them with one they are already happy with.
4. upon uploading a new graphic, the newly uploaded graphic appears in the dialog along with the existing thumbnails.

What I started with (and does items 1-3 just fine) was a frameset aspx

page
that included two frames - one frame for the thumbnails, and another frame that provided (1) a preview area for the full-sized version of the

selected
thumbnail, and (2) the controls required for uploading new graphics. In
order to accomplish item 4, I had a RegisterStartupScript line that would cause the thumbnail frame to reload itself. Please note that this setup
works (all items 1-4 work fine) when the frameset is viewed by itself. But when viewed as a modal dialog, item 4 does not happen... as if the
RegisterStartupScript line isn't executed (but it in fact is). But because I
need to display this as a modal dialog, this arrangement won't work.

I received some advice to get away from a frameset and use IFrames

instead.
So I converted the above frameset to be one aspx page that contains two
IFrames (one for thumbnails and the other for the full-size/preview and
upload controls). This is same as before, just with IFrames. Still no

dice.

So, at this point I'm thinking it might make sense to have one aspx page
with one IFrame. The aspx page would provide all of the preview/upload
controls, and the IFrame would display the thumbnails. Would this get me

all
of items 1-4?

I'd sure appreciate some suggestions that would would give me all of

items 1-4 as a modal dialog.

Thanks!!!

-GH



Nov 18 '05 #3
Well, if your married to a modal dialog. . .

At least with IE, dialogs do not support navigation (nor refresh). Hence
the dialog will not refresh itself and thus display the new thumbnail after a
post (or postback). I'm not sure of the behavior of iframes embedded on a
dialog

I'm not even sure if the posting of the new thumbnail via a dialog will
succeed. . .but, if so, perhaps 1 of the following solutions would work:

1) When the user posts the new file, close the dialog and return a value
that flags the code that opened the dialog to redisplay the dialog.

2) Generate the list of thumbnails dynamically using client-side code.
There are a number of ways to do this with IE. But for a browser independent
method, I'd populate/repopulate an xml object/tag using an ASPX file with a
Response.ContentType="text/xml" and use the resulting xml structure to
build/rebuild the thumbnail list.

"Guadala Harry" wrote:
I have a modal dialog that currently does all of the following except item
4.

1. lets users select a graphic from a list of thumbnails (and when selected,
displays the full-size image in a preview DIV)
2. when users close the dialog, the application receives the URL to the
selected graphic.
3. the modal dialog lets the users upload a new graphic if the dialog does
not present them with one they are already happy with.
4. upon uploading a new graphic, the newly uploaded graphic appears in the
dialog along with the existing thumbnails.

What I started with (and does items 1-3 just fine) was a frameset aspx page
that included two frames - one frame for the thumbnails, and another frame
that provided (1) a preview area for the full-sized version of the selected
thumbnail, and (2) the controls required for uploading new graphics. In
order to accomplish item 4, I had a RegisterStartupScript line that would
cause the thumbnail frame to reload itself. Please note that this setup
works (all items 1-4 work fine) when the frameset is viewed by itself. But
when viewed as a modal dialog, item 4 does not happen... as if the
RegisterStartupScript line isn't executed (but it in fact is). But because I
need to display this as a modal dialog, this arrangement won't work.

I received some advice to get away from a frameset and use IFrames instead.
So I converted the above frameset to be one aspx page that contains two
IFrames (one for thumbnails and the other for the full-size/preview and
upload controls). This is same as before, just with IFrames. Still no dice.

So, at this point I'm thinking it might make sense to have one aspx page
with one IFrame. The aspx page would provide all of the preview/upload
controls, and the IFrame would display the thumbnails. Would this get me all
of items 1-4?

I'd sure appreciate some suggestions that would would give me all of items
1-4 as a modal dialog.

Thanks!!!

-GH



Nov 18 '05 #4
I do have modal dialogs elsewhere in thet app that do in fact support
refresh (meaning in my case that that they process a button click
server-side and display the results in the modal dialog); the trick in
getting modal dialogs to process postbacks without opening a new window is
to make the modal dialog a frameset. That's how I get it to work in my other
scenarios. The only difference with my current issue is that instead of
processing a postback and redisplaying all for the same page, I'm now
attempting to process the postback in one page and attempting to have it
return a startup client-side instruction (via RegisterStartupScript) that
causes a different page in the frameset (or in a different IFrame) to reload
itself. This is where it falls apart. It behaves as if the instruction in
RegisterStartupScript is never processed in the client. FWIW: If this exact
same page/frameset (or "IFrame set") is opened by itself (i.e., *not* as a
modal dialog), then it all works just fine. But I really need for it to be a
modal dialog.

I appreciate your ideas and they might prove useful in a different scenario,
but the current requirements I'm working with are that the dialog remains
open, giving the user the opportunity to upload additional graphics without
interrupting their workflow.

Cheers!

GH
"Matthew Lea" <Ma********@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com...
Well, if your married to a modal dialog. . .

At least with IE, dialogs do not support navigation (nor refresh). Hence
the dialog will not refresh itself and thus display the new thumbnail after a post (or postback). I'm not sure of the behavior of iframes embedded on a
dialog

I'm not even sure if the posting of the new thumbnail via a dialog will
succeed. . .but, if so, perhaps 1 of the following solutions would work:

1) When the user posts the new file, close the dialog and return a value
that flags the code that opened the dialog to redisplay the dialog.

2) Generate the list of thumbnails dynamically using client-side code.
There are a number of ways to do this with IE. But for a browser independent method, I'd populate/repopulate an xml object/tag using an ASPX file with a Response.ContentType="text/xml" and use the resulting xml structure to
build/rebuild the thumbnail list.

"Guadala Harry" wrote:
I have a modal dialog that currently does all of the following except item 4.

1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a preview DIV)
2. when users close the dialog, the application receives the URL to the
selected graphic.
3. the modal dialog lets the users upload a new graphic if the dialog does not present them with one they are already happy with.
4. upon uploading a new graphic, the newly uploaded graphic appears in the dialog along with the existing thumbnails.

What I started with (and does items 1-3 just fine) was a frameset aspx page that included two frames - one frame for the thumbnails, and another frame that provided (1) a preview area for the full-sized version of the selected thumbnail, and (2) the controls required for uploading new graphics. In
order to accomplish item 4, I had a RegisterStartupScript line that would cause the thumbnail frame to reload itself. Please note that this setup
works (all items 1-4 work fine) when the frameset is viewed by itself. But when viewed as a modal dialog, item 4 does not happen... as if the
RegisterStartupScript line isn't executed (but it in fact is). But because I need to display this as a modal dialog, this arrangement won't work.

I received some advice to get away from a frameset and use IFrames instead. So I converted the above frameset to be one aspx page that contains two
IFrames (one for thumbnails and the other for the full-size/preview and
upload controls). This is same as before, just with IFrames. Still no dice.
So, at this point I'm thinking it might make sense to have one aspx page
with one IFrame. The aspx page would provide all of the preview/upload
controls, and the IFrame would display the thumbnails. Would this get me all of items 1-4?

I'd sure appreciate some suggestions that would would give me all of items 1-4 as a modal dialog.

Thanks!!!

-GH



Nov 18 '05 #5
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:O8*************@TK2MSFTNGP12.phx.gbl...
I tried putting <BASE target="_self"> in (I placed it in the <head> of the
aspx page that contains the IFrames)... no dice.


Yeah - I've never got that to work either...
Nov 18 '05 #6
>
Yeah - I've never got that to work either...


So, any other ideas? It's hard to think I've actually hit some wall and
can't get this functionality.

-GH
Nov 18 '05 #7
Hi,

You need to but <Base target="_self"> into the .Aspx page that shows up in
the frame. Not the page that contains the IFrames, it needs to go in the
page that is posting back to itself. Also, if the newly uploaded thumbnail
has the same name as the old one you may need to add an arguement to the
name or it will display the old image. <img src="mygif.gif?arg=1"> then
when you change the image <img src="mygif.gif?arg=2">. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:O8*************@TK2MSFTNGP12.phx.gbl...
I tried putting <BASE target="_self"> in (I placed it in the <head> of the
aspx page that contains the IFrames)... no dice.

Specifically, what is not working is that upon uploading a new image, the
page that appears in the thumbFrame does not reload, and therefore users
don't see the thumbnail of the newly uploaded graphic.

Here is the code that I expect would cause the page in thumbFrame to reload. This code executes in the code-behind module behind the page that loads into mainFrame.
string scriptString = "<script
language=JavaScript>parent.thumbFrame.location.rel oad(true)</script>";
if(!this.IsClientScriptBlockRegistered("clientScri pt")){
this.RegisterStartupScript("clientScript", scriptString);
}

Here is all the code in the ASPX page that contains the IFrames (there is no code-behind logic for this page):
<%@ Page %>
<%@ OutputCache Location="none" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Select Image</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<BASE target="_self">
</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0">
<form id="Form1" method="post" runat="server">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="225px">
<iframe id="thumbFrame" name="thumbFrame" src="SelectAssetThumbs.aspx"
frameborder="0" scrolling="auto" style="width: 225px; height:
410px"></iframe>
</td>
<td width="100%">
<iframe id="mainFrame" name="mainFrame" src="SelectAssetFull.aspx"
frameborder="0" scrolling="no" style="width: 100%; height: 410px"></iframe> </td>
</tr>
</table>
</form>
</body>
</html>

Thanks for any guidance on making this work!

-GH

"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
Hi,

Try putting:

<BASE target="_self">

In your <head> tag. Also, what isn't it doing? Not posting back? Image
not changing? Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I have a modal dialog that currently does all of the following except item 4.

1. lets users select a graphic from a list of thumbnails (and when

selected,
displays the full-size image in a preview DIV)
2. when users close the dialog, the application receives the URL to the selected graphic.
3. the modal dialog lets the users upload a new graphic if the dialog does not present them with one they are already happy with.
4. upon uploading a new graphic, the newly uploaded graphic appears in the dialog along with the existing thumbnails.

What I started with (and does items 1-3 just fine) was a frameset aspx

page
that included two frames - one frame for the thumbnails, and another frame that provided (1) a preview area for the full-sized version of the

selected
thumbnail, and (2) the controls required for uploading new graphics. In order to accomplish item 4, I had a RegisterStartupScript line that would cause the thumbnail frame to reload itself. Please note that this setup works (all items 1-4 work fine) when the frameset is viewed by itself. But when viewed as a modal dialog, item 4 does not happen... as if the
RegisterStartupScript line isn't executed (but it in fact is). But because
I
need to display this as a modal dialog, this arrangement won't work.

I received some advice to get away from a frameset and use IFrames

instead.
So I converted the above frameset to be one aspx page that contains two IFrames (one for thumbnails and the other for the full-size/preview and upload controls). This is same as before, just with IFrames. Still no

dice.

So, at this point I'm thinking it might make sense to have one aspx page with one IFrame. The aspx page would provide all of the preview/upload
controls, and the IFrame would display the thumbnails. Would this get

me all
of items 1-4?

I'd sure appreciate some suggestions that would would give me all of

items 1-4 as a modal dialog.

Thanks!!!

-GH




Nov 18 '05 #8
Hi Ken,

I did as you suggest - (put <base target="_self"> into the <head> of the
pages that show up in the IFrames; all pages involved here now have that)...
still no dice. But after additional testing, I think the problem actually
has nothing to do with the page posting back to itself. Here's what I did to
eliminate the Postback issue as a possible explanation:
I placed the following in the page that shows up in mainFrame:

<input type="button" value="Refresh Thumbs"
onclick="parent.thumbFrame.location.reload(true)" >

When the frameset is viewed by itself (i.e., not modal), clicking that
button causes the page in thumbFrame to reload. But when the frameset is
opened as a modal dialog, the page in thumbFrame does not reload when that
button is clicked. Because that button is hard-coded into the page, that
eliminates the whole postback issue. It appears that there is something
about a modal dialog box that prevents that simple onclick statement to
execute.

Any ideas? or is it time to give up on this functionality working in a modal
dialog?

Thanks!

-GH


"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:O%****************@TK2MSFTNGP11.phx.gbl...
Hi,

You need to but <Base target="_self"> into the .Aspx page that shows up in
the frame. Not the page that contains the IFrames, it needs to go in the
page that is posting back to itself. Also, if the newly uploaded thumbnail has the same name as the old one you may need to add an arguement to the
name or it will display the old image. <img src="mygif.gif?arg=1"> then
when you change the image <img src="mygif.gif?arg=2">. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:O8*************@TK2MSFTNGP12.phx.gbl...
I tried putting <BASE target="_self"> in (I placed it in the <head> of the
aspx page that contains the IFrames)... no dice.

Specifically, what is not working is that upon uploading a new image, the page that appears in the thumbFrame does not reload, and therefore users
don't see the thumbnail of the newly uploaded graphic.

Here is the code that I expect would cause the page in thumbFrame to reload.
This code executes in the code-behind module behind the page that loads

into
mainFrame.
string scriptString = "<script
language=JavaScript>parent.thumbFrame.location.rel oad(true)</script>";
if(!this.IsClientScriptBlockRegistered("clientScri pt")){
this.RegisterStartupScript("clientScript", scriptString);
}

Here is all the code in the ASPX page that contains the IFrames (there is no
code-behind logic for this page):
<%@ Page %>
<%@ OutputCache Location="none" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Select Image</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<BASE target="_self">
</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0">
<form id="Form1" method="post" runat="server">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="225px">
<iframe id="thumbFrame" name="thumbFrame" src="SelectAssetThumbs.aspx"
frameborder="0" scrolling="auto" style="width: 225px; height:
410px"></iframe>
</td>
<td width="100%">
<iframe id="mainFrame" name="mainFrame" src="SelectAssetFull.aspx"
frameborder="0" scrolling="no" style="width: 100%; height: 410px"></iframe>
</td>
</tr>
</table>
</form>
</body>
</html>

Thanks for any guidance on making this work!

-GH

"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
Hi,

Try putting:

<BASE target="_self">

In your <head> tag. Also, what isn't it doing? Not posting back?

Image not changing? Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> I have a modal dialog that currently does all of the following except item
> 4.
>
> 1. lets users select a graphic from a list of thumbnails (and when
selected,
> displays the full-size image in a preview DIV)
> 2. when users close the dialog, the application receives the URL to the > selected graphic.
> 3. the modal dialog lets the users upload a new graphic if the
dialog
does
> not present them with one they are already happy with.
> 4. upon uploading a new graphic, the newly uploaded graphic appears
in the
> dialog along with the existing thumbnails.
>
> What I started with (and does items 1-3 just fine) was a frameset
aspx page
> that included two frames - one frame for the thumbnails, and another

frame
> that provided (1) a preview area for the full-sized version of the
selected
> thumbnail, and (2) the controls required for uploading new graphics.

In > order to accomplish item 4, I had a RegisterStartupScript line that

would
> cause the thumbnail frame to reload itself. Please note that this setup > works (all items 1-4 work fine) when the frameset is viewed by itself. But
> when viewed as a modal dialog, item 4 does not happen... as if the
> RegisterStartupScript line isn't executed (but it in fact is). But

because
I
> need to display this as a modal dialog, this arrangement won't work.
>
> I received some advice to get away from a frameset and use IFrames
instead.
> So I converted the above frameset to be one aspx page that contains two > IFrames (one for thumbnails and the other for the full-size/preview and > upload controls). This is same as before, just with IFrames. Still
no dice.
>
> So, at this point I'm thinking it might make sense to have one aspx

page > with one IFrame. The aspx page would provide all of the preview/upload > controls, and the IFrame would display the thumbnails. Would this
get me all
> of items 1-4?
>
> I'd sure appreciate some suggestions that would would give me all of

items
> 1-4 as a modal dialog.
>
> Thanks!!!
>
> -GH
>
>
>
>
>
>
>



Nov 18 '05 #9
Hi,

You could try:

onclick = ' parent.thumbFrame.location.href = "page.aspx" '

Or maybe call a function in the thumbFrame page and have it use:

self.location.reload() or self.location.href.....

I think you'll just need to play around with it till you find the right
combination. Also, the reload(true) mimics the refresh button. Meaning
that it will use the same querystring and etc. as it did when it was loaded.
What this also means, is that if the page is in its state because of a
postback. Doing a reload will redo that postback. In both cases if you set
a breakpoint on your page load event for the page in the thumbFrame you will
see that it will hit your breakpoint. So you might want to step through it
and maybe override the render event so you can take a snapshot of what it is
sending to the browser. Maybe even try loading a simple html page in that
frame and seeing if you can get that to reload will help you with some clues
as to what is going on. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Ken,

I did as you suggest - (put <base target="_self"> into the <head> of the
pages that show up in the IFrames; all pages involved here now have that)... still no dice. But after additional testing, I think the problem actually
has nothing to do with the page posting back to itself. Here's what I did to eliminate the Postback issue as a possible explanation:
I placed the following in the page that shows up in mainFrame:

<input type="button" value="Refresh Thumbs"
onclick="parent.thumbFrame.location.reload(true)" >

When the frameset is viewed by itself (i.e., not modal), clicking that
button causes the page in thumbFrame to reload. But when the frameset is
opened as a modal dialog, the page in thumbFrame does not reload when that
button is clicked. Because that button is hard-coded into the page, that
eliminates the whole postback issue. It appears that there is something
about a modal dialog box that prevents that simple onclick statement to
execute.

Any ideas? or is it time to give up on this functionality working in a modal dialog?

Thanks!

-GH


"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:O%****************@TK2MSFTNGP11.phx.gbl...
Hi,

You need to but <Base target="_self"> into the .Aspx page that shows up in
the frame. Not the page that contains the IFrames, it needs to go in the page that is posting back to itself. Also, if the newly uploaded thumbnail
has the same name as the old one you may need to add an arguement to the
name or it will display the old image. <img src="mygif.gif?arg=1"> then when you change the image <img src="mygif.gif?arg=2">. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:O8*************@TK2MSFTNGP12.phx.gbl...
I tried putting <BASE target="_self"> in (I placed it in the <head> of the aspx page that contains the IFrames)... no dice.

Specifically, what is not working is that upon uploading a new image, the page that appears in the thumbFrame does not reload, and therefore users don't see the thumbnail of the newly uploaded graphic.

Here is the code that I expect would cause the page in thumbFrame to

reload.
This code executes in the code-behind module behind the page that loads into
mainFrame.
string scriptString = "<script
language=JavaScript>parent.thumbFrame.location.rel oad(true)</script>";
if(!this.IsClientScriptBlockRegistered("clientScri pt")){
this.RegisterStartupScript("clientScript", scriptString);
}

Here is all the code in the ASPX page that contains the IFrames (there is
no
code-behind logic for this page):
<%@ Page %>
<%@ OutputCache Location="none" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Select Image</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"> <BASE target="_self">
</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0">
<form id="Form1" method="post" runat="server">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="225px">
<iframe id="thumbFrame" name="thumbFrame" src="SelectAssetThumbs.aspx"
frameborder="0" scrolling="auto" style="width: 225px; height:
410px"></iframe>
</td>
<td width="100%">
<iframe id="mainFrame" name="mainFrame" src="SelectAssetFull.aspx"
frameborder="0" scrolling="no" style="width: 100%; height:

410px"></iframe>
</td>
</tr>
</table>
</form>
</body>
</html>

Thanks for any guidance on making this work!

-GH

"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
> Hi,
>
> Try putting:
>
> <BASE target="_self">
>
> In your <head> tag. Also, what isn't it doing? Not posting back?

Image
> not changing? Good luck! Ken.
>
> --
> Ken Dopierala Jr.
> For great ASP.Net web hosting try:
> http://www.webhost4life.com/default.asp?refid=Spinlight
> If you sign up under me and need help, email me.
>
> "Guadala Harry" <GM**@NoSpam.com> wrote in message
> news:%2****************@TK2MSFTNGP09.phx.gbl...
> > I have a modal dialog that currently does all of the following

except item
> > 4.
> >
> > 1. lets users select a graphic from a list of thumbnails (and when
> selected,
> > displays the full-size image in a preview DIV)
> > 2. when users close the dialog, the application receives the URL to the
> > selected graphic.
> > 3. the modal dialog lets the users upload a new graphic if the dialog does
> > not present them with one they are already happy with.
> > 4. upon uploading a new graphic, the newly uploaded graphic
appears in the
> > dialog along with the existing thumbnails.
> >
> > What I started with (and does items 1-3 just fine) was a frameset aspx > page
> > that included two frames - one frame for the thumbnails, and
another frame
> > that provided (1) a preview area for the full-sized version of the
> selected
> > thumbnail, and (2) the controls required for uploading new graphics.
In
> > order to accomplish item 4, I had a RegisterStartupScript line
that would
> > cause the thumbnail frame to reload itself. Please note that this

setup
> > works (all items 1-4 work fine) when the frameset is viewed by

itself. But
> > when viewed as a modal dialog, item 4 does not happen... as if the
> > RegisterStartupScript line isn't executed (but it in fact is). But
because
> I
> > need to display this as a modal dialog, this arrangement won't work. > >
> > I received some advice to get away from a frameset and use IFrames
> instead.
> > So I converted the above frameset to be one aspx page that contains two
> > IFrames (one for thumbnails and the other for the
full-size/preview
and
> > upload controls). This is same as before, just with IFrames. Still no > dice.
> >
> > So, at this point I'm thinking it might make sense to have one
aspx page
> > with one IFrame. The aspx page would provide all of the

preview/upload > > controls, and the IFrame would display the thumbnails. Would this

get
me
> all
> > of items 1-4?
> >
> > I'd sure appreciate some suggestions that would would give me all

of items
> > 1-4 as a modal dialog.
> >
> > Thanks!!!
> >
> > -GH
> >
> >
> >
> >
> >
> >
> >
>
>



Nov 18 '05 #10
Bingo! Got it!

Your most recent suggestion is what worked - specifically:
' parent.thumbFrame.location.href = "page.aspx" '

It probably helps that none of the pages involved in this modal dialog
scenario requires a querystring or client-side parameters in order to
display the correct information - as all of that comes from server-side
logic via each page's respective code-behind. All I have to do is cause the
page to reload itself and the updated information is served up from the
database.

I really appreciate you hanging in there with me on this one... taking the
time...

-GH


"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
Hi,

You could try:

onclick = ' parent.thumbFrame.location.href = "page.aspx" '

Or maybe call a function in the thumbFrame page and have it use:

self.location.reload() or self.location.href.....

I think you'll just need to play around with it till you find the right
combination. Also, the reload(true) mimics the refresh button. Meaning
that it will use the same querystring and etc. as it did when it was loaded. What this also means, is that if the page is in its state because of a
postback. Doing a reload will redo that postback. In both cases if you set a breakpoint on your page load event for the page in the thumbFrame you will see that it will hit your breakpoint. So you might want to step through it and maybe override the render event so you can take a snapshot of what it is sending to the browser. Maybe even try loading a simple html page in that
frame and seeing if you can get that to reload will help you with some clues as to what is going on. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Ken,

I did as you suggest - (put <base target="_self"> into the <head> of the
pages that show up in the IFrames; all pages involved here now have that)...
still no dice. But after additional testing, I think the problem actually
has nothing to do with the page posting back to itself. Here's what I did to
eliminate the Postback issue as a possible explanation:
I placed the following in the page that shows up in mainFrame:

<input type="button" value="Refresh Thumbs"
onclick="parent.thumbFrame.location.reload(true)" >

When the frameset is viewed by itself (i.e., not modal), clicking that
button causes the page in thumbFrame to reload. But when the frameset is
opened as a modal dialog, the page in thumbFrame does not reload when
that button is clicked. Because that button is hard-coded into the page, that
eliminates the whole postback issue. It appears that there is something
about a modal dialog box that prevents that simple onclick statement to
execute.

Any ideas? or is it time to give up on this functionality working in a

modal
dialog?

Thanks!

-GH


"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:O%****************@TK2MSFTNGP11.phx.gbl...
Hi,

You need to but <Base target="_self"> into the .Aspx page that shows up in the frame. Not the page that contains the IFrames, it needs to go in the page that is posting back to itself. Also, if the newly uploaded thumbnail
has the same name as the old one you may need to add an arguement to
the name or it will display the old image. <img src="mygif.gif?arg=1"> then when you change the image <img src="mygif.gif?arg=2">. Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:O8*************@TK2MSFTNGP12.phx.gbl...
> I tried putting <BASE target="_self"> in (I placed it in the <head> of the
> aspx page that contains the IFrames)... no dice.
>
> Specifically, what is not working is that upon uploading a new
image,
the
> page that appears in the thumbFrame does not reload, and therefore users > don't see the thumbnail of the newly uploaded graphic.
>
> Here is the code that I expect would cause the page in thumbFrame to
reload.
> This code executes in the code-behind module behind the page that loads into
> mainFrame.
> string scriptString = "<script
>
language=JavaScript>parent.thumbFrame.location.rel oad(true)</script>"; > if(!this.IsClientScriptBlockRegistered("clientScri pt")){
> this.RegisterStartupScript("clientScript", scriptString);
> }
>
> Here is all the code in the ASPX page that contains the IFrames (there is
no
> code-behind logic for this page):
> <%@ Page %>
> <%@ OutputCache Location="none" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
> "http://www.w3.org/TR/html4/frameset.dtd">
> <html>
> <head>
> <title>Select Image</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> > <BASE target="_self">
> </head>
> <body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0">
> <form id="Form1" method="post" runat="server">
> <table border="0" cellpadding="0" cellspacing="0">
> <tr>
> <td width="225px">
> <iframe id="thumbFrame" name="thumbFrame"
src="SelectAssetThumbs.aspx" > frameborder="0" scrolling="auto" style="width: 225px; height:
> 410px"></iframe>
> </td>
> <td width="100%">
> <iframe id="mainFrame" name="mainFrame" src="SelectAssetFull.aspx"
> frameborder="0" scrolling="no" style="width: 100%; height:
410px"></iframe>
> </td>
> </tr>
> </table>
> </form>
> </body>
> </html>
>
> Thanks for any guidance on making this work!
>
> -GH
>
>
>
> "Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
> news:eT**************@tk2msftngp13.phx.gbl...
> > Hi,
> >
> > Try putting:
> >
> > <BASE target="_self">
> >
> > In your <head> tag. Also, what isn't it doing? Not posting back?
Image
> > not changing? Good luck! Ken.
> >
> > --
> > Ken Dopierala Jr.
> > For great ASP.Net web hosting try:
> > http://www.webhost4life.com/default.asp?refid=Spinlight
> > If you sign up under me and need help, email me.
> >
> > "Guadala Harry" <GM**@NoSpam.com> wrote in message
> > news:%2****************@TK2MSFTNGP09.phx.gbl...
> > > I have a modal dialog that currently does all of the following

except
> item
> > > 4.
> > >
> > > 1. lets users select a graphic from a list of thumbnails (and when > > selected,
> > > displays the full-size image in a preview DIV)
> > > 2. when users close the dialog, the application receives the URL

to the
> > > selected graphic.
> > > 3. the modal dialog lets the users upload a new graphic if the

dialog
> does
> > > not present them with one they are already happy with.
> > > 4. upon uploading a new graphic, the newly uploaded graphic appears
in
> the
> > > dialog along with the existing thumbnails.
> > >
> > > What I started with (and does items 1-3 just fine) was a frameset aspx
> > page
> > > that included two frames - one frame for the thumbnails, and another > frame
> > > that provided (1) a preview area for the full-sized version of
the > > selected
> > > thumbnail, and (2) the controls required for uploading new

graphics. In
> > > order to accomplish item 4, I had a RegisterStartupScript line that > would
> > > cause the thumbnail frame to reload itself. Please note that this setup
> > > works (all items 1-4 work fine) when the frameset is viewed by

itself.
> But
> > > when viewed as a modal dialog, item 4 does not happen... as if the > > > RegisterStartupScript line isn't executed (but it in fact is). But > because
> > I
> > > need to display this as a modal dialog, this arrangement won't work. > > >
> > > I received some advice to get away from a frameset and use IFrames > > instead.
> > > So I converted the above frameset to be one aspx page that contains two
> > > IFrames (one for thumbnails and the other for the full-size/preview and
> > > upload controls). This is same as before, just with IFrames.
Still no
> > dice.
> > >
> > > So, at this point I'm thinking it might make sense to have one aspx page
> > > with one IFrame. The aspx page would provide all of the

preview/upload
> > > controls, and the IFrame would display the thumbnails. Would
this get
me
> > all
> > > of items 1-4?
> > >
> > > I'd sure appreciate some suggestions that would would give me

all of > items
> > > 1-4 as a modal dialog.
> > >
> > > Thanks!!!
> > >
> > > -GH
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #11

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: 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...
0
by: Nonoy of Philippines | last post by:
Hello, guys... I'm just starting to develop web applications and I have this problem regarding Session objects At some parts of my application, I open modal dialog window which also opens...
3
by: Rod | last post by:
I have an asp.net application where some of the interaction with the user is through modal dialog windows. This works very well except for the annoying fact that the dialog window always returns...
2
by: jamie | last post by:
I have a class that based on a timer will pop up a dialog based on a lasped amount of time. The problem is that in the timer elapsed event I create and use ShowDialog to show the timeout form:...
1
by: wendy | last post by:
I have got a problem while using the modal dialogs. In my code I need to open a modal dialog from the parent page and I need to enter some values in the dialog and save it. It takes the values...
5
by: Dmitry Akselrod | last post by:
Hi Everyone, I am working in VB.NET, Framework v.1.0. I have tons of forms in my application. I have a situation, where a form starts another form as a Modal Dialog. The Modal Dialog then...
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...
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...
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
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,...
0
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...
0
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...
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...
0
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,...
0
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...

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.