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 Professional
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. 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 Professional 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 10th, 2003, 09:10 AM
Registered User
Join Date: Dec 2003
Location: Kingswinford, West Midlands, United Kingdom.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default rescord set into javascript function

Is it posible to pass a record set created from an sql statment using the "strsubjectrec = rstsubject.GetRows" format in to a a javascript fuction via an "OnChange" form event in asp.
What i am trying to achieve is to change a fixed field value on a form to a matching value, when a user changes another field from a drop down list, both sets of values are obtained from asql database, and as the form contains a considerable number of fields I do not want to recreate the form very time a value is changed.

Thanks in advance

Dave WX
Reply With Quote
  #2 (permalink)  
Old December 10th, 2003, 10:26 AM
Imar's Avatar
Wrox Author
Points: 72,045, Level: 100
Points: 72,045, Level: 100 Points: 72,045, Level: 100 Points: 72,045, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,083
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

I am not 100% sure what you're trying to accomplish.

If your question is whether you can pass the values from the recordset back to a JavaScript function, the answer is: yes you can.

Consider this:

  Dim MyASPVariable
  MyASPVariable = "Hello"

<script language="JavaScript" type="text/javascript">
  var MyJavaScriptVariable = '<%=MyASPVariable%>'

This way, the value of the server variable MyASPVariable will end up as a client side JavaScript variable called MyJavaScriptVariable.

If you combine this with some smart GetRows usage, you can return ready to use JavaScript arrays you can use in your client side code.

Kind regards,


Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote

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
stop current javascript function using javascript sakthi Javascript 3 June 2nd, 2008 03:30 PM
node-set function Bernardo Pacheco XSLT 2 June 19th, 2006 10:45 AM
How to call javascript function from VB function vinod_yadav1919 VB How-To 0 February 13th, 2006 06:03 AM
Javascript SET Method? TSEROOGY Javascript How-To 2 February 7th, 2004 09:20 PM
How to "Set" a function equal to a DataReader DittoToo ASP.NET 1.0 and 1.1 Basics 1 July 1st, 2003 10:15 AM

All times are GMT -4. The time now is 07:47 PM.

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