Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I mix VBScript in JAVAScript or vice versa? 1

Status
Not open for further replies.

chenwenjun

Technical User
Nov 9, 2002
58
RW
How can I mix VBScript in JAVAScript or vice versa?

We know with <%@ language=JAVAScript%>, we only can use once ...
How can we use a mixed combination?? &quot;Learn till the last breath.&quot;
 
[tt]
You don't mix them in the same line. IF your coding in VBScript you would declare your page with:
<%@LANGUAGE=&quot;VBSCRIPT&quot;%>
<html>
<form method=&quot;POST&quot; action=&quot;&quot; name=&quot;form1&quot;>
<table width=&quot;100%&quot; height=&quot;0%&quot; align=&quot;left&quot;>
<tr valign=&quot;baseline&quot;>
<td width=&quot;10%&quot; height=&quot;16%&quot; align=&quot;right&quot; nowrap> <p>Prefix:</p></td><td width=&quot;29%&quot; bgcolor=&quot;#D8D6E0&quot;> <input type=&quot;text&quot; name=&quot;prefix&quot; STYLE=&quot;font-size:9pt;font-family:eek:cr a extended;color:#336699&quot; value=&quot;&quot; size=&quot;5&quot;>
</td>
</table>
<br>
<input type=&quot;hidden&quot; name=&quot;MM_insert&quot; value=&quot;form1&quot;>
</form>
'Let's assume I had a form and wanted to use javascript to set focus to the prefix field then I would do like below. Notice I declare the function to be javascript here not at the top of the page.
<script language=&quot;javascript&quot;>
<!--
document.form1.prefix.focus();
//-->
</script>


</html>

winlogo.gif
cool.gif

ASP Questions? go to:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top