VBScript and JScript

S

Serge Myrand

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
 
S

Serge Myrand

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
 
A

Aaron [SQL Server MVP]

<%
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 said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top