Käynnissä

Help with an AJAX Request in JQuery

I have a JavaScript file that writes an ID to a cookie value. I'd like to use Ajax to lookup and retrieve the title of the ID.

Here is what I have but don't know how to do the Ajax request. Any help would be appreciated. The Ajax call should replace ProductArray[x] below.

function loadCookieList () {

var CookieValString = $.cookie(CookieName);

var TheHTML = '<li class="nav-header">Saved Listings</li>';

if (CookieValString) {

var ProductArray = [url removed, login to view]('|');

[url removed, login to view]();

for (var x in ProductArray) {

$.ajax({

type:'GET',

url:'/js/[url removed, login to view]',

data:{ProductArray[x]},

success: function(data) {

alert('success');

}

);

TheHTML += '<li style="margin-bottom:6px;"><a style="display:inline;" href="[url removed, login to view]'+ProductArray[x]+'">'+ProductArray[x]+'</a> <span class="Delete" id="'+ProductArray[x]+'"><i class="icon-remove-sign"></i></span></li>';

}

$('.span3 .sidebar-nav').show();

} else {

$('.span3 .sidebar-nav').hide();

}

Taidot: AJAX, Javascript, jQuery / Prototype, PHP

Näytä lisää: jquery ajax php request, li.be, li-be, jquery class, how to get a value in javascript, what is ajax, ajax.js, jquery com, x js, js jquery, http request, help with javascript, php javascript class, display ajax, php jquery file, display url javascript, jquery ajax show hide, ajax hide show, jquery file, javascript url title, retrieve url, javascript hide show, jquery sort php, sign jquery, ajax call

About the Employer:
( 20 reviews ) New York, United States

Projektin tunnus: #1700362

Myönnetty käyttäjälle:

k1ng440

Professional web developer is ready get started right now. Please read my private message for more information.

50 $ USD 1 päivässä
(94 arvostelua)
6.5

4 freelanceria on tarjonnut keskimäärin 39 $ tähän työhön

AStonetech

I could get it done within an hour, let start now

35 $ USD 1 päivässä
(153 arvostelua)
6.6
tauitdnmd

Dear. I can handle & finish this fo you

30 $ USD 0 päivässä
(16 arvostelua)
4.3
desbest

I have done this loads of times!

40 $ USD 1 päivässä
(0 arvostelua)
0.0