Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: About JavaScript and ASP together


Message #1 by <sstefe@y...> on Wed, 26 Sep 2001 02:10:20 -0700 (PDT)
Hello people,



I want to ask you about something that is bothering

me.

I have a JavaScript in which i want to create dynamic

from the data base some information. It's possible??

If yes how???



the code looks like:



<script language="javascript">

document.write("test javascript and ASP toghether")

</script>



What i want is to take "test javascript and ASP

toghether" from the data base.

Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 26 Sep 2001 11:27:33 +0100
Yes, you can build up your javascript the same way as you would do HTML



<script language="javascript">

document.write("<%=somevar%>")

</script>



although take care with this approach because if you have a big block of

javascript and lots of ASP tags in it then it can get very messy and

difficult to debug.  A neater approach would be to put your values from ASP

into hidden fields, then use javascript to extract the values from them.



-----Original Message-----

From: sstefe@y... [mailto:sstefe@y...]

Sent: 26 September 2001 10:10

To: ASP Web HowTo

Subject: [asp_web_howto] About JavaScript and ASP together





Hello people,



I want to ask you about something that is bothering

me.

I have a JavaScript in which i want to create dynamic

from the data base some information. It's possible??

If yes how???



the code looks like:



<script language="javascript">

document.write("test javascript and ASP toghether")

</script>



What i want is to take "test javascript and ASP

toghether" from the data base.

  Return to Index