472,119 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

Question - can ASP read javascript variables?

Dear sir,
I am suhas patil to require the answer of given question.
Can you write a programme in ASP or PHP that reads the JavaScript variables?
Oct 11 '07 #1
1 1283
markrawlingson
346 Expert 100+
Yes and no.

It depends what you're trying to use these variables for really. You can't directly reference your javascript variables in any server side language because javascript is a client side language, it is interpreted and executed by the user's browser, where as languages like ASP and PHP are interpreted and executed by the server that the script is being requested from.

However, with the aide of AJAX you could send the variables through a backend form post to a simple php or asp script which can then read the variables using, in asp for example, the request object. You would then use the variables or manipulate them for whatever purpose you are intending, and then return some sort of result back to the javascript that made the request.
Oct 11 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Al | last post: by
2 posts views Thread by Ed Jay | last post: by
27 posts views Thread by the other john | last post: by
2 posts views Thread by MPA | last post: by
5 posts views Thread by Joh | last post: by
7 posts views Thread by Petra Meier | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.