voxecho
07-21-2008, 04:46 PM
Since the header is downloaded to the client, i assume it's avaiable to javascript. how would i parse the header with javascript to pull form values from it?
-Echo
brandonH
07-22-2008, 01:39 AM
if you are refering to the form values in the address bar you can take a look at a previous reply to a post i made here:
http://www.codingforums.com/showthread.php?t=100579
it shows how to get the form values from the address.
voxecho
07-22-2008, 03:41 PM
Sorry to be snide, but if i meant (GET) FORM values in the address bar, i would be wrong in my terminology as that's the QueryString not a form.
without looking at the attached link, i can assure you that i am well aware of document.location.search.toString().split("&") *nodding*
No, what i am looking for is possible access to the POST form data which is sent in the headers and by way of SSI i would use Request.Form or $_FORM[] (i believe, it's been a while since i've used PHP)
It is my hopes to access this POST data from the header in order to run scripts using it without having to first create JS variables by was of SSI
<script>
window.username = "<%=Request.Form("cUserName")%>";
window.password = "<%=Request.Form("cPassword")%>";
</script>
the above leaves a bit to be desired, wouldn't you think?
if you are refering to the form values in the address bar you can take a look at a previous reply to a post i made here:
http://www.codingforums.com/showthread.php?t=100579
it shows how to get the form values from the address.
rnd me
07-22-2008, 09:50 PM
Sorry to be snide, but if i meant (GET) FORM values in the address bar, i would be wrong in my terminology as that's the QueryString not a form.
without looking at the attached link, i can assure you that i am well aware of document.location.search.toString().split("&") *nodding*
No, what i am looking for is possible access to the POST form data which is sent in the headers and by way of SSI i would use Request.Form or $_FORM[] (i believe, it's been a while since i've used PHP)
It is my hopes to access this POST data from the header in order to run scripts using it without having to first create JS variables by was of SSI
<script>
window.username = "<%=Request.Form("cUserName")%>";
window.password = "<%=Request.Form("cPassword")%>";
</script>
the above leaves a bit to be desired, wouldn't you think?
Snide? I don't take kindly to snide-ness, so pardon me while I return the favor.
i think comments like voxecho's discourage regulars from posting, so i want to discourage thank-less noobs from behaving in such a manner.
snide is defined as "Derogatory in a malicious, superior way (http://www.answers.com/snide&r=67)".
The premise being that the subject is superior in some capacity. Hmm.
Several adjectives more apropos than snide come to mind...
voxecho:
the basis of your question is incoherent and thus the question is un-answerable on the face of it.
"i am looking for is possible access to the POST form data which is sent in the headers"
-there is no POST (or "form" as you call it) data in a response, nor is there any form data in a header, please review basic http principles before slamming us regulars.
if i meant (GET) FORM values in the address bar, i would be wrong in my terminology as that's the QueryString not a form
-don't quite know what you are trying to say. Seems like a "i say 'sidewalk' you say 'concrete' " kind of thing going on here.
do a web search, and look at the resulting URL. don't be surprised if you see names and values from the form on the prior page. that's what happens to GET-method forms, they turn into queryStrings.
Since the header is downloaded to the client...
-it's "download" from, "upload" to...
My personal favorite:
i can assure you that i am well aware of document.location.search.toString().split("&") *nodding*
-well aware of imaginary document properties huh? scary.
if i grant the benifit of the doubt, and suppose you meant window (which is still redundant), are you well aware of how fragile your code is?
what about "...htm?title=dan's%20Drag&Drop&user=dan" i get three parameters from your code, not two.
----------------------------------------
ok, that's enough. i don't normally post like this, but every time i saw your post, it angered me.
brandonH seems modest enough, no need to jeer.
if you dont have anything nice to say...
treat others as you would...
etc.
just try to be constructive on here, that's what we are here for.
in that spirit, i will still answer your post, no hard feelings.
basically, from data is not typically sent to the client. its also not in the headers at all, but rather, and only, in the requestBody.
thus, in order to access in javascript you will have to copy it over. there's a variety of ways to do that, you outline one.
other options include:
-setting cookies in php, and reading them in js
-echoing the form data into hidden inputs or divs.
-transferring the post fields to get parameters (queryString).
i have lamented over javascript's inability to reach the post. it would be great if it could.
I would use it to allow my apps to read user's files without having to re-proxy the data on the server, saving me a bundle on bandwidth.
voxecho
08-04-2008, 07:49 PM
Tell you what. For all you took the tourch and ran with it... I have desided to remove my reply.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.