How to open link in new window using PHP
I would to open my link "Chat" in another page. I added the target = blank, yet it does nothing.
HTML Code:
<div class="menu">
<span class="title-menu1">Forum</span></br>
<a href="{U_INDEX}" class="menu1">• Forum </a></br>
<a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}" class="menu1">• {L_FAQ} </a></br>
<a href="{U_CALENDAR}" class="menu1">• Calendar </a></br>
<!-- IF S_DISPLAY_MEMBERLIST --><a href="{U_MEMBERLIST}" class="menu1">• {L_MEMBERLIST} </a></br><!-- ENDIF -->
<!-- IF not S_IS_BOT -->
<a href="{U_LOGIN_LOGOUT}" class="menu1">• {L_LOGIN_LOGOUT}</a></br>
<!-- IF S_DISPLAY_PM --><a href="{U_PRIVATEMSGS}" class="menu1">• ( {PRIVATE_MESSAGE_INFO} )</a><br /><!-- ENDIF -->
<!-- ENDIF -->
<a href="{U_SEARCH}" class="menu1">• {L_SEARCH}</a></br>
<!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED --><a href="{U_REGISTER}" class="menu1">• {L_REGISTER}</a></br><!-- ENDIF -->
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
<a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="u" class="menu1">• {L_PROFILE}</a></br>
<a href="{U_SEARCH_SELF}" class="menu1">• {L_SEARCH_SELF}</a></br>
<br>
<div class="menu-hr"></div>
<span class="title-menu1">The sites</span></br>
<a href="http://www.for_example.com" class="menu1">• The site </a></br>
<a href="http://www.for_example.com/regions.php" class="menu1">• Concession</a></br>
<a href="http://www.example1.com/forum/index.php" class="menu1">• Example1</a></br>
<a href="http://example2.net/forums.html" class="menu1">• Example2</a></br>
<a href="http://for_example.com/forum/chat/" target="_blank" class="menu1">• Chat</a></br>
<br>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="7504108">
<input type="image" src="https://www.paypal.com/en_US/i/logo/paypal_logo.gif" border="0" name="submit" alt="PayPal - The solution of payment online with simple and most secure !">
</form>
<div class="menu-hr"></div>
Re: How to open link in new window using PHP
It is said that target="_blank" not working in some cases, when the destination page is special or is poorly specified (which seems to be your case, because the address appears to be a directory rather than the name of a page).
It is also said that another method is
HTML Code:
<a href="link.html" onClick="popup = window.open('link.html', 'PopupPage', 'height=450,width=500,scrollbars=yes,resizable=yes'); return false" target="_blank">
Re: How to open link in new window using PHP
Yes kind of pop-up in JavaScript! I had even tried putting a target = "_blank" yesterday but it did not worked. Thank you for you information. I'll try this, I had more thinking!
Re: How to open link in new window using PHP
I hope the rest of the php code is not the image in your html code because if not, probably a security hole.
Ex:
1) We do not use </br> in this way. It uses the CSS with margin
2)
HTML Code:
<span class="title-menu1">The sites</span></br>
<a href="http://www.for_example.com" class="menu1">• The site </a></br>
<a href="http://www.for_example.com/regions.php" class="menu1">• Concession</a></br>
<a href="http://www.example1.com/forum/index.php" class="menu1">• Example1</a></br>
<a href="http://example2.net/forums.html" class="menu1">• Example2</a></br>
<a href="http://for_example.com/forum/chat/" target="_blank" class="menu1">• Chat</a></br>
To make a list of links, use <ul> <li> and therefore no need of </br> or bull.
3) <div class="menu-hr"> </div> -> in my opinion, a simple </hr> with the proper css should do the trick