ajax - Pass value to another page using jquery -


this first time post here. have problem on jquery script. goal is, need send values of link page, other page can use value. think using ajax post can job cant result. here code:

$(function() {     var mylink = $('#link');      $('.class').click(function() {         var cell1 = $(this).closest('tr').find('td:eq(4)').text();         var cell2 = $(this).closest('tr').find('td:eq(3)').text();         var cell3 = $(this).closest('tr').find('td:eq(2)').text();          var data = 'cell1=' + cell1 + '&cell2=' + cell2 + 'cell3=' + cell3;      }); }); 

so want know how can send value page clicking table cell using ajax post. want display open new window.

i hope can me this, thank in advance. ;)

if posting values have store them serverside till reach other page, way of doing (assuming #link link)

$(function() {     var mylink = $('#link');      $('.class').click(function() {         var cell1 = $(this).closest('tr').find('td:eq(4)').text();         var cell2 = $(this).closest('tr').find('td:eq(3)').text();         var cell3 = $(this).closest('tr').find('td:eq(2)').text();          var data = 'cell1=' + cell1 + '&cell2=' + cell2 + 'cell3=' + cell3;         var baseurl = "some.page.php" //could         mylink.attr('href',baseurl+"?"+data).click();     }); }); 

now, in order open in new window, use old target="_blank" (on #link solution or 1 of other more proper javascript ways


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -