|
 |
asp_web_howto thread: Popup Pacifier
Message #1 by "Jim Andrews" <jim@t...> on Wed, 19 Feb 2003 22:27:19
|
|
I have an ASP page that searches a large database, which can take quite a
while. It accepts criteria from an earlier page and passes the results to
another page for display, so there is no visible page. I need to popup a
pacifier page so that browsers don't lose patience while the search
continues. How can I do that?
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 20 Feb 2003 10:59:53 +1100
|
|
Using javascript. Attach it to the onsubmit, or onclick events of the search
page.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Jim Andrews" <jim@t...>
Subject: [asp_web_howto] Popup Pacifier
: I have an ASP page that searches a large database, which can take quite a
: while. It accepts criteria from an earlier page and passes the results to
: another page for display, so there is no visible page. I need to popup a
: pacifier page so that browsers don't lose patience while the search
: continues. How can I do that?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by "Jim Andrews" <jim@t...> on Thu, 20 Feb 2003 16:23:13
|
|
I guess I don't know how to mix java with ASP. Based on several other
answers to similar questions, I've tried this in my search page:
(Above first line of ASP)
<script language="javascript">
obj_PopupWindow;
obj_PopupWindow = window.open('images/scaredmouse.gif');
</script>
(Then, just before ASP redirect line)
<script language="javascript">
obj_PopupWindow.close();
</script>
No popup occurs. What am I doing wrong? Please help!
> Using javascript. Attach it to the onsubmit, or onclick events of the
search
page.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Jim Andrews" <jim@t...>
Subject: [asp_web_howto] Popup Pacifier
: I have an ASP page that searches a large database, which can take quite a
: while. It accepts criteria from an earlier page and passes the results to
: another page for display, so there is no visible page. I need to popup a
: pacifier page so that browsers don't lose patience while the search
: continues. How can I do that?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #4 by "Ken Schaefer" <ken@a...> on Fri, 21 Feb 2003 16:16:09 +1100
|
|
a) Java <> Javascript
b) You need to attach the function to open the window to the Submit button
of the form, so
1) user fills in form
2) user presses submit button
3) browser raises onClick event - your client-side javascript opens a
new window
4) the form is submitted, and redirect/whatever happens
<script type="text/javascript" language="javascript>
<!-- // Hide from browsers that don't support script tags
function openNewWindow(strLocation) {
// watch out for wrapping on next line!!
// unwrap the next line!!
NewWindow=window.open(strLocation, "awindow",
"height=400,width=430,toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,
location=0,left=30,top=30");
}
// -->
</script>
<form>
<input type="submit" onClick=openNewWindow('pleaseWait.htm');>
</form>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Jim Andrews" <jim@t...>
Subject: [asp_web_howto] Re: Popup Pacifier
: I guess I don't know how to mix java with ASP. Based on several other
: answers to similar questions, I've tried this in my search page:
:
: (Above first line of ASP)
:
: <script language="javascript">
: obj_PopupWindow;
: obj_PopupWindow = window.open('images/scaredmouse.gif');
: </script>
:
: (Then, just before ASP redirect line)
:
: <script language="javascript">
: obj_PopupWindow.close();
: </script>
:
: No popup occurs. What am I doing wrong? Please help!
:
: > Using javascript. Attach it to the onsubmit, or onclick events of the
: search
: page.
:
: Cheers
: Ken
:
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: "Jim Andrews" <jim@t...>
: Subject: [asp_web_howto] Popup Pacifier
:
:
: : I have an ASP page that searches a large database, which can take quite
a
: : while. It accepts criteria from an earlier page and passes the results
to
: : another page for display, so there is no visible page. I need to popup a
: : pacifier page so that browsers don't lose patience while the search
: : continues. How can I do that?
:
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:
Message #5 by "Jim Andrews" <jim@t...> on Mon, 24 Feb 2003 16:48:54
|
|
Thanks, Ken. That did the job!
> a) Java <> Javascript
b) You need to attach the function to open the window to the Submit button
of the form, so
1) user fills in form
2) user presses submit button
3) browser raises onClick event - your client-side javascript opens a
new window
4) the form is submitted, and redirect/whatever happens
<script type="text/javascript" language="javascript>
<!-- // Hide from browsers that don't support script tags
function openNewWindow(strLocation) {
// watch out for wrapping on next line!!
// unwrap the next line!!
NewWindow=window.open(strLocation, "awindow",
"height=400,width=430,toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0
,
location=0,left=30,top=30");
}
// -->
</script>
<form>
<input type="submit" onClick=openNewWindow('pleaseWait.htm');>
</form>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Jim Andrews" <jim@t...>
Subject: [asp_web_howto] Re: Popup Pacifier
: I guess I don't know how to mix java with ASP. Based on several other
: answers to similar questions, I've tried this in my search page:
:
: (Above first line of ASP)
:
: <script language="javascript">
: obj_PopupWindow;
: obj_PopupWindow = window.open('images/scaredmouse.gif');
: </script>
:
: (Then, just before ASP redirect line)
:
: <script language="javascript">
: obj_PopupWindow.close();
: </script>
:
: No popup occurs. What am I doing wrong? Please help!
:
: > Using javascript. Attach it to the onsubmit, or onclick events of the
: search
: page.
:
: Cheers
: Ken
:
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: "Jim Andrews" <jim@t...>
: Subject: [asp_web_howto] Popup Pacifier
:
:
: : I have an ASP page that searches a large database, which can take quite
a
: : while. It accepts criteria from an earlier page and passes the results
to
: : another page for display, so there is no visible page. I need to popup
a
: : pacifier page so that browsers don't lose patience while the search
: : continues. How can I do that?
:
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:
|
|
 |