|
-
Sep 6th, 2000, 12:01 PM
#1
Thread Starter
Member
Hi guys,
In my [main.asp] file at some point I have the following code:
<script language='JavaScript'>
NickName=document.Info.NickName;
Application('Nick Name')=NickName <<------ doesn't work?
.
.
.
My problem is that I can't assign the value an ASP variable (server variable) to a script variable, my question how can solve this?
Waiting for your appreciated answers,
poor Wesam!
-
Sep 7th, 2000, 12:27 AM
#2
Remember ASP gets parsed before javascript. So when you assign the application asp variable a client side javascript value it will always be blank if they both reside in the same physical file.
-
Sep 7th, 2000, 12:35 AM
#3
Frenzied Member
If you are generating the server-side variable and need to just pass it into the page so it is available on the client side, just create the Javascript code using response.write statements.
If you are trying to do the opposite, and assign something from the client side into a server-side variable, you will most likely need to either refresh the page using querystrings or use a form and submit the form to the same page and put server side code to handle if the page has been submitted.
Hope that helps and.. well.. makes sense..
/\/\onte96
-
Sep 7th, 2000, 03:00 AM
#4
Thread Starter
Member
Thank you, I solved the problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|