I am trying to use a pvar switch to have a button do different things depending on the pvar number. Here is what I am trying, but it just isn't working:
CODE
$button2(35,17,0,0,208,16,
'%artist%',
'%artist%',
$ifequal($getpvar(artist_link),1,
EXEC:http'://'en.wikipedia.org/wiki/$replace(%artist%, ,_)
,
$ifequal($getpvar(artist_link),2,
EXEC:http'://'www.youtube.com/results.php?search_query=$replace(%artist%, ,+)
),)
,
TOOLTIP:"Search Wikipedia For: %artist%")
'%artist%',
'%artist%',
$ifequal($getpvar(artist_link),1,
EXEC:http'://'en.wikipedia.org/wiki/$replace(%artist%, ,_)
,
$ifequal($getpvar(artist_link),2,
EXEC:http'://'www.youtube.com/results.php?search_query=$replace(%artist%, ,+)
),)
,
TOOLTIP:"Search Wikipedia For: %artist%")
I may have the code incorrent, but with all the ) and ( and , it can get confusing.
Anyways, what I am trying to accomplish is if the pvar "artist_link" is set to 1, then the Wikipedia page loads, otherwise if it is set to 2, the YouTube page loads. I am going to repeat this for 6 sites in total.
Does anyone know how to accomplish this? Thank you
