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);
You forgot to concatenate:
'+response["id"]+'
Notice the +
.
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);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.