I don't know anything about JScript so I'm going to assume javascript.
You can create an internal form element, and then populate it
in turn with <input type=hidden fields ...> for each of the name/value
pairs that you want. I'd make a variable argument function:
constructInternalForm (method, action, target, name1, val1, name2, val2,
....)
which returns the form object, then just submit it.
In case you haven't done it before, down near the bottom of the page
on
http://www.devguru.com/Technologies/.../obj_node.html
you can see a list of useful methods by which to construct your internal
form
(the appendChild doesn't quite match the way I use it).
Csaba Gabor
PS. Here's a starter kit,
<BODY id=myBod>
<SCRIPT type='text/javascript'>
var myBod = document.getElementById('myBod');
var myForm = document.createElement("FORM");
myForm.id = "internalForm";
myForm.target = "iframeName";
myForm = myBod.appendChild(myForm);
var myInput = document.createElement("INPUT");
myInput.name = "firstName";
myInput.type = "hidden";
myInput.value = "Hi Mom";
myForm.appendChild(myInput);
alert(document.getElementById('internalForm')[0].value);
</SCRIPT>
</BODY>
"Robert Diamond" <-r***@anti.spam.com> wrote in message
news:e3******************@news04.bloor.is.net.cabl e.rogers.com...
Hey guys (and girls ;)),
I want to create some form data and submit
it to the cgi script without having any (DOM) document loaded up. Is there
a way in jscript to say... (probably something like...)
var myFormObject = new document(actionHref, encryptType, etc...,
nameOfFormField, valueOfFormField, etc...);
myFormObject.submit();
I could always write a litle html file with a body of hidden fields and
set thier values (ie: window.chathtm.form.field = whatever), but i don't
really want the overhead of downloading the extra page... ok, that's
a lie... i'm anal and just want to not load the htm file ;)
So all i want is to submit a form (and it's data) to a cgi script, using
jscript, without actually having an html file (it's from a frame based so
the
jscript is running from the top window, and the cgi script is in a
frameset window)