Results 1 to 5 of 5

Thread: <A HREF="#" onClick="window.open ('sitename.html') ...>

  1. #1
    Join Date
    Mar 2010
    Posts
    162

    <A HREF="#" onClick="window.open ('sitename.html') ...>

    Hello,
    Here is my code
    Code:
    <SCRIPT LANGUAGE="javascript" TYPE ="text/javascript">
    <!-- Hide script
    
    function newWindow() {
    lttwind = window.open ('address here/', 'littleWin', 'width=300,height=300')
    }
    // End hiding script -->
    </SCRIPT>
    I have some queries regarding this
    - what does the # mean in the above code
    - Also what is the work of the HREF in the syntax

    Any help regarding this is appreciated. Thank you for your help.

  2. #2
    Join Date
    Nov 2009
    Posts
    335

    Re: <A HREF="#" onClick="window.open ('sitename.html') ...>

    Hello,
    I can answer your first question, the # is used in the code when you do not have to refer to any location that is the link will be nowhere, mostly it is used for testing. When you provide something in your href you will find that it will be redirection to the location which you have mentioned in your tags. I guess I am correct here and the information has helped you.

  3. #3
    Join Date
    Mar 2010
    Posts
    197

    Re: <A HREF="#" onClick="window.open ('sitename.html') ...>

    Hello,
    When you are going to use something like this
    Code:
    <a href="#" onlick="func()">Click</a>
    You can see that the href is used in the above part of code to just redirect the code to the current page and not to any other page. This is just you are testing something in your code and want to be on the same page, when ever you click the link.

  4. #4
    Join Date
    Nov 2009
    Posts
    446

    Re: <A HREF="#" onClick="window.open ('sitename.html') ...>

    Hello,
    See the example below
    Code:
    <A HREF="rsmpg.html">resume</A>
    This will redirect you to the rsmpg.html page and not the same page in the case of which you are talking above. Also the HREF refers to the anchor link.

  5. #5
    Join Date
    Nov 2009
    Posts
    330

    Re: <A HREF="#" onClick="window.open ('sitename.html') ...>

    Hello,
    The href has few value that you would like to now about.
    Code:
    - an absolute url - which can point to another web site
    - a relative url - this will point to a file
    - an anchor url - an anchor within a page
    These are the options that you can use with the href. If you need any more help then you can post back.

Similar Threads

  1. Replies: 7
    Last Post: 04-01-2012, 09:14 PM
  2. Changing Default View In WORD 2007 "Open" Window?
    By TopHawkeye in forum Windows Software
    Replies: 4
    Last Post: 30-07-2010, 02:21 AM
  3. Replies: 6
    Last Post: 18-05-2010, 12:27 AM
  4. CSS Button onclick event href="#" onclick="
    By Cornnelius in forum Software Development
    Replies: 6
    Last Post: 14-05-2010, 11:20 PM
  5. href="javascript:func()" vs href="#" onclick="javascript:func()"
    By BansiJI in forum Software Development
    Replies: 6
    Last Post: 12-05-2010, 10:02 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,300,416.33809 seconds with 17 queries