Not a Member Yet,
Click here to Register

ID: 524
Viewed: 3935
Added: Jan 24, 2004
Version: 1.0
Snippet uploaded by: agent002
Written By: agent002
Demo: Sorry, no demo

User Rated at: 5 Stars5 Stars5 Stars5 Stars5 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

A function for getting data from the query string.

<script type="text/javascript"><!--
// Query string is:
// firstname=John&lastname=Doe
// Get value for 'firstname':
// var firstname = GetQuery('firstname');
// (The script automatically unescapes the value).

function GetQuery(arg){
var query = location.href.substring((location.href.indexOf('?') + 1), location.href.indexOf('#'));
if(location.href.indexOf('#') < location.href.indexOf('?')){
query = location.href.substring((location.href.indexOf('?') + 1), location.href.length);
if(location.href.indexOf('?') < 0){
query = '';
var querypairs = query.split('&');
var ret = '';
for(var i = 0; i < querypairs.length; i++){
var namevalue = querypairs[i].split('=');
if(namevalue[0] && namevalue[1] && namevalue[0] == arg){
while(namevalue[1].indexOf('+') >= 0){
namevalue[1] = namevalue[1].replace('+', ' ');
ret = unescape(namevalue[1]);
return ret;



No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.

Replying to a Comment...

Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2024 All Rights Reserved. Conditions
Do NOT follow this link or you will be banned from the site!