|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
JavaScript - Interact with ASP
Hi there i am new here. I just wanted to know how to interact with an ASP page using JavaScript. For example if i want to run a certain method in ASP through a JavaScript file. I think these "<% ... %>" have to be used but im really new to JavaScript so i am not sure.
Please Help. Thanks. |
|
#2
|
||||
|
||||
|
You can't run ASP code within JavaScript, but you can certainly include ASP variables as described:
Code:
<html>
...
<%
str_Name = "Mike"
%>
<script language="JavaScript">
alert('<%= str_Name %>');
</script>
...
</html>
ETA And equally you can run full fragments of ASP code as you have already suggested
__________________
selwonk |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > JavaScript - Interact with ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
![]() |
|