TickleMeEmo
Programmer
Or ASP in Javascript
I have a nifty little Javascript that randomly pulls a quote.
The goal is that a user can then send this specific quote to another user's email address.
No problem right?
I'm getting hung up when I try to stick my Javascript variable in ASP, so my sendmail.asp page can send the quote.
pageone.asp has
this
<SCRIPT LANGUAGE="JavaScript">
<!--
var quote = (tips[Math.round(Math.random()*(quote.length - .5))]);
var id =(Math.round(Math.random()*(quote.length - .5)));
document.write(quote);
// -->
</SCRIPT>
then i pass the id in the url to the next page
I now have my id
pagetwo.asp is just a form that collects who its from and who it goes too and who sent it
sendemail.asp?id=whatever the id is
I use Javascript to pull the quote
<!--
varvalue = document.location.search.substring(4);
var quote = (quote[id]);
// -->
</SCRIPT>
This all works
Now i want to declare an asp varible and set it to my javascript variable but I don't know the syntax.
I have a variable in javascrite now call quote and I want it to be equal to a ASp varible called quote.
Can you use ASP inside of javascript or Javascript inside of ASP?
I have a nifty little Javascript that randomly pulls a quote.
The goal is that a user can then send this specific quote to another user's email address.
No problem right?
I'm getting hung up when I try to stick my Javascript variable in ASP, so my sendmail.asp page can send the quote.
pageone.asp has
this
<SCRIPT LANGUAGE="JavaScript">
<!--
var quote = (tips[Math.round(Math.random()*(quote.length - .5))]);
var id =(Math.round(Math.random()*(quote.length - .5)));
document.write(quote);
// -->
</SCRIPT>
then i pass the id in the url to the next page
I now have my id
pagetwo.asp is just a form that collects who its from and who it goes too and who sent it
sendemail.asp?id=whatever the id is
I use Javascript to pull the quote
<!--
varvalue = document.location.search.substring(4);
var quote = (quote[id]);
// -->
</SCRIPT>
This all works
Now i want to declare an asp varible and set it to my javascript variable but I don't know the syntax.
I have a variable in javascrite now call quote and I want it to be equal to a ASp varible called quote.
Can you use ASP inside of javascript or Javascript inside of ASP?