Matt Jameson
Matt Jameson

Reputation: 217

Taking data to a new window with jquery

is possible to take form data to another html page with jquery.

Would the code below be a start?

function login(){

var data = $('#logon').serialize();
$.post('mainApp.html', data, function() { alert('done'); }

);
}

Upvotes: 0

Views: 50

Answers (2)

drneel
drneel

Reputation: 2907

You can use the jquery ajax form plugin to let the form do all the work, and you just specify the options that you want.

JQuery Ajax Form Plugin

Upvotes: 0

Peter Wooster
Peter Wooster

Reputation: 6089

You can send data to a new window by sending it to the server, by using cookies or using local storage.

Upvotes: 1

Related Questions