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

Get Method with javascript array

Reply to Message Icon

Original Message
Name: liliyaw
Date: December 13, 2005 at 16:01:49 Pacific
Subject: Get Method with javascript array
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.


Report Offensive Message For Removal


Response Number 1
Name: SN
Date: December 13, 2005 at 19:50:29 Pacific
Subject: Get Method with javascript array
Reply: (edit)

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


Report Offensive Follow Up For Removal

Response Number 2
Name: liliyaw
Date: December 14, 2005 at 08:57:30 Pacific
Subject: Get Method with javascript array
Reply: (edit)

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?


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Get Method with javascript array 

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge