onfocus
Recently I tried coding this:
Unfortunately this does not work. It seems that for <onfocus> the skin engine treats the iif condition as true, even when it is false. The workaround for this is to reverse the order of the iif and the setstring, like so:
-- from CyberSimian in the UK
Recently I tried coding this:
Code:
<onfocus>#(iif(eq(#skin.search.id,0),skin.setstring('#skin.search.id',10)))</onfocus>
Unfortunately this does not work. It seems that for <onfocus> the skin engine treats the iif condition as true, even when it is false. The workaround for this is to reverse the order of the iif and the setstring, like so:
Code:
<onfocus>#(skin.setstring('#skin.search.id',iif(eq(#skin.search.id,0),10,#skin.search.id)))</onfocus>
-- from CyberSimian in the UK
United Kingdom