Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 2nd, 2003, 03:54 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default equating javascript and ASP variables

Hi all,

This is a hybrid javascript/ASP page question.

Is it possible to pass data from a javascript variable into an ASP variable (VBScript) on the same page. What is the correct syntax?

I can only get it to work from ASP into javascript, not the other way round.

Any advice is greatly appreciated

GregH
Reply With Quote
  #2 (permalink)  
Old July 2nd, 2003, 05:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: High Wycombe, UK, United Kingdom.
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

The only way you can do it is to write the Javascript variables into a form / querystring which is being submitted to the ASP - you could use something like an IFrame or a New Window to make this almost invisible to the user.
Reply With Quote
  #3 (permalink)  
Old July 2nd, 2003, 08:23 PM
Friend of Wrox
Points: 2,376, Level: 20
Points: 2,376, Level: 20 Points: 2,376, Level: 20 Points: 2,376, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Australia.
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Hidden form fields would be a more stable way to make the form invisible to the user.
Depending on what your needs are you could use js to put all the variables you need into one hidden form field separated by commas.
Use your asp split function to separate them on the server.
More info would help choose the best way.
Reply With Quote
  #4 (permalink)  
Old July 3rd, 2003, 02:42 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks all for the feedback.

Just knowing that the task involves a submission/refresh completely alters my thoughts on the matter.

Many thanks for the advice.

Greg

GregH
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Javascript Variables to Asp.Net? Grumpy ASP.NET 2.0 Basics 4 September 8th, 2006 11:52 PM
Javascript Scope of Variables. minhtam Javascript 2 January 7th, 2006 10:27 PM
Global Variables and ClientSide Javascript haricot Classic ASP Basics 3 September 7th, 2005 10:00 AM
Using VBScript variables in Javascript PL Classic ASP Basics 4 July 29th, 2004 03:05 PM
How Do I Pass 2 Variables in Javascript Lucy Javascript 2 December 13th, 2003 11:25 AM



All times are GMT -4. The time now is 09:36 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.