Launch Pop-Up from ASP

Discussion in 'ASP General' started by scott, Nov 6, 2004.

  1. scott

    scott Guest

    From an asp page, i'm trying to auto-open a pop-up page if something exists.
    I can do this within access via vba using below code.

    Anyone know how I could modify the below js to auto-lauch from asp?

    sPage = "javascript:
    resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/myweb/mypopup.asp"
    sApp = "c:\Program Files\Internet Explorer\iexplore.exe"

    sCommand = sApp & " " & sPage & "'"

    Call Shell(sCommand, 1)
     
    scott, Nov 6, 2004
    #1
    1. Advertising

  2. scott

    Bob Lehmann Guest

    Even if you could get this to work, it would open a browser on the server.
    Is that what you want?

    You certainly can't run executables that are on a user's computer from a web
    page - ASP or otherwise.

    Bob Lehmann

    "scott" <> wrote in message
    news:...
    > From an asp page, i'm trying to auto-open a pop-up page if something

    exists.
    > I can do this within access via vba using below code.
    >
    > Anyone know how I could modify the below js to auto-lauch from asp?
    >
    > sPage = "javascript:
    >

    resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/my
    web/mypopup.asp"
    > sApp = "c:\Program Files\Internet Explorer\iexplore.exe"
    >
    > sCommand = sApp & " " & sPage & "'"
    >
    > Call Shell(sCommand, 1)
    >
    >
     
    Bob Lehmann, Nov 6, 2004
    #2
    1. Advertising

  3. scott

    scott Guest

    i just want my main asp page to open a pop-up page without having to click
    anything.

    this pop-up just exists to set a variable for the main page.

    is this possible?


    "Bob Lehmann" <> wrote in message
    news:...
    > Even if you could get this to work, it would open a browser on the server.
    > Is that what you want?
    >
    > You certainly can't run executables that are on a user's computer from a
    > web
    > page - ASP or otherwise.
    >
    > Bob Lehmann
    >
    > "scott" <> wrote in message
    > news:...
    >> From an asp page, i'm trying to auto-open a pop-up page if something

    > exists.
    >> I can do this within access via vba using below code.
    >>
    >> Anyone know how I could modify the below js to auto-lauch from asp?
    >>
    >> sPage = "javascript:
    >>

    > resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/my
    > web/mypopup.asp"
    >> sApp = "c:\Program Files\Internet Explorer\iexplore.exe"
    >>
    >> sCommand = sApp & " " & sPage & "'"
    >>
    >> Call Shell(sCommand, 1)
    >>
    >>

    >
    >
     
    scott, Nov 6, 2004
    #3
  4. scott

    Jeff Dillon Guest

    You want it to pop up on the server? What if there is no one at the server
    to see it?

    Jeff
    "scott" <> wrote in message
    news:...
    > i just want my main asp page to open a pop-up page without having to click
    > anything.
    >
    > this pop-up just exists to set a variable for the main page.
    >
    > is this possible?
    >
    >
    > "Bob Lehmann" <> wrote in message
    > news:...
    > > Even if you could get this to work, it would open a browser on the

    server.
    > > Is that what you want?
    > >
    > > You certainly can't run executables that are on a user's computer from a
    > > web
    > > page - ASP or otherwise.
    > >
    > > Bob Lehmann
    > >
    > > "scott" <> wrote in message
    > > news:...
    > >> From an asp page, i'm trying to auto-open a pop-up page if something

    > > exists.
    > >> I can do this within access via vba using below code.
    > >>
    > >> Anyone know how I could modify the below js to auto-lauch from asp?
    > >>
    > >> sPage = "javascript:
    > >>

    > >

    resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/my
    > > web/mypopup.asp"
    > >> sApp = "c:\Program Files\Internet Explorer\iexplore.exe"
    > >>
    > >> sCommand = sApp & " " & sPage & "'"
    > >>
    > >> Call Shell(sCommand, 1)
    > >>
    > >>

    > >
    > >

    >
    >
     
    Jeff Dillon, Nov 6, 2004
    #4
  5. scott

    scott Guest

    Let me clarify what I'm doing. If you come to my homepage.asp and no cookie
    is set that determines your language preference, I just want a pop-up to
    launch allowing the user to select the preferred language.

    Does that explain it better? I don't quite understand your question about
    the server being there.


    "Jeff Dillon" <> wrote in message
    news:%...
    > You want it to pop up on the server? What if there is no one at the
    > server
    > to see it?
    >
    > Jeff
    > "scott" <> wrote in message
    > news:...
    >> i just want my main asp page to open a pop-up page without having to
    >> click
    >> anything.
    >>
    >> this pop-up just exists to set a variable for the main page.
    >>
    >> is this possible?
    >>
    >>
    >> "Bob Lehmann" <> wrote in message
    >> news:...
    >> > Even if you could get this to work, it would open a browser on the

    > server.
    >> > Is that what you want?
    >> >
    >> > You certainly can't run executables that are on a user's computer from
    >> > a
    >> > web
    >> > page - ASP or otherwise.
    >> >
    >> > Bob Lehmann
    >> >
    >> > "scott" <> wrote in message
    >> > news:...
    >> >> From an asp page, i'm trying to auto-open a pop-up page if something
    >> > exists.
    >> >> I can do this within access via vba using below code.
    >> >>
    >> >> Anyone know how I could modify the below js to auto-lauch from asp?
    >> >>
    >> >> sPage = "javascript:
    >> >>
    >> >

    > resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/my
    >> > web/mypopup.asp"
    >> >> sApp = "c:\Program Files\Internet Explorer\iexplore.exe"
    >> >>
    >> >> sCommand = sApp & " " & sPage & "'"
    >> >>
    >> >> Call Shell(sCommand, 1)
    >> >>
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     
    scott, Nov 6, 2004
    #5
  6. scott

    Bob Lehmann Guest

    You can't launch it from ASP. You could open a new window from the onload
    event of the body tag, though. But, it would probably be blocked since alot
    of people are disabling that functionality.

    See a client-side scripting group for details.

    Bob Lehmann

    "scott" <> wrote in message
    news:...
    > Let me clarify what I'm doing. If you come to my homepage.asp and no

    cookie
    > is set that determines your language preference, I just want a pop-up to
    > launch allowing the user to select the preferred language.
    >
    > Does that explain it better? I don't quite understand your question about
    > the server being there.
    >
    >
    > "Jeff Dillon" <> wrote in message
    > news:%...
    > > You want it to pop up on the server? What if there is no one at the
    > > server
    > > to see it?
    > >
    > > Jeff
    > > "scott" <> wrote in message
    > > news:...
    > >> i just want my main asp page to open a pop-up page without having to
    > >> click
    > >> anything.
    > >>
    > >> this pop-up just exists to set a variable for the main page.
    > >>
    > >> is this possible?
    > >>
    > >>
    > >> "Bob Lehmann" <> wrote in message
    > >> news:...
    > >> > Even if you could get this to work, it would open a browser on the

    > > server.
    > >> > Is that what you want?
    > >> >
    > >> > You certainly can't run executables that are on a user's computer

    from
    > >> > a
    > >> > web
    > >> > page - ASP or otherwise.
    > >> >
    > >> > Bob Lehmann
    > >> >
    > >> > "scott" <> wrote in message
    > >> > news:...
    > >> >> From an asp page, i'm trying to auto-open a pop-up page if something
    > >> > exists.
    > >> >> I can do this within access via vba using below code.
    > >> >>
    > >> >> Anyone know how I could modify the below js to auto-lauch from asp?
    > >> >>
    > >> >> sPage = "javascript:
    > >> >>
    > >> >

    > >

    resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/my
    > >> > web/mypopup.asp"
    > >> >> sApp = "c:\Program Files\Internet Explorer\iexplore.exe"
    > >> >>
    > >> >> sCommand = sApp & " " & sPage & "'"
    > >> >>
    > >> >> Call Shell(sCommand, 1)
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
     
    Bob Lehmann, Nov 6, 2004
    #6
  7. You need to check the cookie in your server-side code and redirect the user
    to another page if necessary. It is not possible to pop up a window from
    server-side code. The only way to pop up a window is via client-side code,
    which is NOT asp. If you wish to pursue a client-side code solution, then
    post to one of the client-side newsgroups: the one most likely t help is the
    ..scripting.jscript group, although you may want to try one of the groups
    with "dhtml" in their names.

    Bob Barrows

    scott wrote:
    > Let me clarify what I'm doing. If you come to my homepage.asp and no
    > cookie is set that determines your language preference, I just want a
    > pop-up to launch allowing the user to select the preferred language.
    >
    > Does that explain it better? I don't quite understand your question
    > about the server being there.
    >
    >
    > "Jeff Dillon" <> wrote in message
    > news:%...
    >> You want it to pop up on the server? What if there is no one at the
    >> server
    >> to see it?
    >>
    >> Jeff
    >> "scott" <> wrote in message
    >> news:...
    >>> i just want my main asp page to open a pop-up page without having to
    >>> click
    >>> anything.
    >>>
    >>> this pop-up just exists to set a variable for the main page.
    >>>
    >>> is this possible?
    >>>
    >>>
    >>> "Bob Lehmann" <> wrote in message
    >>> news:...
    >>>> Even if you could get this to work, it would open a browser on the
    >>>> server. Is that what you want?
    >>>>
    >>>> You certainly can't run executables that are on a user's computer
    >>>> from a
    >>>> web
    >>>> page - ASP or otherwise.
    >>>>
    >>>> Bob Lehmann
    >>>>
    >>>> "scott" <> wrote in message
    >>>> news:...
    >>>>> From an asp page, i'm trying to auto-open a pop-up page if
    >>>>> something exists. I can do this within access via vba using below
    >>>>> code. Anyone know how I could modify the below js to auto-lauch from
    >>>>> asp? sPage = "javascript:
    >>>>>
    >>>>

    >> resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/my
    >>>> web/mypopup.asp"
    >>>>> sApp = "c:\Program Files\Internet Explorer\iexplore.exe"
    >>>>>
    >>>>> sCommand = sApp & " " & sPage & "'"
    >>>>>
    >>>>> Call Shell(sCommand, 1)


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Nov 6, 2004
    #7
  8. scott

    scott Guest

    thanks guys.

    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > You need to check the cookie in your server-side code and redirect the
    > user to another page if necessary. It is not possible to pop up a window
    > from server-side code. The only way to pop up a window is via client-side
    > code, which is NOT asp. If you wish to pursue a client-side code solution,
    > then post to one of the client-side newsgroups: the one most likely t help
    > is the .scripting.jscript group, although you may want to try one of the
    > groups with "dhtml" in their names.
    >
    > Bob Barrows
    >
    > scott wrote:
    >> Let me clarify what I'm doing. If you come to my homepage.asp and no
    >> cookie is set that determines your language preference, I just want a
    >> pop-up to launch allowing the user to select the preferred language.
    >>
    >> Does that explain it better? I don't quite understand your question
    >> about the server being there.
    >>
    >>
    >> "Jeff Dillon" <> wrote in message
    >> news:%...
    >>> You want it to pop up on the server? What if there is no one at the
    >>> server
    >>> to see it?
    >>>
    >>> Jeff
    >>> "scott" <> wrote in message
    >>> news:...
    >>>> i just want my main asp page to open a pop-up page without having to
    >>>> click
    >>>> anything.
    >>>>
    >>>> this pop-up just exists to set a variable for the main page.
    >>>>
    >>>> is this possible?
    >>>>
    >>>>
    >>>> "Bob Lehmann" <> wrote in message
    >>>> news:...
    >>>>> Even if you could get this to work, it would open a browser on the
    >>>>> server. Is that what you want?
    >>>>>
    >>>>> You certainly can't run executables that are on a user's computer
    >>>>> from a
    >>>>> web
    >>>>> page - ASP or otherwise.
    >>>>>
    >>>>> Bob Lehmann
    >>>>>
    >>>>> "scott" <> wrote in message
    >>>>> news:...
    >>>>>> From an asp page, i'm trying to auto-open a pop-up page if
    >>>>>> something exists. I can do this within access via vba using below
    >>>>>> code. Anyone know how I could modify the below js to auto-lauch from
    >>>>>> asp? sPage = "javascript:
    >>>>>>
    >>>>>
    >>> resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/my
    >>>>> web/mypopup.asp"
    >>>>>> sApp = "c:\Program Files\Internet Explorer\iexplore.exe"
    >>>>>>
    >>>>>> sCommand = sApp & " " & sPage & "'"
    >>>>>>
    >>>>>> Call Shell(sCommand, 1)

    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
     
    scott, Nov 6, 2004
    #8
  9. scott

    scott Guest

    i found scripting.jscript, but couldn't find any dhtml groups, do you know
    any?


    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > You need to check the cookie in your server-side code and redirect the
    > user to another page if necessary. It is not possible to pop up a window
    > from server-side code. The only way to pop up a window is via client-side
    > code, which is NOT asp. If you wish to pursue a client-side code solution,
    > then post to one of the client-side newsgroups: the one most likely t help
    > is the .scripting.jscript group, although you may want to try one of the
    > groups with "dhtml" in their names.
    >
    > Bob Barrows
    >
    > scott wrote:
    >> Let me clarify what I'm doing. If you come to my homepage.asp and no
    >> cookie is set that determines your language preference, I just want a
    >> pop-up to launch allowing the user to select the preferred language.
    >>
    >> Does that explain it better? I don't quite understand your question
    >> about the server being there.
    >>
    >>
    >> "Jeff Dillon" <> wrote in message
    >> news:%...
    >>> You want it to pop up on the server? What if there is no one at the
    >>> server
    >>> to see it?
    >>>
    >>> Jeff
    >>> "scott" <> wrote in message
    >>> news:...
    >>>> i just want my main asp page to open a pop-up page without having to
    >>>> click
    >>>> anything.
    >>>>
    >>>> this pop-up just exists to set a variable for the main page.
    >>>>
    >>>> is this possible?
    >>>>
    >>>>
    >>>> "Bob Lehmann" <> wrote in message
    >>>> news:...
    >>>>> Even if you could get this to work, it would open a browser on the
    >>>>> server. Is that what you want?
    >>>>>
    >>>>> You certainly can't run executables that are on a user's computer
    >>>>> from a
    >>>>> web
    >>>>> page - ASP or otherwise.
    >>>>>
    >>>>> Bob Lehmann
    >>>>>
    >>>>> "scott" <> wrote in message
    >>>>> news:...
    >>>>>> From an asp page, i'm trying to auto-open a pop-up page if
    >>>>>> something exists. I can do this within access via vba using below
    >>>>>> code. Anyone know how I could modify the below js to auto-lauch from
    >>>>>> asp? sPage = "javascript:
    >>>>>>
    >>>>>
    >>> resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/my
    >>>>> web/mypopup.asp"
    >>>>>> sApp = "c:\Program Files\Internet Explorer\iexplore.exe"
    >>>>>>
    >>>>>> sCommand = sApp & " " & sPage & "'"
    >>>>>>
    >>>>>> Call Shell(sCommand, 1)

    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
     
    scott, Nov 7, 2004
    #9
  10. scott

    scott Guest

    is it possible to set an asp cookie and read it with js?

    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > You need to check the cookie in your server-side code and redirect the
    > user to another page if necessary. It is not possible to pop up a window
    > from server-side code. The only way to pop up a window is via client-side
    > code, which is NOT asp. If you wish to pursue a client-side code solution,
    > then post to one of the client-side newsgroups: the one most likely t help
    > is the .scripting.jscript group, although you may want to try one of the
    > groups with "dhtml" in their names.
    >
    > Bob Barrows
    >
    > scott wrote:
    >> Let me clarify what I'm doing. If you come to my homepage.asp and no
    >> cookie is set that determines your language preference, I just want a
    >> pop-up to launch allowing the user to select the preferred language.
    >>
    >> Does that explain it better? I don't quite understand your question
    >> about the server being there.
    >>
    >>
    >> "Jeff Dillon" <> wrote in message
    >> news:%...
    >>> You want it to pop up on the server? What if there is no one at the
    >>> server
    >>> to see it?
    >>>
    >>> Jeff
    >>> "scott" <> wrote in message
    >>> news:...
    >>>> i just want my main asp page to open a pop-up page without having to
    >>>> click
    >>>> anything.
    >>>>
    >>>> this pop-up just exists to set a variable for the main page.
    >>>>
    >>>> is this possible?
    >>>>
    >>>>
    >>>> "Bob Lehmann" <> wrote in message
    >>>> news:...
    >>>>> Even if you could get this to work, it would open a browser on the
    >>>>> server. Is that what you want?
    >>>>>
    >>>>> You certainly can't run executables that are on a user's computer
    >>>>> from a
    >>>>> web
    >>>>> page - ASP or otherwise.
    >>>>>
    >>>>> Bob Lehmann
    >>>>>
    >>>>> "scott" <> wrote in message
    >>>>> news:...
    >>>>>> From an asp page, i'm trying to auto-open a pop-up page if
    >>>>>> something exists. I can do this within access via vba using below
    >>>>>> code. Anyone know how I could modify the below js to auto-lauch from
    >>>>>> asp? sPage = "javascript:
    >>>>>>
    >>>>>
    >>> resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/my
    >>>>> web/mypopup.asp"
    >>>>>> sApp = "c:\Program Files\Internet Explorer\iexplore.exe"
    >>>>>>
    >>>>>> sCommand = sApp & " " & sPage & "'"
    >>>>>>
    >>>>>> Call Shell(sCommand, 1)

    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
     
    scott, Nov 7, 2004
    #10
  11. No, but you can read the value in your server-side code, and then
    response.write it into your client-side code:

    <%
    dim serversidevalue
    serversidevalue="3"
    %>

    <script>
    valuefromserversidecode = "<%=serversidevalue%>"
    //etc.
    </script>

    HTH,
    Bob Barrows

    scott wrote:
    > is it possible to set an asp cookie and read it with js?
    >
    > "Bob Barrows [MVP]" <> wrote in message
    > news:...
    >> You need to check the cookie in your server-side code and redirect
    >> the user to another page if necessary. It is not possible to pop up a
    >> window from server-side code. The only way to pop up a window is via
    >> client-side code, which is NOT asp. If you wish to pursue a
    >> client-side code solution, then post to one of the client-side
    >> newsgroups: the one most likely t help is the .scripting.jscript group,
    >> although you may want to try one of
    >> the groups with "dhtml" in their names.
    >>
    >> Bob Barrows
    >>
    >> scott wrote:
    >>> Let me clarify what I'm doing. If you come to my homepage.asp and no
    >>> cookie is set that determines your language preference, I just want
    >>> a pop-up to launch allowing the user to select the preferred language.
    >>>
    >>> Does that explain it better? I don't quite understand your question
    >>> about the server being there.
    >>>
    >>>
    >>> "Jeff Dillon" <> wrote in message
    >>> news:%...
    >>>> You want it to pop up on the server? What if there is no one at
    >>>> the server
    >>>> to see it?
    >>>>
    >>>> Jeff
    >>>> "scott" <> wrote in message
    >>>> news:...
    >>>>> i just want my main asp page to open a pop-up page without having
    >>>>> to click
    >>>>> anything.
    >>>>>
    >>>>> this pop-up just exists to set a variable for the main page.
    >>>>>
    >>>>> is this possible?
    >>>>>
    >>>>>
    >>>>> "Bob Lehmann" <> wrote in message
    >>>>> news:...
    >>>>>> Even if you could get this to work, it would open a browser on
    >>>>>> the server. Is that what you want?
    >>>>>>
    >>>>>> You certainly can't run executables that are on a user's computer
    >>>>>> from a
    >>>>>> web
    >>>>>> page - ASP or otherwise.
    >>>>>>
    >>>>>> Bob Lehmann
    >>>>>>
    >>>>>> "scott" <> wrote in message
    >>>>>> news:...
    >>>>>>> From an asp page, i'm trying to auto-open a pop-up page if
    >>>>>>> something exists. I can do this within access via vba using
    >>>>>>> below code. Anyone know how I could modify the below js to
    >>>>>>> auto-lauch
    >>>>>>> from asp? sPage = "javascript:
    >>>>>>>
    >>>>>>
    >>>> resizeTo(478,500);moveTo(130,150);document.location.href='http://myserver/my
    >>>>>> web/mypopup.asp"
    >>>>>>> sApp = "c:\Program Files\Internet Explorer\iexplore.exe"
    >>>>>>>
    >>>>>>> sCommand = sApp & " " & sPage & "'"
    >>>>>>>
    >>>>>>> Call Shell(sCommand, 1)

    >>
    >> --
    >> Microsoft MVP - ASP/ASP.NET
    >> Please reply to the newsgroup. This email account is my spam trap so
    >> I don't check it very often. If you must reply off-line, then remove
    >> the "NO SPAM"


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Nov 7, 2004
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    8,532
    Randy Webb
    Feb 4, 2006
  2. Bone Ur
    Replies:
    4
    Views:
    396
    Bone Ur
    Dec 19, 2007
  3. Chris Davoli

    Tool Tip pop up - pop up time is too short

    Chris Davoli, Feb 24, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    480
    Lee Atkinson
    Feb 24, 2009
  4. samppi
    Replies:
    27
    Views:
    494
    David A. Black
    Dec 5, 2007
  5. Madame Blablavatsky
    Replies:
    8
    Views:
    174
    Dr John Stockton
    Sep 16, 2005
Loading...

Share This Page