473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

location.search for GET URL only?

Am I correct in thinking that you can only use location.search to retrieve
all a form's inputs if the method is GET. In my experiments so far, using
search I only get what follows the ? in the returned page. With the
'script' I'm using that gives me nothing in the URL with POST.

I hope that makes sense. Am I missing something?

Mark
Jul 20 '05 #1
1 1552
On Tue, 20 Jan 2004 00:12:13 -0000, Mark Anderson
<ma**@notmeyeardley.demon.co.uk> wrote:
Am I correct in thinking that you can only use location.search to
retrieve all a form's inputs if the method is GET. In my
experiments so far, using search I only get what follows the ? in
the returned page. With the 'script' I'm using that gives me
nothing in the URL with POST.


Location.search isn't specific to form submittal. It simply returns a
string containing everything in the URI associated with the Location
object from the question mark (?) onwards.

The GET submission method passes data using the URL. The POST method uses
HTTP headers[1].

There is no way for JavaScript to access POST data directly.

Mike
[1] If I remember correctly.

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Rim | last post by:
Hi, How can I control the location of the bytecode files? The reason I ask is I want to place the bytecode in a directory different than source code for backup reasons. Our backup system is...
26
by: Nige | last post by:
I'm a complete novice to JS. I want to insert the date and time into a document in the format: WB-MMDDHHmm Where: WB- is a fixed string prefix (the whole string is a reference number) MM...
4
by: Max of Mad | last post by:
Hi all, I wrote this a while back, but I was unable to get it to work for mozilla. Looked all over the place, but could not find anything on why. Basically, this has a dropdown of some search...
5
by: spam_me_ not | last post by:
I already understand that one cannot disable a browser's forward and back functions. This is a situation where I have code working in Mozilla V1.6 and would like something similar for Opera and...
8
by: Phil Powell | last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href = document.location.href.substring(0, document.location.href.indexOf('?')); if (document.location.href.indexOf('#') >= 0) {...
10
by: Roland | last post by:
Hello, the example code is the following(the number in parentheses at the beginning are just for reference)(The complete HTML file is at the end of this article): (1)window.location =...
9
by: permanent.tourist | last post by:
I'm having a hell of a job getting this to work in Safari: the only thing I can think of is that one can't use reload() across to another frame for security reasons. Does anyone have a concrete...
5
by: Alan Little | last post by:
Do a search at this site: http://www.mindsift.com/ Select a non-sponsored link, then give the site a rating. The rating frame closes. Now click your "back" button. If you're using IE, you'll...
5
by: bobdydd | last post by:
Hi Everybody I have an Access database that passes a Parameter to a web page something like this. http://localhost/index.htm?paramName=1234-54321 I want to be able to retrieve the parameter...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.