Connecting Tech Pros Worldwide Help | Site Map

HELP! pulling information into a website

 
LinkBack Thread Tools Search this Thread
  #1  
Old December 6th, 2005, 09:35 PM
afadich@gmail.com
Guest
 
Posts: n/a
Default HELP! pulling information into a website

Hi,

Please be nice :) I don't exactly know how to explain this or if I am
using the correct terminology.

Some background:

I am working on a signup page for my website. This page has a
javascript src which is a query to a database which returns the results
of the query as a java script array That array then populates all my
drop down menu's(with a function set to be ran upon the <body> being
loaded) so I can update my pricing and services directly from the
database instead of altering my html.

The above is not part of my problem but I am mentioning it because that
query is the EXACT same as the query I need help with but instead of
being static (so I can hardcode it on the website) this query changes
dependent on an address field.


I have a function being called whenever the address field changes, that
function takes the address input and puts it into a URL Query. If I
take that URL and then manually go to the address bar and put in in, it
works. IE I can create the dynamic Query fine I just don't know how to
use it.

MY PROBLEM:

I don't know how to get that java script array into my page so I can
utilize it in functions and build a popup window out of it. If I
create a get form and do document.formname.action = MyURL and then
press the submit button instead of getting that javascript array it
just outputs it on the browser as text.

If further explination is required just let me know.


  #2  
Old December 7th, 2005, 09:55 AM
VK
Guest
 
Posts: n/a
Default Re: HELP! pulling information into a website


afadich@gmail.com wrote:[color=blue]
> Hi,
>
> Please be nice :) I don't exactly know how to explain this or if I am
> using the correct terminology.[/color]

Fine by me but be aware of OTHERS ;-)
[color=blue]
> MY PROBLEM:
>
> I don't know how to get that java script array into my page so I can
> utilize it in functions and build a popup window out of it. If I
> create a get form and do document.formname.action = MyURL and then
> press the submit button instead of getting that javascript array it
> just outputs it on the browser as text.
>
> If further explination is required just let me know.[/color]

Briefly I want to:
1) get data from your server
2) these data should be presented as a JavaScript array
3) getting this data should not reload the current page
4) immediately upon the data is ready you want to repopulate the form
on the current page

Is it correct?

If it is then two blocks will do the job for you:

AJAX will let you to retrieve new data from the server while staying on
the same page.
<http://www.ajaxtoolbox.com>

JSON will let you to stransmit JavaScript objects (including arrays)
back and forth to the server.
<http://www.json.org>

More details could be found in this thread:
<http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/ff0b1ea144e5ee1e/8836d58fbc4405f4#doc_8836d58fbc4405f4>

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.