make sure button is of Type Button.
Then in server side code put something like;
If Random(1,20) < 10
p_web.popup('Hello Bruce, That''s not cool')
do Value::Other23
Else
! do something
Loc:Eip = 0
do CallBrowse
End
Where Other23 is the name of the button.