Home All Groups Group Topic Archive Search About

No Response Redirect but something like Response Forward?

Author
1 Dec 2006 3:53 PM
marcwentink
This is probably a very simple issue but I cannot find the answer
googling at the moment.

I got this function in a ASP-page VB code


    Private Sub GoToTheOtherWebSite()
        Dim InternetAdresPR As String
        InternetAdresPR = AppSettings.TheOtherWebSite
        Response.Redirect(InternetAdresPR)
    End Sub

Now instead of redirecting to the other website, I want to open a new
browser window with the other website. In HTML I know what to do, but
is there some ASP-VB function to do it from the code, since in HTML I
cannot ask the AppSettings value I think.

Author
1 Dec 2006 4:02 PM
Patrice
Server side you have no concept of a "new window". You could read this
settings server side and create the "client code" that will do that (could
be as simple as an hyperlink whose href attribute is initialized from a
server side value).

--
Patrice

<marcwent***@hotmail.com> a écrit dans le message de news:
1164988433.117034.149***@16g2000cwy.googlegroups.com...
Show quoteHide quote
> This is probably a very simple issue but I cannot find the answer
> googling at the moment.
>
> I got this function in a ASP-page VB code
>
>
>    Private Sub GoToTheOtherWebSite()
>        Dim InternetAdresPR As String
>        InternetAdresPR = AppSettings.TheOtherWebSite
>        Response.Redirect(InternetAdresPR)
>    End Sub
>
> Now instead of redirecting to the other website, I want to open a new
> browser window with the other website. In HTML I know what to do, but
> is there some ASP-VB function to do it from the code, since in HTML I
> cannot ask the AppSettings value I think.
>
Author
1 Dec 2006 6:56 PM
Charlie Brown
This works for popups, watcth the word wrap on the code.

Private Sub popUp(ByVal strURL As String)
            Dim strScript As String = "<Script Language='javascript'>"
& _
            "window.open('" & strURL & "', 'popup', 'toolbar=no,
scrollbars=no, titlebar=no, width=425, height=225');" & _
            "</scr" & "ipt>"
            RegisterClientScriptBlock("Script", strScript)
    End Sub

Patrice wrote:
Show quoteHide quote
> Server side you have no concept of a "new window". You could read this
> settings server side and create the "client code" that will do that (could
> be as simple as an hyperlink whose href attribute is initialized from a
> server side value).
>
> --
> Patrice
>
> <marcwent***@hotmail.com> a écrit dans le message de news:
> 1164988433.117034.149***@16g2000cwy.googlegroups.com...
> > This is probably a very simple issue but I cannot find the answer
> > googling at the moment.
> >
> > I got this function in a ASP-page VB code
> >
> >
> >    Private Sub GoToTheOtherWebSite()
> >        Dim InternetAdresPR As String
> >        InternetAdresPR = AppSettings.TheOtherWebSite
> >        Response.Redirect(InternetAdresPR)
> >    End Sub
> >
> > Now instead of redirecting to the other website, I want to open a new
> > browser window with the other website. In HTML I know what to do, but
> > is there some ASP-VB function to do it from the code, since in HTML I
> > cannot ask the AppSettings value I think.
> >
Author
4 Dec 2006 10:01 AM
marcwentink
Charlie Brown schreef:

> This works for popups, watcth the word wrap on the code.
>
> Private Sub popUp(ByVal strURL As String)
>             Dim strScript As String = "<Script Language='javascript'>"
> & _
>             "window.open('" & strURL & "', 'popup', 'toolbar=no,
> scrollbars=no, titlebar=no, width=425, height=225');" & _
>             "</scr" & "ipt>"
>             RegisterClientScriptBlock("Script", strScript)
>     End Sub

Hey, this works. Can I set a login information cookie like this also,
or do I then have to go as far down as window socket programming? And
if so, is there something like a win socket lib for Visual Basic? For
the best the other website should use the same login information as the
website jumping from.
Author
5 Dec 2006 11:22 PM
Charlie Brown
You can do anything standard javascript code can do, including cookies.

marcwent***@hotmail.com wrote:
Show quoteHide quote
> Charlie Brown schreef:
>
> > This works for popups, watcth the word wrap on the code.
> >
> > Private Sub popUp(ByVal strURL As String)
> >             Dim strScript As String = "<Script Language='javascript'>"
> > & _
> >             "window.open('" & strURL & "', 'popup', 'toolbar=no,
> > scrollbars=no, titlebar=no, width=425, height=225');" & _
> >             "</scr" & "ipt>"
> >             RegisterClientScriptBlock("Script", strScript)
> >     End Sub
>
> Hey, this works. Can I set a login information cookie like this also,
> or do I then have to go as far down as window socket programming? And
> if so, is there something like a win socket lib for Visual Basic? For
> the best the other website should use the same login information as the
> website jumping from.
Author
7 Dec 2006 7:13 AM
marcwentink
Charlie Brown schreef:

> You can do anything standard javascript code can do, including cookies.

Thanks! I once had a project were I used a C win socket library to
include a scanned picture into a html message. In that case there
probably were some options we had to set which were low level. But if a
few cookies can be done with standard javascript then that's a
reassurance. Although that win socket project learned me a lot about
how HTTP works, and was fun in the end when it finallly worked,
constructing a HTTP message from scratch is real error prone, one space
too many at the wrong place and .... failure.

Thanks again for all suggestions, Marc Wentink