jscript code using a vbscript variable? 
Author Message
 jscript code using a vbscript variable?

First, I'm adding a record to a database which includes a
date.

The date is entered in three menus, day, month and year.

I am using a javascript function to create the menu values
(for example 1 to 31 for the day menu) and select today's
day as the initial value.  This all works fine.

Next, I have a new page to update the database record
which gets the database values from a previous search page
using a VBScript session variable.  I now want to still
produce my menu values for the day of 1 to 31 using
javascript but select the initial value from the VBScript
session variable.

Can I do it this way and, if so, how?  If not, how do I do
it?  Is it just simpler to re-code the day menu of 1 to 31
in VBScript?



Sun, 27 Nov 2005 09:01:20 GMT  
 jscript code using a vbscript variable?
pass the ASP/VBScript variable to your javascript like this

<script language="javascript">
var vbVar = '<%= vbVariable %>';

</script>

and then use it however you like. simple.

________________________________________
I got bored with my old signature,
so I changed it

Atrax. MVP, IIS
http://rtfm.atrax.co.uk/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 27 Nov 2005 11:39:36 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. passing javascript variable into asp variable using vbscript

2. Using Variables in HTML code

3. Using a Jscript variable in HTML

4. How do I change session variables using JScript?

5. Variable uses in an automation type not supported in JScript

6. Accessing SESSION variables in a VBScript block of code

7. Calling JScript function from VBScript code

8. How do I write VBScript code in Jscript

9. Bad error code in jScript but OK in VBscript (why)

10. VBScript -> JScript (CODE)

11. How to use a variable from a JScript in a VBScript in the same asp file

12. Server Side VBScript and JScript sharing variables?

 

 
Powered by phpBB® Forum Software