Home / Internet & Networking / Web design / HTML "Open in New Window" code?
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: 1 2 [All] - (Bottom) Print
Author Topic: HTML "Open in New Window" code?  (Read 2047 times)
hope2u
Topic Starter
Greenhorn



Posts: 7

Experience: Beginner
OS: Unknown

« on: March 03, 2011, 09:39:51 AM »

I'm a total doofus when it comes to web design so please forgive these simplistic questions!
I'm making up a website using Microsoft Word 2007 (I know its not ideal but it serves the purpose so far) on XP.
I want the web links to open in a new window.
I've read some help on this but its always so complicated (perhaps unnecessarily so?).

Say my link is http://aaa.com
All I need to know (and many others as well!) is what to add to that so it opens in a new window.

Most people use the target approach.  Here's an example:
<a href="your URL" target="_blank">text link[/url]
so if that follows, it should translate to:
<a href=http://aaa.com target="_blank">text link[/url]
But should there be a space after .com?

One more question:  What is the quickest way to test this?  Should I be able to just open the file with a browser after its been saved? 
IP logged
hope2u
Topic Starter
Greenhorn



Posts: 7

Experience: Beginner
OS: Unknown

« Reply #1 on: March 03, 2011, 09:43:29 AM »

I forgot to mention that after "saving as a webpage" Microsoft Word mangles the hyperlink inserting % and other characters.  Is this normal? 
IP logged
soybean
Genius



Thanked: 324
Posts: 12,312

Computer: Specs
Experience: Experienced
OS: Windows 7
The first soybean ever to learn the computer.

« Reply #2 on: March 03, 2011, 10:16:41 AM »

I suggest you try a freeware HTML editor.  As you've mentioned, Word is not really a good tool to use for web page creation.  Yes, it works, but it adds lots of superfluous coding which tends to clutter the HTML files.

Here's a freeware program I'll suggest.  I've used it a bit with Linux Ubuntu but it also runs in Windows.  It's called bluefish.  You can get it at http://bluefish.openoffice.nl/index.html.  You can watch a video here: http://bluefish.openoffice.nl/screenshots.html

Quote
Most people use the target approach.  Here's an example:
<a href="your URL" target="_blank">text link[/url]
so if that follows, it should translate to:
<a href=http://aaa.com target="_blank">text link[/url]
But should there be a space after .com?
Yes, you should have a space between com and target.

Quote
What is the quickest way to test this?  Should I be able to just open the file with a browser after its been saved?
Yep.
IP logged


BC_Programmer
Mastermind


Thanked: 697
Posts: 15,874

Computer: Specs
Experience: Beginner
OS: Windows 7


Pinkie Pie is best pony

BC-Programming.com 1 1
« Reply #3 on: March 03, 2011, 01:02:10 PM »

the URL in the A tag should be in quotes.
IP logged

My Blog

BASeBlock 2.3.0 (NOW WITH MACGUFFINS!)
2x3i5x
Expert



Thanked: 116
Posts: 2,163

Computer: Specs
Experience: Familiar
OS: Windows Vista

« Reply #4 on: March 03, 2011, 03:57:35 PM »

Microsoft Expressions Web 4. This is a nice software by Microsoft. You can get it free if you have a hotmail account or one of those Microsoft passport login accounts.

Also, this piece of code when you use it on your webpage should take you to Google in a new page/ tab
Code: [Select]
<a href="google.com” target=”_blank”>Google</a>
IP logged
hope2u
Topic Starter
Greenhorn



Posts: 7

Experience: Beginner
OS: Unknown

« Reply #5 on: March 06, 2011, 03:14:10 PM »

Thanks for the clear google.com explanation.  I've files that away!  Now I have to figure out if its possible to actually insert stuff in MS Word without it getting garbled. 

Does anybody know?  Is it even possible saving characters like that in the Edit Hyperlink window?  So far it doesn't seem to be.  I got MS Expressions - that should be interesting.  Thanks again.
IP logged
alex365
Newbie



Posts: 2

Experience: Beginner
OS: Unknown

