![]() |
anchor onclick and target=_blank - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: anchor onclick and target=_blank (/showthread.php?tid=11642) |
anchor onclick and target=_blank - El Forum - 09-17-2008 [eluser]PHP Programmer[/eluser] How can I set onclick function in CI's anchor function. I used the following: echo anchor("jobs/SaveJob/$search->jobs_emp_id/$search->employer_id", 'Save this job', "onclick=\"return [removed]save_job('$search->jobs_emp_id','$search->employer_id','$search->job_title')\""); I didn't get any JS function on clicking the link. Also, I want the page to be opened in new window. How can I use "target=_blank" along with the above statement. Also, I need a tooltip (to be called from database) on clicking the link. Please suggest... anchor onclick and target=_blank - El Forum - 09-17-2008 [eluser]Unknown[/eluser] Use the manual, Luke. anchor('url','text', array('onclick' => "alert('test')")); |