Welcome Guest, Not a member yet? Register   Sign In
Anchor without a Href
#1

[eluser]Unknown[/eluser]
Hello,

I have below anchor tag and I want to use anchor() function from url helper. Here I don't have href attribute, I want to use with onClick function, it is working fine

Code:
<a style="cursor:pointer;">&lt;?php echo $advertiser['companyName']; ?&gt;</a>

Now I am converting above code using anchor() function, it want work

Code:
&lt;?php echo anchor('',$advertiser['companyName'],array('onclick'=>"expandArea('$rowcount')",'style'=>'cursor:pointer;')) ?&gt;

OR

Code:
&lt;?php echo anchor('#',$advertiser['companyName'],array('onclick'=>"expandArea('$rowcount')",'style'=>'cursor:pointer;')) ?&gt;

Can I have help on this? Thanks in advance.

---Amit




Theme © iAndrew 2016 - Forum software by © MyBB