« Reply #6 on: March 07, 2011, 06:09:37 AM »

Hello Friend...
                       Follow this code example for open link in new window.

Example-----
<A HREF="newwindow.html" TARGET="_blank">a new window[/url]

"_blank" opens the new document in a new window.
IP logged

soybean
Genius



Thanked: 324
Posts: 12,312

Computer: Specs
Experience: Experienced
OS: Windows 7
The first soybean ever to learn the computer.

« Reply #7 on: March 07, 2011, 07:36:46 AM »

                       Follow this code example for open link in new window.

Example-----
<A HREF="newwindow.html" TARGET="_blank">a new window[/url]

"_blank" opens the new document in a new window.
That's already been covered.   ::)

... Now I have to figure out if its possible to actually insert stuff in MS Word without it getting garbled. 
What do you mean?  Are you still talking about using Word as an HTML editor. No, it isn't possible.  As previously stated, Word is a poor choice as a HTML editor.
IP logged


hope2u
Topic Starter
Greenhorn



Posts: 7

Experience: Beginner
OS: Unknown

« Reply #8 on: March 07, 2011, 08:39:31 AM »

I was just hoping to continue a little bit longer in Word, sort of limping along I suppose.  For direct lnks it works great and since I'm used to it, it seemed like a good solution.  Guess I can't rely on it for doing anything but the simplest of things.  What seems odd is that I thought it worked for me before using Word 2003.  Unless they changed it between Word 2003 and Word 2007?  Does anybody think that could be possible?  I haven't tried it with Word 2010. 
IP logged
kpac
Web moderator
Moderator
Hacker



Thanked: 180
Posts: 5,874

Certifications: List
Computer: Specs
Experience: Expert
OS: Windows 7
kpac®

1 1 1
« Reply #9 on: March 07, 2011, 11:00:02 AM »

There are big differences between Office 2003 and 2007. 2007 and 2010 are similar.
IP logged

2x3i5x
Expert



Thanked: 116
Posts: 2,163

Computer: Specs
Experience: Familiar
OS: Windows Vista

« Reply #10 on: March 07, 2011, 12:44:27 PM »

I was just hoping to continue a little bit longer in Word, sort of limping along I suppose.  For direct lnks it works great and since I'm used to it, it seemed like a good solution.  Guess I can't rely on it for doing anything but the simplest of things.  What seems odd is that I thought it worked for me before using Word 2003.  Unless they changed it between Word 2003 and Word 2007?  Does anybody think that could be possible?  I haven't tried it with Word 2010.

well, if you are adding hyperlinks by doing right click, and then by entering your link's address into the popup box appearing in WORD, microsoft web expressions 4 can do it too when you go to its design window. I think the web expressions does it same way as WORD

There is a design mode and a HTML mode in the web expressions 4, and a split mode which combines design and HTML mode so you  can use both at same time.  Design mode is WYSIWYG  and HTML mode is if you want to edit the code directly. In split mode, the visual window displays all the edits you made and saved so you can see exactly how it looks when you open your pages in internet explorer . I suppose that's a bit more convenient than in WORD ... lol :)


IP logged
hope2u
Topic Starter
Greenhorn



Posts: 7

Experience: Beginner
OS: Unknown

« Reply #11 on: March 07, 2011, 02:28:21 PM »

Good advice.  I need to stop pussyfying around and learn something knew in this area.  I want to have control over the page layout and I"ll never have that with Word.  This is probably a blessing in disguise to kickstart me in a new direction.  Much appreciated. 
IP logged
2x3i5x
Expert



Thanked: 116
Posts: 2,163

Computer: Specs
Experience: Familiar
OS: Windows Vista

« Reply #12 on: March 07, 2011, 11:48:28 PM »

I think WORD was designed with the intention of being a WORD processing software, which it does well.

You have a software that was designed to be a HTML editor / web page maker, so better hop with it, unless you want to just use good ol'e notepad and do all the coding yourself.  :)

IP logged
davidsouthey
Newbie



Posts: 1

Computer: Specs
Experience: Experienced
OS: Windows 7
David Southey

