p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 16th, 2004, 03:42 AM
Friend of Wrox
Points: 456, Level: 7
Points: 456, Level: 7 Points: 456, Level: 7 Points: 456, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: Johannesburg, , South Africa.
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky
Default Response.redirect in new window

Hi

I have got a page that redirects users depending on their NT group memebership e.g

Case "Group A"
Response.redirect("Y.asp")

I need to redirect some of them to a page and that needs to open in a new window... This does not seem possible with VBS? Maybe add a JS function? Any sugestions welcome

Regards
Marnus

Such is Life!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old March 16th, 2004, 12:34 PM
planoie's Avatar
Friend of Wrox
Points: 16,368, Level: 55
Points: 16,368, Level: 55 Points: 16,368, Level: 55 Points: 16,368, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Response.Redirect is only going to work within the existing window. Instead, you need to write out some javascript to open the new window when the page is redrawn. Instead of redirecting, you just write out the JS.

window.open(...)

But watch out for popup blockers.

Peter
------------------------------------------------------
Work smarter, not harder.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old July 12th, 2004, 06:07 AM
Friend of Wrox
Points: 456, Level: 7
Points: 456, Level: 7 Points: 456, Level: 7 Points: 456, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: Johannesburg, , South Africa.
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky
Default

Hi

I have been using this method for a while now but it seems like popup stoppers is starting to cause problems. Is there any other way to open a new IE window without the popup stoppers blocking it?

Regards
Marnus
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old July 12th, 2004, 06:23 AM
Friend of Wrox
Points: 1,161, Level: 13
Points: 1,161, Level: 13 Points: 1,161, Level: 13 Points: 1,161, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

There is a target attribute for HREF. You can set its value as _blank to open the link in a new window. For e.g. this link will open in a new window.
<a href="http://www.microsoft.com" target="_blank">Microsoft web site</a>

If you want to submit a form to a new page, the same attribute can be used in form tag.

BTW, could you please give some more details about the particular programming situation ? Then somebody may be able to give you better solution.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old July 12th, 2004, 06:31 AM
Friend of Wrox
Points: 1,222, Level: 13
Points: 1,222, Level: 13 Points: 1,222, Level: 13 Points: 1,222, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2004
Location: Rawalpindi, , Pakistan.
Posts: 322
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

function ak_forecolor()
    {
        var mycolor = showModalDialog(subdirectory + "insertcolors.html", "", ");

    }

this function wil be open a windows of that file


Numan
--------------------------------------------------
Love is the most beautiful thing of this world. So do this !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #6 (permalink)  
Old July 12th, 2004, 11:18 AM
Friend of Wrox
Points: 7,647, Level: 37
Points: 7,647, Level: 37 Points: 7,647, Level: 37 Points: 7,647, Level: 37
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,477
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Marnus,

I too can't think of anything other than Javascript - window.open(...) method to achieve this. May be you can explain more an what you are trying to do, so that one would come up with alternative solutions if any.

_________________________
- Vijay G
Strive for Perfection
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #7 (permalink)  
Old July 13th, 2004, 02:55 AM
Friend of Wrox
Points: 456, Level: 7
Points: 456, Level: 7 Points: 456, Level: 7 Points: 456, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: Johannesburg, , South Africa.
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky
Default

Hi

Thanks for the replies. I have got a customer login page that authenticates on AD Accounts. So if the user logs in I check the group membership. Then I have got a "Select Case" to redirect them to a certian page/build a page depending oj the group. The one page is a Java App that doesnt look nice if it runs on the same page with the frames so I need to open this in a new window.

Regards
Marnus
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #8 (permalink)  
Old July 18th, 2004, 08:30 PM
Authorized User
Points: 35, Level: 1
Points: 35, Level: 1 Points: 35, Level: 1 Points: 35, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: Barrie, Ontario, Canada.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Use a function and call it in place of response.redirect. Like this...

<%
strLocation = "testlink.asp"

 openlink(strLocation) ' replaces response.redirect
function openlink(link)
%>
<SCRIPT language='javascript'>window.open(' <%=strLocation%> ');</SCRIPT>
<%
end function
%>

Of course you can use all the parameters in the javascript for setting the new window, this is just a simple example of doing it in ASP. You could also use response.write inside of the code block instead of switching to HTML to create the function. your choice.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #9 (permalink)  
Old November 29th, 2004, 04:19 PM
Registered User
Points: 2, Level: 1
Points: 2, Level: 1 Points: 2, Level: 1 Points: 2, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Only thing you need to put the link in the js of the function because the function doesnt know what strLocation is.
So like this.

function openlink(link)
        %>
        <SCRIPT language='javascript'>window.open(' <%=link%> ');</SCRIPT>
        <%
    end function

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
response.redirect ava_h .NET Framework 2.0 0 October 18th, 2006 11:21 PM
response.redirect crmpicco Classic ASP Basics 3 February 9th, 2005 01:50 AM
Opening a Pop-up window with Response.Redirect nancy ASP Forms 8 November 9th, 2004 09:54 AM
response.redirect in new window mahulda General .NET 2 September 7th, 2004 11:45 PM
Response.Redirect dhborchardt Classic ASP Basics 4 June 16th, 2003 06:56 AM



All times are GMT -4. The time now is 03:34 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc