Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: HTML "Open in New Window" code?  (Read 14271 times)

0 Members and 1 Guest are viewing this topic.

hope2u

    Topic Starter


    Greenhorn

    • Experience: Beginner
    • OS: Unknown
    HTML "Open in New Window" code?
    « 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? 

    hope2u

      Topic Starter


      Greenhorn

      • Experience: Beginner
      • OS: Unknown
      Re: HTML "Open in New Window" code?
      « 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? 

      soybean



        Genius
      • The first soybean ever to learn the computer.
      • Thanked: 469
      • Computer: Specs
      • Experience: Experienced
      • OS: Windows 10
      Re: HTML "Open in New Window" code?
      « 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.

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: HTML "Open in New Window" code?
      « Reply #3 on: March 03, 2011, 01:02:10 PM »
      the URL in the A tag should be in quotes.
      I was trying to dereference Null Pointers before it was cool.

      2x3i5x



        Expert
      • Thanked: 134
      • Computer: Specs
      • Experience: Familiar
      • OS: Windows 10
      Re: HTML "Open in New Window" code?
      « 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>

      hope2u

        Topic Starter


        Greenhorn

        • Experience: Beginner
        • OS: Unknown
        Re: HTML "Open in New Window" code?
        « 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.

        alex365



          Newbie

        • Experience: Beginner
        • OS: Unknown
        Re: HTML "Open in New Window" code?
        « 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.

        soybean



          Genius
        • The first soybean ever to learn the computer.
        • Thanked: 469
        • Computer: Specs
        • Experience: Experienced
        • OS: Windows 10
        Re: HTML "Open in New Window" code?
        « 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.

        hope2u

          Topic Starter


          Greenhorn

          • Experience: Beginner
          • OS: Unknown
          Re: HTML "Open in New Window" code?
          « 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. 

          kpac

          • Web moderator
          • Moderator


          • Hacker

          • kpac®
          • Thanked: 184
            • Yes
            • Yes
            • Yes
          • Certifications: List
          • Computer: Specs
          • Experience: Expert
          • OS: Windows 7
          Re: HTML "Open in New Window" code?
          « Reply #9 on: March 07, 2011, 11:00:02 AM »
          There are big differences between Office 2003 and 2007. 2007 and 2010 are similar.

          2x3i5x



            Expert
          • Thanked: 134
          • Computer: Specs
          • Experience: Familiar
          • OS: Windows 10
          Re: HTML "Open in New Window" code?
          « 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 :)



          hope2u

            Topic Starter


            Greenhorn

            • Experience: Beginner
            • OS: Unknown
            Re: HTML "Open in New Window" code?
            « 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. 

            2x3i5x



              Expert
            • Thanked: 134
            • Computer: Specs
            • Experience: Familiar
            • OS: Windows 10
            Re: HTML "Open in New Window" code?
            « 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.  :)


            davidsouthey

            • Guest
            Re: HTML "Open in New Window" code?
            « Reply #13 on: March 09, 2011, 05:04:08 AM »
            Better use dreamweaver! LOL

            hope2u

              Topic Starter


              Greenhorn

              • Experience: Beginner
              • OS: Unknown
              Re: HTML "Open in New Window" code?
              « 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.