opening a link in new tab

hi all,

  i have reports in my application wherein if i click a link in my menu the report gets loaded in the same window but i want that to be loaded in a new tab.how is it possible?please help

thanks

smug

Check the target="_blank" in the a tag, like:




<a href="http://some.funny.place.com/some/path" target="_blank">Don't lick me</a>



I’m using bootstrap, how to make this link below to open in new tab?




<?php echo TbHtml::stackedTabs(array(

    array('label' => 'E-mail BTPN', 'url' => 'https://corpmail.btpn.com/owa/'),

)); ?>



Hi,

You can add the array element ‘htmlOptions’ as follows,




<?php


	echo TbHtml::stackedTabs(array(

		array(

			'label' => 'E-Mail BTPN',

			'url' => 'https:://corpmail.btpn.com/owa/',

			'htmlOptions' => array('target' => '_blank'), //Add your html options here

			),

		),

	);

?>



Now It will work

Cheers !

I’ve tried as follows, but still not opening in new tab:




<?php echo TbHtml::stackedTabs(array(

            array('label' => 'E-Dapem', 'url' => 'http://edapem/btpn/login/login.jsp',),

            array(

                'label' => 'E-mail BTPN',

                'url' => 'https://corpmail.btpn.com/owa/',

                'htmlOptions' => array('target' => '_blank'), // Added here

                ),

            array('label' => 'Revampp', 'url' => '#',),

            array('label' => 'LAPPS', 'url' => 'http://lapps/btpn/login/login.jsp',),

            array('label' => 'MIS Portal', 'url' => '#',),

        )); ?>



[size=2]Hi,[/size]

Try this




<?php echo TbHtml::stackedTabs(array(

            array('label' => 'E-Dapem', 'url' => 'http://edapem/btpn/login/login.jsp',),

            array(

                'label' => 'E-mail BTPN',

                'url' => 'https://corpmail.btpn.com/owa/',

                'linkOptions' => array('target' => '_blank'), // Added here

                ),

            array('label' => 'Revampp', 'url' => '#',),

            array('label' => 'LAPPS', 'url' => 'http://lapps/btpn/login/login.jsp',),

            array('label' => 'MIS Portal', 'url' => '#',),

        )); ?>



[size=2]Thanks chandran, the linkOptions is the answer! It worked.[/size]

Hi,

Instead of htmloptions i have used linkoptions…thats it

For this to work in a widget CMenu, need use ‘itemOptions’ =)