Computing.Net > Forums > Web Development > Get Method with javascript array

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Get Method with javascript array

Reply to Message Icon

Name: liliyaw
Date: December 13, 2005 at 16:01:49 Pacific
OS: xp
CPU/Ram: 220
Comment:

I want to get some data from a server and store it in a two-dimentional javascript array. I want to use "get" method for it, with a form, but I don't understand the procedure behind it.
Can anyone suggest anything? I'd appreciate any input.



Sponsored Link
Ads by Google

Response Number 1
Name: SN
Date: December 13, 2005 at 19:50:29 Pacific
Reply:

I'm not sure I can envision the scenario here...You want to get some data from a server and store it in javascript, but you want to do it via GET instead of POST?

It sounds like you may be talking about AJAX (Asynchronous Java And XML)...Where you create an xmlhttprequest object with javascript and asynchronously get data from the server - all with no 'postback.' Google Suggest and Google maps are two good examples of the capabilities of AJAX.

More typically, the server just outputs the javascript and the data it will need into the HTML page itself, so javascript doesn't need to make any server requests.

I enjoy AJAX stuff and would be happy to help (particularly if you're using .NET), but you haven't given us enough information to determine which solution is right for your project. If you can give us a little more info on what you're actually trying to accomplish we can give you better answers.

Good luck,
-SN


0

Response Number 2
Name: liliyaw
Date: December 14, 2005 at 08:57:30 Pacific
Reply:

Yes, Ajax is a big word in my project. At this point I used an object made by Active Widgets, asynchronous data loading, that loads xml data, but now I need to load/request plane text from the server that will come in a format of a 2d javascript array, like this:
[[data,data,data],[data,data,data]]
I test my pages in Firefox and IE, so whatever I do, has to work in both browsers.
So, is there a way to load that string of brackets and text and somehow assign it to a javascript array?


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Get Method with javascript array

Dire need of help with javascript www.computing.net/answers/webdevel/dire-need-of-help-with-javascript/1399.html

PHP: sending data via GET method www.computing.net/answers/webdevel/php-sending-data-via-get-method/984.html

Creating javascript arrays in forms www.computing.net/answers/webdevel/creating-javascript-arrays-in-forms/1435.html