CodeIgniter Forums
how to easily make ci anchors target blank - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: how to easily make ci anchors target blank (/showthread.php?tid=32078)



how to easily make ci anchors target blank - El Forum - 07-12-2010

[eluser]dhaulagiri[/eluser]
How do i easily make this open in new window ?

Code:
View site <?php echo anchor(base_url(), 'Here')?>



how to easily make ci anchors target blank - El Forum - 07-13-2010

[eluser]n0xie[/eluser]
If you want to do it the 'nice' way take a look here:
http://www.badlydrawntoy.com/2009/03/03/replacing-target_blank-for-strict-xhtml-using-jquery-redux/


how to easily make ci anchors target blank - El Forum - 07-13-2010

[eluser]mi6crazyheart[/eluser]
Try this...
Code:
$atts = array(
              'target' => '_blank'              
            );
echo anchor(base_url(), 'Here', $atts);

For more details: http://ellislab.com/codeigniter/user-guide/helpers/url_helper.html


how to easily make ci anchors target blank - El Forum - 07-13-2010

[eluser]Hernando[/eluser]
View site <?php echo anchor_popup(base_url(), 'Here')?>