View previous topic :: View next topic |
Author |
Message |
Rich
Joined: 18 Oct 2004 Posts: 4
|
Posted: Mon Oct 18, 2004 2:37 pm Post subject: How to pass database value from ASP to JS? |
|
|
Hi,
I have a JS function, but one of the values used within this function has to be extracted from a database on my server. How do I pass this value to my JS function, after I extract it in ASP?
Thanks
Rich |
|
Back to top |
|
|
administrator Site Admin
Joined: 01 Oct 2004 Posts: 183
|
Posted: Mon Oct 18, 2004 4:02 pm Post subject: |
|
|
You can mix client-side JavaScript code with server-side ASP/VBscript code. Consider the following example:
Code: |
<script>
function ShowDbValue(){
alert("<%=Your_ASP_Value_Goes_Here%>");
}
</script> |
_________________ Peter
ASP & ASP.NET Articles and Tutorials |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|