What’s wrong with this statement – <a href=javascript:window.location.href=”http://domain.co.uk/?productID=<?=$productID?>&color=”+colorvalue()+’&prv’+prv();>Continue…</a>
It works if I get rid of the last +prv(), but as soon as I add it in it does nothing. Anyone knows how to deal with this?
@David_HarrisonMay 30.2004 — #My guess is that prv is actually a variable and not a function, in which case this should work:<a href="http://domain.co.uk/?productID=<?=$productID?>" onclick="location.href=this.href+'&amp;amp;color='+colorvalue()+'&amp;amp;prv'+prv;return false;">Continue...</a>If prv is a function then it may have an error in it or not return a value, in which case I'll need to take a look at it.
This link will also work for non-JavaScript enabled browsers but the URL will not have the color and prv added to it.
@zignauthorMay 30.2004 — #[i]Originally posted by lavalamp [/i]
[B]My guess is that prv is actually a variable and not a function, in which case this should work:<a href="http://domain.co.uk/?productID=<?=$productID?>" onclick="location.href=this.href+'&amp;amp;color='+colorvalue()+'&amp;amp;prv'+prv;return false;">Continue...</a>If prv is a function then it may have an error in it or not return a value, in which case I'll need to take a look at it.
This link will also work for non-JavaScript enabled browsers but the URL will not have the color and prv added to it. [/B][/QUOTE]
Thanks!
My javascript:
<script language="javascript">
function colorvalue()
{
if (document.colorindex.colorID.value==0){
var flowercolor = 0;
}
else
{
for (var i=0; i < document.colorindex.colorID.length; i++)
{
if (document.colorindex.colorID[i].checked)
{
var flowercolor = document.colorindex.colorID[i].value;
}
}
}
return flowercolor;
}
function prv()
{
for (var j=0; j < document.pricerange.price.length; j++)