Baheerbagh Baheerbagh - 1 month ago 8
Ajax Question

How can i send two parameters using ajax url

i am trying two send two values to new page i am new to jquery how can i concatinate them:


The Error is in location line ('')


here my ajax code:

success: function (response) {
if(response["success"]==true)
{
$("#showMessage").html(response['message']);
location = '/learningcurve/gdpi.php?jobid=='+response["id"]'&jobname=='+response["jobname"];
window.open(location);


enter image description here

Answer

try this one

success: function (response) {
if(response["success"]==true)
{
    $("#showMessage").html(response['message']);
    location = "/learningcurve/gdpi.php?jobid="+response["id"]+"&jobname="+response["jobname"];
     window.open(location);
Comments