Click to See Complete Forum and Search --> : form... but no form


PhilgB
02-27-2003, 09:15 AM
Is it possible to send information the same way a form would, without a form? just passing the variables through the http something or other... not sure if it makes any sense...

Nicodemas
02-27-2003, 09:18 AM
You could pass information through the Querystring, too. That gets a bit into server-side langauges, though.

Charles
02-27-2003, 09:18 AM
<a href="http://www.google.com/search?q=bettie+page&sourceid=opera&num=0&ie=utf-8&oe=utf-8">Bettie Page</a>

PhilgB
02-27-2003, 09:22 AM
uh... charles? what the hell was that?
anyway... yeah im using tons of querystrings... was trying to find a way around them... is it possible to send info through POST without a form?

Charles
02-27-2003, 09:52 AM
That was an example of one way to accomplish your stated goal. But if you want to be able to use the "post" method then you will need a form. You do not, however, have to have anything in your form that is displayed by the browser.

Please note, however, that it is your responsibility to keep your page running for the 10% or more people who do not use JavaScript.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<form action="http://www.google.com/search" method="get" name="myForm">
<div>
<input type="hidden" name="q" value="bettie+page">
<div>
</form>
<p><a href="#" onclick="document.myForm.submit(); return false">search</a></p>

PhilgB
02-27-2003, 10:55 AM
Yeah, i thought the link actually meant something... started browsing the source code for 'Betty Page' and got confused... anyway, yeah i had considered a hidden form, and might even use it, just hoped i could send info without one. Thanks!

Vladdy
02-27-2003, 11:59 AM
What exactly are you trying to accomplish?
If you send information between pages, why do you need anything else but query string???:confused: :confused:

Vladdy
02-27-2003, 12:02 PM
Originally posted by Charles
...it is your responsibility to keep your page running for the 10% or more people who do not use JavaScript...
I'd say it is my choice not responsibility.