JavaScript Array Values

L

Laurent Bugnion

Hi,
Hi

i have the following class

Public Class ShipmentClass
Public RatedShipment As RatedShipmentClass()
Public Class RatedShipmentClass
Public GuaranteedDaysToDelivery As String
Public ScheduledDeliveryTime As String
Public Code As String
Public MonetaryValue As Double
End Class
End Class

in javascript i want to know the values contained

i am using ajax and want to know what the array contains at specific indexes

ex response.value[0] ??? i want to know the monetaryvalue for each row,
assuming there are about 7 rows

TIA
Barry

AJAX doesn't say much about the response format. The server-side service
provider specifies the format.

If you're talking about ASP.NET AJAX (ex ATLAS), then t's not just AJAX,
it's web services, which implies a SOAP formatting of the response.
You'll have a proxy on the server, representing ("translating") the C#
object in a JavaScript object.

If that's the case, check the ASP.NET AJAX documentation. If that's not
the case, then you must give more details about the server-side code.

HTH,
Laurent
 
B

bruce barker \(sqlwork.com\)

this will depend on the ajax library you are using and how (if) it marshals
classes.

-- bruce (sqlwork.com)
 
L

Laurent Bugnion

Hi,
Hi

Thanks for your quick reply, but i think you complketely misundestood my
requirement.

The class i mentioned i returned to the client-side, using AJAX.
All i want to know is, how do i get the various data items using maybe
something like

response.value[0].Code

or whatever , i was getting some errors on the client-side when testing
using the above

Barry

No. I understood what you said very well. But you misunderstood how AJAX
works.

AJAX is not a library, it's a concept. There are many implementations of
AJAX. Including your own, using XmlHttpRequest directly.

a) What do you write to the Response object on the server? XML? SOAP?
b) How do you send the request and get the response?

These two questions are crucial. You didn't give us enough information
to help you with the client-side script.

HTH,
Laurent
 
B

Barry

Hi

i have the following class

Public Class ShipmentClass
Public RatedShipment As RatedShipmentClass()
Public Class RatedShipmentClass
Public GuaranteedDaysToDelivery As String
Public ScheduledDeliveryTime As String
Public Code As String
Public MonetaryValue As Double
End Class
End Class

in javascript i want to know the values contained

i am using ajax and want to know what the array contains at specific indexes

ex response.value[0] ??? i want to know the monetaryvalue for each row,
assuming there are about 7 rows

TIA
Barry
 
B

Barry

Hi

Thanks for your quick reply, but i think you complketely misundestood my
requirement.

The class i mentioned i returned to the client-side, using AJAX.
All i want to know is, how do i get the various data items using maybe
something like

response.value[0].Code

or whatever , i was getting some errors on the client-side when testing
using the above

Barry

Laurent Bugnion said:
Hi,
Hi

i have the following class

Public Class ShipmentClass
Public RatedShipment As RatedShipmentClass()
Public Class RatedShipmentClass
Public GuaranteedDaysToDelivery As String
Public ScheduledDeliveryTime As String
Public Code As String
Public MonetaryValue As Double
End Class
End Class

in javascript i want to know the values contained

i am using ajax and want to know what the array contains at specific
indexes

ex response.value[0] ??? i want to know the monetaryvalue for each row,
assuming there are about 7 rows

TIA
Barry

AJAX doesn't say much about the response format. The server-side service
provider specifies the format.

If you're talking about ASP.NET AJAX (ex ATLAS), then t's not just AJAX,
it's web services, which implies a SOAP formatting of the response. You'll
have a proxy on the server, representing ("translating") the C# object in
a JavaScript object.

If that's the case, check the ASP.NET AJAX documentation. If that's not
the case, then you must give more details about the server-side code.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top