473,804 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing data to use with client javascript

Hello,

I need to pass the contents of a dataset to the client in order to use these
contents with javascript.

What is the best way to achieve that?

Normally I use controls like a grid or text boxes and then I read the values
using javascript objects.

Any other ideas? Greatly appreciated.

Thanks,
Alfredo
Nov 18 '05 #1
1 2014
Alfredo,

I often find myself using javascript arrays to accomplish this. You can
create the arrays manually or try the Page.RegisterAr rayDecleration method.
Multi dimensional arrays really aren't an option in Javascript, but, nested
arrays are. Here's an example from classic ASP of transfering an array ... I
like filling arrays like this because you can access the items like:
arrApprovers[ ApproverID ].FullName ....

var arrApprovers = new Array();
<%if IsArray(arrAppr overs) then %>
<% for counter = 0 to UBound(arrAppro vers,2) %>
arrApprovers['<%=arrApprover s(0,counter)%>'] = new Array();
arrApprovers['<%=arrApprover s(0,counter)%>']['FullName'] =
'<%=JSClean(arr Approvers(1,cou nter))%>';
arrApprovers['<%=arrApprover s(0,counter)%>']['Title'] =
'<%=JSClean(arr Approvers(3,cou nter))%>';
<% next %>
<% end if %>

Alex Papadimoulis

"Alfredo Magallón Arbizu" <am********@ful lstep.com> wrote in message
news:OR******** ******@TK2MSFTN GP09.phx.gbl...
Hello,

I need to pass the contents of a dataset to the client in order to use these contents with javascript.

What is the best way to achieve that?

Normally I use controls like a grid or text boxes and then I read the values using javascript objects.

Any other ideas? Greatly appreciated.

Thanks,
Alfredo

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4346
by: Raju V.K | last post by:
can I use javascript and PHP in the following manner to create a pop-up window: <--- in <head> </head> <script language=javascript> function popup(folder1, file1) { window1=open("solution.php?folder=folder1&file=file1"); }
2
10863
by: Gung Ho | last post by:
I am using ASP to open a text file on the server and I want to pass variables to Javascript. Any suggestions? For example - I have a text file on the server defining a set of pictures. I open the text file to retrieve the list of files. I want to pass the list of files to the Javascript which will then display the data on the client machine.
6
1866
by: KKramsch | last post by:
OK, here's the scenario: I have a CGI script that generates a page with frames (BTW, I'm not crazy about frames, but in this case the decision to use them is out of my hands). In a typical session, the user interacts with two of these frames extensively, and up to the very end of the session, this interaction is handled entirely client-side by a fairly elaborate JavaScript script. (This interaction takes place exclusively via HTML...
10
2475
by: vbMark | last post by:
Hello, I am doing this: window.location="page2.php?subj="+subj+"&body="+body; to send information to another page. However, I don't want that second page to show up or display in any way. There is only behind-the-scenes work going on in that page.
8
3688
by: Mike Fellows | last post by:
Ok, im not sure if this is at all possible and if it is how i go about it is beyond me i have a piece of client side code that requires a piece of data from the server side (an ID number in this case) how can i pass the data from one side to the other, or retrieve it from the webform on the client side? i hope ive explained this properly
6
1482
by: Jerry Camel | last post by:
Basic Web Form... A few text boxes and a checkbox - and a card reader... The effect I want to accomplish is this: The basic credit card fields are there and can be filled out. But if the user swipes the card, I want to fill out the fields automatically and make them read only. (So far I can do this.) But I also want a checkbox to appear that indicates the card was swiped. The user can clear the checkbox, re-enabling the fields so...
22
25610
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to compile. <WebMethod()> _ Public Function VerifySku(ByVal skus As XmlDataDocument) As DataSet Test program : Dim cartSet As DataSet cartSet = ws.VerifySku(cartSet)
1
2503
by: Eric Capps | last post by:
This may be more of a Java question, but I feel that JavaScript experts may be more qualified to help me find a solution. In short: is it possible to call a Java method from JavaScript, passing as an argument a JavaScript array (in my case, an array of doubles)? Supposing I have array x containing only doubles, I have tried: document.MyApplet.myMethod(x); But the method only ever seems to receive "null" as an argument.
4
3853
by: Nathan Sokalski | last post by:
I am a beginner with AJAX, and have managed to learn how to use it when passing single parameters, but I want to return more than one value to the client-side JavaScript function that displays it. My client-side JavaScript function takes 4 parameters (which are expected to be integers). The idea of passing a single parameter and parsing it on the client has occurred to me, but since I am sure I am not the only person who has situations that...
4
4171
by: moondaddy | last post by:
I have a htm page where I need to pass some data to an aspx page as a means of sending data to the database. I don't need to see the aspx page so I was going to put it in a hidden iframe. This works real good. Since I don't need the aspx page to do any postback, is there a way to pass a parameter to it with out it finishing the round trip back to the htm page? Thanks. -- moondaddy@newsgroup.nospam
0
9715
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9595
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
9176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7643
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
5536
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...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
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
2
3836
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3003
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.