How to append two data in url that has to be passed in jquery -


I am trying to add two IDs in the url but this code is saying 0

 < Code> var url = 'post_comment.php? Userid = '+ $ ('. Post_comment '). Data ('User Id') & amp; 'Postid =' + postid;  

When I try

  var url = 'post_comment.php? Userid = '+ $ ('. Post_comment '). Data ('userid');  

This works

try it out ....

  var url = 'post_comment.php? Userid = '+ $ ('. Post_comment '). Data ('userID') and postid = '+ postid;  

The variable uses the "+" operator to join two strings or strings with Javascript.


Comments

Popular posts from this blog

scala - Play Framework - how to bind form to a session field -

Django Celery - running scheduled tasks -

perl - 'Unquoted string ".." may clash with future reserved word' but only when package is used -