Onclick not Working in Safari

Hi pals,
I am also in onclick problem, my code works fine in FF,OPERA,Chrome but not in Safari.My problem is this onclick.



   1. <?php if(has_access($userarray,'view_serverdet','server')){
   2.     if (('Y' == $webpanel_ajax) && ('N' == $server_details || $usergroupid == "1")) { ?>
   3.         <span class="expand" id="exp<?php echo $server_row['id']?>" onclick="view_details('<?php echo $server_row['id'];?>','page','<?php echo $shade;?>')">+</span>
   4. <?php }
   5. } ?>


The corresponding function like:



    function view_details(id,from,class) {
           alert("id is:"+id);
           alert("from is:"+from);
          alert("class:"+class);
              //some other codes
   }


In other Browsers these values alert, but in Safari not. Why Pls Give me a solution
ASAP.I use Safari 5.0.3 in Fedora 13 using Wine.
I give that onclick in <span> is that the problem , advise me.
Thankfully
Anes P.A :shifty:

Does changing the code to the following result in safari alerting?


<?php if(has_access($userarray,'view_serverdet','server')){
	if (('Y' == $webpanel_ajax) && ('N' == $server_details || $usergroupid == "1")) { ?>
		<span class="expand" id="exp<?php echo $server_row['id']?>" onclick="view_details();">+</span>
	<?php }
} ?>


function view_details() { 
	alert('Alert'); 
}

Hi Pal,

That Simple Alert also not Working … Any idea?

Regards
Anes P.A :injured:

Could you provide a link to the page in question.

Friend I am developing in localhost Now, so no link at all

Thanks
Anes P.A :injured:

So how about posting the HTML then. All you posted so far is a fragment of the PHP and from that fragment it is impossible to determine what HTML results. The JavaScript only sees the HTML and so what is in the PHP is irrelevant unless it is generating the HTML incorrectly (and you can tell if that is happening by viewing the generated HTML).