VBScript and JScript

Discussion in 'ASP General' started by Serge Myrand, Jul 14, 2004.

  1. Serge Myrand

    Serge Myrand Guest

    Hi,

    At the top of my ASP page I declare <%@ Language=VBScript %> what do I
    have to write to embed some JScript in that page? Do I have to indicate
    that the code is intended to execute at the client side (if it is the
    case)?

    thank you in advance
    serge
    Serge Myrand, Jul 14, 2004
    #1
    1. Advertising

  2. Serge Myrand

    Serge Myrand Guest

    In fact what I am trying do do is automating a FORM POST

    if Session("Table") = "basket" then
    Session("Table") = "product"
    window.onLoad = document.frmPickProd.submit()
    end if

    this gives the error 'Expected end of statement

    if I put

    <% Language=JScript %>
    <%
    window.onLoad = document.frmPickProd.submit()
    %>

    the error is ' Expected statement

    I tried every form of <% <%@ etc.

    thank's
    serge

    "Aaron [SQL Server MVP]" wrote:

    > > what do I
    > > have to write to embed some JScript in that page?

    >
    > Client-side JScript, or server-side JScript?
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    Serge Myrand, Jul 14, 2004
    #2
    1. Advertising

  3. > what do I
    > have to write to embed some JScript in that page?


    Client-side JScript, or server-side JScript?

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)
    Aaron [SQL Server MVP], Jul 14, 2004
    #3
  4. <%
    if session("Table") = "basket" then
    session("Table") = "product"
    response.write "<script>document.frmPickProd.submit();</script>"
    end if
    %>

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "Serge Myrand" <> wrote in message
    news:...
    > In fact what I am trying do do is automating a FORM POST
    >
    > if Session("Table") = "basket" then
    > Session("Table") = "product"
    > window.onLoad = document.frmPickProd.submit()
    > end if
    >
    > this gives the error 'Expected end of statement
    >
    > if I put
    >
    > <% Language=JScript %>
    > <%
    > window.onLoad = document.frmPickProd.submit()
    > %>
    >
    > the error is ' Expected statement
    >
    > I tried every form of <% <%@ etc.
    >
    > thank's
    > serge
    >
    > "Aaron [SQL Server MVP]" wrote:
    >
    > > > what do I
    > > > have to write to embed some JScript in that page?

    > >
    > > Client-side JScript, or server-side JScript?
    > >
    > > --
    > > http://www.aspfaq.com/
    > > (Reverse address to reply.)

    >
    Aaron [SQL Server MVP], Jul 14, 2004
    #4
    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. Jon Maz
    Replies:
    4
    Views:
    1,245
    Jon Maz
    Sep 9, 2004
  2. Maxwell2006
    Replies:
    5
    Views:
    2,371
    Steven Cheng[MSFT]
    Mar 7, 2006
  3. Christopher Brandsdal

    JScript and VBscript

    Christopher Brandsdal, Dec 18, 2003, in forum: ASP General
    Replies:
    24
    Views:
    283
    Roland Hall
    Dec 31, 2003
  4. Christopher Brandsdal

    VBscript and JScript

    Christopher Brandsdal, Jan 22, 2004, in forum: ASP General
    Replies:
    3
    Views:
    140
    Christopher Brandsdal
    Jan 22, 2004
  5. Eugene Anthony

    window - jscript and vbscript

    Eugene Anthony, Jun 20, 2006, in forum: ASP General
    Replies:
    3
    Views:
    195
    Eugene Anthony
    Jun 21, 2006
Loading...

Share This Page