how can you open a link in a new window insted of same window ? like i wanna use a chat room i have in php code in the menu and when people click it it will open in a new window not same window as mysite ..any help? thanks i had to put chat room on front page for now

Comments

j_k’s picture

is there away to do this ??

jraper@groups.drupal.org’s picture

such as:

<a href="whatever" target="_blank">link text</a>

target="_blank" tells the browser to open the called link in a new window.

WorldFallz’s picture

manually code the anchor with target="_blank" like:

<a href="http://drupal.org/node/186817" target="_blank">Opens in New Window</a>

Opens in New Window

Or are you asking something else?

j_k’s picture

i have a file i upload with c/panel and place in public_html i can link to the php file np just it opens in same window plus the codes you give link text Opens in New Window that would work but i put the link in menu so it wont work ?ok look lets see if i can make this any better for you to follow coz i cant lol ..Right i upload a php file ok now i place in the menu a link to it ok its a chat so i type in chat and link to it yeah like /emr_chat.php.txt now it works and open the chat but in same window if i put anyone of them code at the start of the chat.php would that work? i amvery new to this as you can tell thanks

vm’s picture

here's how I'd do it:

goto administer -> blocks
click the add block tab
In the block body
add the necessary HTML in the block to create the menu item
<a href="yoursite.com/emr_chat.php" target="_blank">Chat Now</a>

shift the input format to FULL HTML
submit the block

goto administer -> blocks
enable the chat block

Done.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

tm’s picture

j_k’s picture

your link is dead m8 ? :(

vm’s picture

I fixed the link
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

tm’s picture

nt

j_k’s picture

it puts icon there but still opens in same window plus its not what i was looking for dont thik right mysite www.eastmanchesterradio.co.uk the file i am trying to open in diff. win. is www.eastmanchesterradio.co.uk/chat.php.txt so it wont show as external how can i make that open in new window? thanks for any help and all the help so far :)

tm’s picture

is there an "external links" in your site configuration listing? in there, there should be settings/checkboxes. it is (for me) really for setting up global options that also work in outbound menu links, so authenticated users don't lose their place.

if there is a case beyond that, then the "target="_blank" option can be used, as state in prior comments.

j_k’s picture

thanks guys for all your help i did it atlast thank you all very much