Find Jobs
Hire Freelancers

Assist us in resolving this javascripting issue

$10 USD

Abgesagt
Veröffentlicht vor mehr als 7 Jahren

$10 USD

Bezahlt bei Lieferung
Help needed at [login to view URL] Javascript excerpt: / drag and drop functionality starts here / $('#' + [login to view URL] + ' tbody').sortable({ start: function(event, ui) { [login to view URL] = [login to view URL](); }, stop: function(event, ui) { [login to view URL]("Start position: " + [login to view URL]); [login to view URL]("New position: " + [login to view URL]()); if([login to view URL] != [login to view URL]()) { var table = $('#' + [login to view URL]).DataTable(); var start_row = [login to view URL][0].data(); var end_row = [login to view URL][[login to view URL]()].data(); [login to view URL](start_row); [login to view URL](end_row); /* [login to view URL]("target row id: " + [login to view URL]([login to view URL]()).data('unique_id')); [login to view URL]("target row id: " + [login to view URL]([login to view URL]()).data('unique_id')); $.ajax({ url: postDT.ajax_url, type: 'POST', dataType: 'json', data: { action: 'DTMoveRow', startrow: start_row['id'], endrow: end_row['id'] }, success: function (return_data) { [login to view URL]("success"); [login to view URL](return_data); [login to view URL](return_data['success']); [login to view URL](return_data['error']); wpDataTables[tableid].fnDraw(false); }, error: function(e) { [login to view URL](e); } }); SwapRowValues([login to view URL], [login to view URL],[login to view URL], dttableid, [login to view URL], [login to view URL]()); */ } }, appendTo: "parent", helper: "clone" }).disableSelection(); // drag and drop ui ends here ================================================== The original code, which I was debugging but am now replacing, is the call to SwapRowValues([login to view URL], [login to view URL],[login to view URL], dttableid, [login to view URL], [login to view URL]()); The function I'm eliminating got some data from the database and then invoked php function to do an update, which was failing. My new design will have a much simpler php function that is called from this code snippet. Unfortunately, I'm having trouble getting proper values to pass to my php function. As you can see I'm using [login to view URL] to help me know what is going on. The code above generates an error on the line var start_row = [login to view URL][0].data(); I think the table object must not be getting fetched properly, but I copied its code from the function that used to be called here, substituting the parameters from the function call for the relevant arguments from the function... I'm hoping I did something dumb that a simple code read-through will reveal. But I'd also love to have an experienced javascript debug person help me out with this on the test site.
Projekt-ID: 12575353

Über das Projekt

Remote Projekt
Aktiv vor 7 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten

Über den Kunden

Flagge von UNITED STATES
Waco, United States
5,0
32
Zahlungsmethode verifiziert
Mitglied seit Feb. 13, 2009

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.