1
Hello, i don't know if this will be of any use to someone else, but i had a friend who wanted to have different image headers for his news topics and so poking around the net i found a javascrit to get the value of a param and used it for it.
here is the code.
function getURLParam(strParamName){
var strReturn = "";
var strHref = window.location.href;
if ( strHref.indexOf("?") > -1 ){
var strQueryString =
strHref.substr(strHref.indexOf("?")).toLowerCase();
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
if (
aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
var aParam = aQueryString[iParam].split("=");
strReturn = aParam[1];
break;
}
}
}
return strReturn;
}
var topic = getURLParam("storytopic");
switch(topic)
{
case "1":
document.writeln('');
break;
case "2":
document.writeln('');
break;
case "3":
document.writeln('');
break;
default:
document.writeln('');
break;
}
getURLParam("storytopic");
returns the value of storytopic wich according to the switch display the image requiered or a default image if theres no value.
i think this is usefull for theme presonalitation, anyway there you have it...
All the best.