474,044 Members | 2,374 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pass ASP recordset field to Javascript function

2 New Member
I am working in asp
and i want to pass recordset cconsist name
how can i pass it to javascript function
i have written following

Expand|Select|Wrap|Line Numbers
  1. <a onclick="FunPickValue(<%=rsbooks.fields(1)%>,<%=SessionAttID%>);" style="text-decoration: underline; color: #0000FF "> <%=rsbooks("bookid")%>&nbsp;</a>
but it gives error
of missing ")"
Jul 20 '07 #1
4 2599
acoder
16,027 Recognized Expert Moderator MVP
Changed the thread title.

Please read the guidelines on choosing a good thread title.
Jul 20 '07 #2
acoder
16,027 Recognized Expert Moderator MVP
I am working in asp
and i want to pass recordset cconsist name
how can i pass it to javascript function
i have written following

Expand|Select|Wrap|Line Numbers
  1. <a onclick="FunPickValue(<%=rsbooks.fields(1)%>,<%=SessionAttID%>);" style="text-decoration: underline; color: #0000FF "> <%=rsbooks("bookid")%>&nbsp;</a>
but it gives error
of missing ")"
Put the values in single quotes (if it's a string). You may also need to escape any double quotes in the field value.
Jul 20 '07 #3
dhavalkvaria
2 New Member
sir
this is my td
it gives error
I wont be able to find it
plz help

Expand|Select|Wrap|Line Numbers
  1. <td> <div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><a onclick="FunPickValue(<%=rsbooks("bookname")%>,<%=SessionAttID%>);" style="text-decoration: underline; color: #0000FF "> <%=rsbooks("bookid")%>&nbsp;</a></font></div></td>
Jul 20 '07 #4
pbmods
5,821 Recognized Expert Expert
Heya, dhavalkvaria. Welcome to TSDN!

What does your source look like after ASP is done with it (i.e., if you load the page in your browser and then view the page source, what does the code you posted look like)?
Jul 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

15
3131
by: Sue Barth | last post by:
Hi all, I hope I'm in the right ng for this... I made an .asp page that allows users to toggle thru a directory of photos. The page accomplishes the following: selects a directory of photos based on a drop down uses the fso to obtain the # of photos in the directory cycles thru the photos w forward and backward buttons that send the pic # with a +1 or -1 value retrieve's & displays the rs's photo description field from a db based
4
13402
by: Sunny | last post by:
Hi, I am at present working on a jsp page which has a single text field. Upon entering a value in the field, i am trigerring an onChangeEvent() which calls a method of javascript. I am also dynamically creating an array in the jsp page and want to pass this array (by reference) to the javascript function. All I want to do in the javascript function is to check whether the input value matches with any of the array elements. However, i have...
3
2622
by: John Kenickney | last post by:
I use ASP/Javascript. I pull a date from a recordset field like this. var theDate = new Date() theDate = rs.Fields.Item("date").value Now I want to apply the method toLocaleString(). There are 2 things I can think of 1) change my code to var theDate = new Date()
3
2474
by: quickcur | last post by:
Hi, I am writing a javascript function. The idea is this very similar to the "color picker": 1. You have a html page where you have many text fields. Suppose each of them is a child's name. Besides each of the text fields you have a button. 2. If you click the button, my javascript function will open a new browser window. In that window, I will show other names that are very similar to this one. 3. If user selects a new name in this...
5
5904
by: Henrik | last post by:
The problem is (using MS Access 2003) I am unable to retrieve long strings (255 chars) from calculated fields through a recordset. The data takes the trip in three phases: 1. A custom public function returns a long string. This works. 2. A query has a calculated field based on the custom function above. This works when the query is run directly.
1
2015
by: subah ponraj | last post by:
Hi Am facing a problem while passing Recordset object in a recursive function or to 3rd level of function. Please help. My javascript code is: function fn1() { var connPatient = new ActiveXObject("ADODB.Connection")
5
5763
by: techbuddha | last post by:
Hi new to the forum and visual basic. I am attempting to fix a migration of excel to access. The excel sheets where simple copied as is into access. for example one table lists the academic history from elementary to phd and on to post doctoral work alll on the same row. I want to break that up to have each level of education as a seperate record and then relate that back to the person. i can pull the data into a recordset I can...
1
1471
by: tjjones70 | last post by:
I am trying to load list boxes from an Access database. I'm looking at 3 tables and for each table I'm loading a list box that has current information and another list box that has expired information based on a date/time field in each table. I'm trying to write a function that will do this instead of writing a procedure for each listbox. I can't get the function to use variables for the listbox. Here is what I'm doing. Private Sub InForm() ...
1
3391
by: anniefs | last post by:
hi help me i m so much stuck int he code and i have no time .... i used ASP VBscipt and javascript functions with MS database javascript function add records in MS DB by using ASP vbscript recordset varible when user click the save button then some values save in the database so i write javascript function to add the records... here is the code
0
10337
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
12140
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11602
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
12022
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
11141
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8698
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7868
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6652
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
5416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.