×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ASP window.open not working without activating pop up blokker

ASP window.open not working without activating pop up blokker

ASP window.open not working without activating pop up blokker

(OP)
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.




RE: ASP window.open not working without activating pop up blokker

CODE

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

Is a question for forum216: Javascript 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.

RE: ASP window.open not working without activating pop up blokker

(OP)
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)

RE: ASP window.open not working without activating pop up blokker

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.

RE: ASP window.open not working without activating pop up blokker

(OP)
Do I have to change something about this code to avoid the popup question ?
response.write("window.open('" & url & "');" & vbCrLf)

Thanks

RE: ASP window.open not working without activating pop up blokker

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.

https://www.w3schools.com/howto/howto_css_modals.a...

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close