http://www.maleyeastinfectionsecrets.com
« Reply #13 on: March 09, 2011, 05:04:08 AM »

Better use dreamweaver! LOL
IP logged

hope2u
Topic Starter
Greenhorn



Posts: 7

Experience: Beginner
OS: Unknown

« Reply #14 on: March 09, 2011, 07:17:42 AM »

Would others agree that Dreamweaver is a good choice to start out on simple web design?  I looked at Xara.  Sure didn't seem very intuitive.
IP logged
2x3i5x
Expert



Thanked: 116
Posts: 2,163

Computer: Specs
Experience: Familiar
OS: Windows Vista

« Reply #15 on: March 10, 2011, 11:05:19 AM »

Would others agree that Dreamweaver is a good choice to start out on simple web design?  I looked at Xara.  Sure didn't seem very intuitive.

Dreamweaver is fine too. But if you really want to make webpages, then find one that works, and get on with it.

W3C schools[/url[ HTML page has HTML tutorials. And W3C is the official HTML guys so it's a good place to visit to get all your HTML learning.
IP logged
hope2u
Topic Starter
Greenhorn



Posts: 7

Experience: Beginner
OS: Unknown

« Reply #16 on: March 10, 2011, 05:05:20 PM »

I should have mentioned that I was really hoping to make up my webpage without learning any HTML or very little.  Is this realistic considering what modern website creation software can now do?
IP logged
soybean
Genius



Thanked: 324
Posts: 12,312

Computer: Specs
Experience: Experienced
OS: Windows 7
The first soybean ever to learn the computer.

« Reply #17 on: March 10, 2011, 05:59:35 PM »

Yes, you can go that route and avoid getting into the nitty-gritty of coding.
IP logged


Mellie94
Starter



Posts: 3

Experience: Beginner
OS: Unknown

« Reply #18 on: November 01, 2011, 04:41:43 AM »

When I edit html files from my computer, they keep opening in the same browser that I have opened. How do I fix it so that html files will open in their own windows?

I'm not looking to make a new window appear with HTML. I'm trying to edit HTML files and would prefer them to open in a fresh window instead of 'hijacking' my current opened browser.
IP logged

{ Ring bearer and Flower Girl Tips }
Charm Bracelets For Girls
Allan
Moderator
Genius



Thanked: 856
Posts: 14,482

Experience: Guru
OS: Windows 7



Forum Administrator
« Reply #19 on: November 01, 2011, 05:35:28 AM »

When I edit html files from my computer, they keep opening in the same browser that I have opened. How do I fix it so that html files will open in their own windows?

I'm not looking to make a new window appear with HTML. I'm trying to edit HTML files and would prefer them to open in a fresh window instead of 'hijacking' my current opened browser.

Please do not post questions in existing threads. Just start a new thread for your problem & question. Thank you.
IP logged
BC_Programmer
Mastermind


Thanked: 697
Posts: 15,874

Computer: Specs
Experience: Beginner
OS: Windows 7


Pinkie Pie is best pony

BC-Programming.com 1 1
« Reply #20 on: November 01, 2011, 10:09:24 AM »

W3C schools HTML page has HTML tutorials. And W3C is the official HTML guys so it's a good place to visit to get all your HTML learning.

I know this is a old thread, but this is a common misconception. W3schools is not affiliated with the W3C in any way at all. they are a separate entity, and not official in any way. Members of the W3C have tried to get w3schools to disavow any affiliation with the W3C but they have refused to do so.

Other resources:

http://dev.opera.com/articles/view/1-introduction-to-the-web-standards-cur/#toc


Google's HTML, CSS, and Javascript from the Ground Up

sitepoint

Also, the w3c itself has some information pages. It has a Learn page, as well as a HTML element reference.

Also, the Mozilla Doc center starts at intermediate CSS and covers JavaScript better than anyone.

IP logged

My Blog

BASeBlock 2.3.0 (NOW WITH MACGUFFINS!)
Pages: 1 2 [All] - (Top) Print 
Home / Internet & Networking / Web design / HTML "Open in New Window" code? « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.163 seconds with 20 queries.