Getho
function readstring(){
var stringReceived = document.location.search;
// parse the string to get the value of the parameter
var avar = stringReceived.substring(stringReceived.indexOf("=")+1,
stringReceived.length);
re = /[?]/
codtal = avar.split(re)
//val = codtal[0]
tal = codtal[1]
document.image1.src = 'enlargements/'+tal
//alert ('enlargements/'+tal);
}
Thanks
Geth
var stringReceived = document.location.search;
// parse the string to get the value of the parameter
var avar = stringReceived.substring(stringReceived.indexOf("?")+1,
stringReceived.length);
document.image1.src = 'enlargements/'+avar;
}
I gues this works so long as I have only one ? in the URL
If you have more than one '?' in a URL it is not a well-formed URL.
(That is; you are only allowed one '?' per URL.)
Richard.
You could also use:
var avar = stringReceived.replace(/.*\?/,'');
'avar' will be all the characters after the '?'.
--
Rob