I'm still new to the developer aspect and have a few (basic?) questions:
When the user submits a query to the API, the request must be stored in a var and appended to the requested URL, correct? (*NOTE: I've since realized that I don't have to use JS to do this; hence this question is null).
When the client-side receives the response, the JS must define how to handle the returned XML data in order to display it properly? When I start to use innerHTML, this is where I would specify the <div> to display the returned results?
Unfortunately, I put the cart in front of the horse and jumped into AJAX without doing my prep work... And, now I'm a little confused.
In order to get this going, I am not trying to make the following script AJAX-enabled; I'm simply trying to submit the query to the API and display the styled response... So, if someone could offer up some insight, I'd greatly appreciate it.
The form's code is as follows:
Code: Select all
<FORM METHOD="GET"
ACTION="http://api.indeed.com/ads/apisearch?publisher=4200000000000">
<TABLE WIDTH=468 HEIGHT=120 border=0 cellpadding=0 cellspacing=0>
<TR><TD colspan=3 height=15></TR>
<TR>
<TD width=155> </TD>
<TD>
<FONT FACE="Arial, Helvetica" SIZE="1" COLOR="black">
<B>Keywords</B>
</FONT>
</TD>
<TD>
<FONT FACE="Arial, Helvetica" SIZE="1" COLOR="black">
<B>Location</B>
</FONT>
</TD>
</TR>
<TR>
<TD> </TD>
<TD><INPUT TYPE="TEXT" name="Keyword" size="18" maxlength="100"
value=""></TD>
<TD>
<SELECT name=RegionList>
<option value="" selected>[ Select all ] </option>
<option value=1>Alabama</option>
<option value=14>Alaska</option>
<option value=16>Arizona</option>
<option value=15>Arkansas</option>
<option value=17>California</option>
<option value=18>Colorado</option>
<option value=19>Connecticut</option>
<option value=21>Delaware</option>
<option value=20>District Of Columbia</option>
<option value=22>Florida</option>
<option value=23>Georgia</option>
<option value=24>Hawaii</option>
<option value=26>Idaho</option>
<option value=27>Illinois</option>
<option value=28>Indiana</option>
<option value=25>Iowa</option>
<option value=29>Kansas</option>
<option value=30>Kentucky</option>
<option value=31>Louisiana</option>
<option value=34>Maine</option>
<option value=33>Maryland</option>
<option value=32>Massachusetts</option>
<option value=35>Michigan</option>
<option value=36>Minnesota</option>
<option value=38>Mississippi</option>
<option value=37>Missouri</option>
<option value=39>Montana</option>
<option value=42>Nebraska</option>
<option value=46>Nevada </option>
<option value=43>New Hampshire</option>
<option value=44>New Jersey</option>
<option value=45>New Mexico</option>
<option value=47>New York</option>
<option value=40>North Carolina</option>
<option value=41>North Dakota</option>
<option value=48>Ohio</option>
<option value=49>Oklahoma</option>
<option value=50>Oregon </option>
<option value=51>Pennsylvania</option>
<option value=52>Rhode Island</option>
<option value=53>South Carolina</option>
<option value=54>South Dakota</option>
<option value=55>Tennessee</option>
<option value=56>Texas</option>
<option value=57>Utah</option>
<option value=59>Vermont</option>
<option value=58>Virginia</option>
<option value=60>Washington</option>
<option value=62>West Virginia</option>
<option value=61>Wisconsin</option>
<option value=63>Wyoming</option>
</SELECT>
</TD>
<TD>
<INPUT TYPE="image" valign=middle SRC="b_go.gif" BORDER=0
WIDTH=25 HEIGHT=17>
</TD>
</TR>
<TR><TD height=3></TD></TR>
</TABLE>
</FORM>
Is this easier than I'm making it out to be..?
Right now, I could care less about the increased server-load from multiple requests; because, none of that matters if the form doesn't display the results properly, and, inherently, making the site useless.
So, I would truly, greatly appreciate any advice that the community may have to offer. On that note, thank you for your time and assistance.
Sincerely,
Joseph Johnson
"Dro Buddy"