Javascript submit POST request

var doc = window.open(“”);
var html = ‘<html xmlns=”http://www.w3.org/1999/xhtml”>’ +
‘<head><meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /></head>’ +
‘<body>’ +
‘<form action=”http://chart.apis.google.com/chart” method=”POST” id=”post_form” onsubmit=”this.action = “http://chart.apis.google.com/chart?chid=” + (new Date()).getMilliseconds(); return true;”><input type=”hidden” name=”cht” value=”gv”/> <input type=”hidden” name=”chl” value=\”;
html = html + requestContent;
html = html + “‘/></form></html>”;
doc.document.write(html);
doc.document.getElementById(“post_form”).submit()

Advertisement

Leave a Comment

No comments yet.

Comments RSS TrackBack Identifier URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.