how to jScript into one line?

W

~webmaster

here is an axample of what i need......
in ASP i can finish this line with an asp variable like below
mytext variable would contain a string like "Pop_up()"
<body Onload = <%=mytext%>>
so using ASP i can complete my onload statement.
I need a way to do this using a variable in Javascript.
How can this be done?
Thanx :)
 
E

Evertjan.

~webmaster wrote on 11 sep 2003 in comp.lang.javascript:
here is an axample of what i need......
in ASP i can finish this line with an asp variable like below
mytext variable would contain a string like "Pop_up()"
<body Onload = <%=mytext%>>
so using ASP i can complete my onload statement.
I need a way to do this using a variable in Javascript.
How can this be done?
Thanx :)

since ASP can be either jscript or vbscript:

vbscript:

<body Onload = <%=mytext%>>

jscript:

<%@language="JScript"%>
......
<body Onload = <%=mytext%>>
 
D

d kirk

But <%=MyMsg%> this is a VB expression... is it also a JS one? Does this
mean Document.write?
 
E

Evertjan.

d kirk wrote on 12 sep 2003 in comp.lang.javascript:
But <%=MyMsg%> this is a VB expression... is it also a JS one?

I think it is both. Please be my guest and try.
Does this mean Document.write?

It is shorthand ASP, doing the same.
 

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

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,219
Latest member
Geraldine7

Latest Threads

Top