Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.open method is not opening new window

Status
Not open for further replies.

karthik555

IS-IT--Management
Oct 15, 2002
36
IN
Hi!

A wierd behaviour that I am comming across.

I have a common function in a .JS file which will open a new window.

function windowopen(path,nm,attrb)
{
var filename = CtrlForm.gCFile.value
var newpath = path
hlpwinref = window.open(newpath,nm,attrb)
}

When I call this from my ASP page, the window will be opened. However all of a sudden it is not working.

The function gets executed, but there is no error nor does the new window opening.

Any one has any idea on this.

Thanks in advance

Karthik
 

Are you calling it client-side, or from server-side ASP?

You cannot call the code from server-side ASP.

Maybe you can post your code (or a URL to your code)?


Dan
 
Thanks Dan.
Yes. I am calling it from client side only.

The code is what I have given above.

The way I call above function is like this

PlgFlag = CtrlForm.PlgFlag.value;
LocString ='T_GRNCPrdSL.asp?NewRowId=' + NewRowId+'&PlgFlag='+PlgFlag;
windowopen(LocString, null, "top=0, left=0, height=235, width=760, status=no, toolbar=no, menubar=no, location=no");
 
give the window name something other than null(just a try)

and also try an alert of the path, it may have some special characters that might be the problem...

Known is handfull, Unknown is worldfull
 
I already tried both options.

Still the result is the same.

Thanks for your reply.
 
i guess ur alert doesnt have a special character. so lets make it simple:


LocString ='T_GRNCPrdSL.asp'
windowopen(LocString, null, "top=0, left=0, height=235, width=760, status=no, toolbar=no, menubar=no, location=no");


i have removed the query string wantedly to see if they are the problem, does this open the window???

Known is handfull, Unknown is worldfull
 
Thanks Vbkris.

May sound funny. It is still not working.

I completely bypassed the windowopen function and called window.open. Still it is not working.

However window.open in some other page is working.

Puzzelling.
 

Have you over prototyped the window.open method anywhere?

>> However all of a sudden it is not working.

What did you change between when it was working, and when it stopped working?

Dan
 
I am not able to recollect any signifacnt change in the page or data.

Even simple window.open("test.htm") from that page is not working now.
 
Full code will have lot of dependencies (included files ) etc.

But in short this is how it is written


function PopLocDet()
{
//////THIS FUNCTION WILL BE CALLED IN THE CLICK EVENT OF A BUTTON
PlgFlag = CtrlForm.PlgFlag.value;
LocString ='T_GRNCPrdSL.asp?NewRowId=' + NewRowId+'&PlgFlag='+PlgFlag;
windowopen(LocString, null, "top=0, left=0, height=235, width=760, status=no, toolbar=no, menubar=no, location=no");
}

function windowopen(path,nm,attrb)
{
var filename = CtrlForm.gCFile.value
var newpath = path
hlpwinref = window.open(newpath,nm,attrb)
}
 

You've given us the short version several times, and it's proven fruitless.

If you cannot post complete code, or at least a URL to complete code, then it will be pure guesswork to solve, and will take a lot longer.

If you have no place to host it, sign up for a free Geocities account, or similar.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top