Click to See Complete Forum and Search --> : New window popup without Javascript...
Nanwedar
09-29-2004, 01:31 PM
Is it possible to create a popup window without using javascript? I'm writing a ColdFusion app that needs to run with client scripting turned off. Unfortunately, one of the major functions of the app requires my ability to create a popup window from a button click event.
Any ideas? Thanks in advance!
requestcode
09-29-2004, 01:38 PM
Try this:
<a href="http://www.mysite.com" target="_blank">Click Me</a>
russell
09-29-2004, 01:39 PM
No JavaScript, no events.
However, you can open a link in a new window like this:
<A href="myPage.htm" target="newWindow">click me</a>
Wrapping the <A> Tag around an image to simulate a button might solve your problem. The new window will have the same attributes and history list as the originating window
Nanwedar
09-29-2004, 02:34 PM
Oops, I didn't fully explain my dilemna. Here's the javascript function I currently have in place (that needs to go):
function preview(pageID,state,navID)
{
if(navID){
var urlPop = "someURL";
}
else {
var urlPop = "someOtherURL";
}
//OPEN THE POPUP WINDOW
win2 = window.open(urlPop, "");
win2.blur();
win2.focus();
//REFRESH THE CALLING PAGE
var itemlocation = "RefreshThisPageURL";
window.location=itemlocation;
}
So basically the button click triggers a new window to pop up, passing it form data to dynamically generate the URL for the popup window. At the same time, the calling page submits to itself using the same form fields to build the page again.
Is this possible to do without JS? Thanks again!
AFAIK HTML action href can not open more than a single new page, thus it can not open a new page and send data and refresh the self page all the same time.
On the other hand a server-side application can not open more than a single new generated page, that means it can not open a page and a pop-up same time.
I think that you can not achieve your target without javascript...
Maybe you may re-consider the pop-up requirement.