How to refer javascript variables in ASP (Classical) ?

Hi,

I have some javascript variables. I want to refer them in Active Server Pages - server side. Can you please let me know how to do that ?

<script language="javascript" type="text/javascript">
int i
int j
</script>

I want to refer these two variables in Active Server Pages (Classical) - server side.

Thanks
milani_lucieAsked:
Who is Participating?
 
John EastonDirectorCommented:
JavaScript is a client side language.  It is executed only in the client browser.

ASP is a server side language.  It is executed on the server and then sent a plain HTML to the browser.  It is possible to manipulate the JavaScript using ASP, but once it is sent to the browser ASP has no access to the data.

Depending on what you want to achieve using AJAX may work.
0
 
milani_lucieAuthor Commented:
Then

CDONTS can accept multiple file attachments ? File attacments may be something like this:

Attachment 1)  http://google.com/Image1.jpg
Attachment 2)  http://Bing.com/Image2.jpg

Can you please provide me the code for this ?

Thanks
0
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
If you don't need to use the variables while the page is loading then you can use your javascript variable to place the value to a vbs variable that you can access when the page is posted or reused.  

You may have a form field for instance and a js value.  Once the page loads, you can use js to fill in the value of your form field.  Then when you post the page, it will be just as if you typed in the data to your field.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.