Click to See Complete Forum and Search --> : Window.open(POST???)


angrytuna
06-04-2003, 04:44 PM
Hello the forum,

I'm trying to pass post variables to a page that isn't in my domain (Search Database). I want to spawn a new window in which this page is to appear, which suggests the window.open function. I'm not sure how to encode variables to be passed via POST this way, however.

Any Suggestions are greatly appreciated.

AT.

brendandonhue
06-04-2003, 05:07 PM
Where are you getting the variables from? A form?
Heres an example, for google.
<script language="javascript">
function google()
{
var google = "http://www.google.com/search?q=";
var query = document.google.search.value;
window.open(google + query)}
</script>
<form name="google" action="javascript:google()">
<input type="text" name="search">
<input type="submit" value="google">
</form>

angrytuna
06-04-2003, 06:10 PM
Does this not pass variables via GET, when you append them directly like that? I was needing to pass via POST.

Thank you for the help, however, and please don't hesitate to shout out if I've misunderstood.
AT

PS: Passing variables by whatever means necessary. Directly appending them to the URL (after escaping them, of course) acts the same as a GET; is there an equivalent encoding to treat them as POST?