Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Lauching a modeless dialog JSP

Posted 04 Feb 2005 20:33:03
1
has voted
04 Feb 2005 20:33:03 Ted Lorenz posted:
I would like to have my javascript lauch a modeless dialog that is a JSP and each time it is lauched re-execute the JSP and not reload what was previously displayed. Is this possible?

Replies

Replied 04 Feb 2005 23:21:51
04 Feb 2005 23:21:51 Lee Diggins replied:
Hi Ted

Welcome to DMXzone <img src=../images/dmxzone/forum/icon_smile_cool.gif border=0 align=middle>

Can you explain what you mean by a JSP, as the only technology I know as JSP is JavaServer Pages?

Lee Diggins - DMXzone Manager

Sharing Knowledge Saves Valuable Time!!!
Replied 07 Feb 2005 17:24:54
07 Feb 2005 17:24:54 Ted Lorenz replied:
Here's my command in my javascript.

var returnedvalue=showModelessDialog("new_order_test1.jsp",window,"status:false;dialogWidth:500px;dialogHeight:500px;help:no;status:yes;";

The purpose was for the "JSP" to access information in the HTTP session and provide appropriate data in the HTML. It works fine for the first time through. But the second time (say the account changed) the ModelessDialog just redisplays the first call's data. Is it possible to refresh the ModelessDialog to re-execute the "JSP"?
Replied 07 Feb 2005 21:36:30
07 Feb 2005 21:36:30 Lee Diggins replied:
Hi Ted

If you're opening the modeless window a second time and it still shows the non-updated data then you've most likely a cache problem at the browser, add this to the head section of the modeless window:

&lt;META HTTP-EQUIV="Pragma" CONTENT="no-cache"&gt;
&lt;META HTTP-EQUIV="Expires" CONTENT="-1"&gt;

If you're keeping the modeless window open and want it to refresh, add this to the head section of the modeless window:

&lt;META HTTP-EQUIV="Pragma" CONTENT="no-cache"&gt;
&lt;META HTTP-EQUIV="Expires" CONTENT="-1"&gt;
&lt;META HTTP-EQUIV="Refresh" CONTENT="10; URL=www.myWebSite.com/myPage.htm"&gt;

This extra line will refesh the page after 10 seconds and will call the URL specified.

Let us know how you get on Ted.

Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
Lee Diggins - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
Replied 10 Feb 2005 15:43:07
10 Feb 2005 15:43:07 Ted Lorenz replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi Ted

If you're opening the modeless window a second time and it still shows the non-updated data then you've most likely a cache problem at the browser, add this to the head section of the modeless window:

&lt;META HTTP-EQUIV="Pragma" CONTENT="no-cache"&gt;
&lt;META HTTP-EQUIV="Expires" CONTENT="-1"&gt;

If you're keeping the modeless window open and want it to refresh, add this to the head section of the modeless window:

&lt;META HTTP-EQUIV="Pragma" CONTENT="no-cache"&gt;
&lt;META HTTP-EQUIV="Expires" CONTENT="-1"&gt;
&lt;META HTTP-EQUIV="Refresh" CONTENT="10; URL=www.myWebSite.com/myPage.htm"&gt;

This extra line will refesh the page after 10 seconds and will call the URL specified.

Let us know how you get on Ted.

Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
Lee Diggins - <i>DMXzone Manager</i>
&lt;font size="1"&gt;[ Studio MX/MX2004 | ASP -&gt; VBScript/PerlScript/JavaScript | SQL | CSS ]&lt;/font&gt;
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 10 Feb 2005 15:51:00
10 Feb 2005 15:51:00 Ted Lorenz replied:
Lee,

I got interrupted before and replied with your last responce. Sorry.

I added the meta commands for no cache to my code and the dialog box now works perfectly. I was really struggling with how to accomplishing the control I needed in the application at that point. You insight is greatly appreciated.

Thanks for your help.
Ted
Replied 10 Feb 2005 16:21:07
10 Feb 2005 16:21:07 Lee Diggins replied:
Hi Ted

Glad to help.

Another tip regarding the caching of pages in IE. You've probably come across problems with IE caching pages even when told not to, this is to do with a problem in IE and it's 64k buffer. The recommended fix for this is to add another HEAD section to the end of a web page and include the no-cache meta tags, like this:

&lt;/BODY&gt;
&lt;HEAD&gt;
&lt;META HTTP-EQUIV="Pragma" CONTENT="no-cache"&gt;
&lt;META HTTP-EQUIV="Expires" CONTENT="-1"&gt;
&lt;/HEAD&gt;
&lt;/HTML&gt;


Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
Lee Diggins - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>

Reply to this topic