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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP window.open not working without activating pop up blokker

Status
Not open for further replies.

leifoet

Technical User
Jan 31, 2016
203
0
0
BE
The FP-code below works only if the user turns off the pop up blocker. This is very annoying.

<!--#include file="_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT * FROM members WHERE (username = '::username::' AND password = '::password::')"
fp_sDefault="username=&password="
fp_sDataConn="TEST"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice="username"
fp_sMenuValue="username"
fp_iDisplayCols=19
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<%Session("uid")=cStr(fp_rs("member-ID"))
%>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
<%
IF Session("UID")&"" = "" then ' the session is empty
response.redirect("url_exit.htm")
ELSE
url = "zyx5.htm"
response.write("<script>" & vbCrLf)
response.write("window.open('" & url & "');" & vbCrLf)
response.write("</script>")
END IF

Is it possible to make the code work without the pop up problem ?
Thanks for tips.




 
Code:
"window.open('" & url & "');

Is a question for forum216 NOT ASP.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Sorry for the wrong forum.
I do not understand it so well:
is "window.open('" & url & "');
not the same as response.write("window.open('" & url & "');" & vbCrLf)

 
response.write("text") sends a text stream to the connected browser, in this case it is sending a line of javascript.

ASP runs on the server so cannot open a browser window directly.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Do I have to change something about this code to avoid the popup question ?
response.write("window.open('" & url & "');" & vbCrLf)

Thanks
 
This is what pop-blockers are intended to stop, so no.

Use CSS and trigger the display of an high z-index, absolutely positioned block element.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top