0

I have the following code that captures my 'Team_ID' Get parameters and I'm trying to post it to a form on another page via Jquery. I'm using a script that posts a form to another page and I need all of the variables and data that is already in place. Just trying to see how I can pass my 'var teamid' along with form that posts: post("formpage.php?val=1&"+$("#formid").serialize(),

$('#CreateEvent').click(function(){

var $_GET = {};

document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function () {
function decode(s) {
return decodeURIComponent(s.split("+").join(" "));
}

$_GET[decode(arguments[1])] = decode(arguments[2]);
});

var teamid = ($_GET["team_id"]);

 {
$.post("formpage.php?val=1&"+$("#formid").serialize(), {

}

1 Answer 1

1

Just pass it as another querystring parameter.

$.post("formpage.php?val=1&"+$("#formid").serialize() + "&teamid=" + teamid, {

});
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.