469,323 Members | 1,517 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

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 1245
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.