[Javascript] access to HTTP request entity body

Matthew Pearce mpearce at digitas.com
Tue May 7 05:02:20 CDT 2002


How do you use Javascript to get access to the HTTP request's entity body before a POST.

I know you can submit form with:

  	document.submit();

I also know you can write something like:

	document.write("<input type='hidden' name='foo' value='bar'>");

And I guess if you already have a named node like :
  <input type='hidden' name='id5'>

you can write code like

	function assign(s)
	{
		document.id5 = s;
	}

But can you get access to an array of variables that will be POSTed to the server before they are submitted?
Are they stored in the document object model anywhere. Inotherwords can you write code like this?

	foreach s in document.hiddenvars.names {}

or this:

	document.request.append(name, value);


Thanks,

Matt Pearce



More information about the Javascript mailing list