PDA

View Full Version : Quick question...


Slybone
06-21-2004, 05:14 PM
Well, im trying to make a javascript popup, popup if a user is in a certain group... but its not working at all, can I get some advice on what may be wrong here?


//Popup Code
if ($bbuserinfo['usergroupid']==6){
echo '<script language="javascript" type="text/javascript">\r\nalert("POPUP GOES HERE");\r\n</script>';
}

Xenon
06-21-2004, 05:40 PM
vb2 or vb3?

if vb3 then, it might be, because vb3 doesn't accept direct output anymore (or that leads at least to problems...)

so if you are in vb3, assign the JS code into a variable and add that variable into the header :) or even better, put the whole js code into the template as in vb3 if conditions are possible in templates ;)

Slybone
06-27-2004, 02:15 PM
Yes it was vb3, anyways I see what your saying.
Thanks
-Bone

Xenon
06-28-2004, 08:57 PM
you're welcome