|
-
Apr 30th, 2004, 08:34 AM
#1
Thread Starter
Fanatic Member
Mixing asp and Javascript
-
Apr 30th, 2004, 08:43 AM
#2
Frenzied Member
I don't think this can be done. You'd have to use query strings. eg:
the page that loads is:
www.a.com/b.html?p=123
then I think ASP can read that p=123.
Have I helped you? Please Rate my posts. 
-
Apr 30th, 2004, 08:46 AM
#3
Thread Starter
Fanatic Member
thanks mate but i do not really wish to go down the reloading of the page route.
-
Apr 30th, 2004, 10:12 AM
#4
Frenzied Member
well ASP can only work at the server right? (I've never used ASP).
Which means that you are trying to read a JS variable set at the start of the page.
If this variable is a constant (always is 5.6) then you can just make the ASP variable also = 5.6
If the variable is one set on the previous page, then you've had to load a page anyway, so just make ASP read the query string.
I think you need to write a bit more what you're trying to do. where does the variable come from?
Have I helped you? Please Rate my posts. 
-
Apr 30th, 2004, 10:14 AM
#5
Thread Starter
Fanatic Member
Thanks mate the information is dynamic i'm making a query string. So I'm looking at setting a cookie via my Jscript and then reading it into my ASP
-
Apr 30th, 2004, 02:22 PM
#6
Not possible. The ASP is executed while the page is at the server. Then the result is sent to the client. There the JavaScript is executed.
You see, ASP and JavaScript are executed at completely different times and therefore cannot be mixed.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Apr 30th, 2004, 03:55 PM
#7
Frenzied Member
CB, surely ASP can read query strings. Then it can be done that way.
Have I helped you? Please Rate my posts. 
-
Apr 30th, 2004, 06:10 PM
#8
Sure, but they cannot mix. They can be executed serially, never in parallel.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
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
|