how to add onclick event in anchor button? |
Code: <?php
You have single quotes inside a string you are trying to pass to anchor function, you need to escape these characters with \ in front of '
PHP Code: anchor('Users/deleteFile/'.$row['markid'] .'/'.$row['appno'] ,' ' ,'class="fa fa-remove" onclick="return confirm(\'Are you sure to delete data?\')" style="font-size:25px;color:red"')
You need to start doing your own home work I found this in like 1 second.
onclick Event What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(10-05-2018, 03:32 AM)InsiteFX Wrote: You need to start doing your own home work I found this in like 1 second. first see my post. i am not asking in normal . my doubt is doing in anchor function . (10-05-2018, 04:09 AM)kvanaraj Wrote: first see my post. i am not asking in normal . my doubt is doing in anchor function . How about re-formatting your anchor like this? PHP Code: <?php (10-05-2018, 04:18 AM)qury Wrote:Mr Pertti already answered my post.(10-05-2018, 04:09 AM)kvanaraj Wrote: first see my post. i am not asking in normal . my doubt is doing in anchor function . |
Welcome Guest, Not a member yet? Register Sign In |