Results 1 to 7 of 7

Thread: onClick - change href

  1. #1
    Join Date
    Mar 2010
    Posts
    204

    onClick - change href

    Hi,
    I had developed a site for project work. There I need some help to make changes onClick. The other thing which I am trying to is allow the user to click on the image so that they can see large image. Now here I need some help on onClick and href support. I can manage to do that but I am not clear with the concept of this attributes. I need overview of the same for different languages.

  2. #2
    Join Date
    Apr 2009
    Posts
    569

    Re: onClick - change href

    The onclick event is associated with the click of the mouse left button . It executes the code in the onclick attribute of the HTML element on which it was applied. However, it is that the onclick event is valid onmousedown and onmouseup events (press and release the button) are made on the same element. Its most common use is on the buttons but it is also possible to attach the onclick event for many tags including <table> <tr>, <td>, <img> <span> <label > <a>. The onclick event triggers one or more actions: they can be either code or the call to one or more functions written in script blocks.

  3. #3
    Join Date
    May 2009
    Posts
    529

    Re: onClick - change href

    A click can act simultaneously on several checks, for example in the case of a cell and a row of a table. In this case the execution order of the element is included (the cell) to the container element (the line). The onclick event is not necessarily the first to act on an item. For example an item will launch the script associated with the onfocus event before the one associated with the onclick event. Similarly, the ondblclick event occur subsequent to the onclick event.

  4. #4
    Join Date
    May 2009
    Posts
    637

    Re: onClick - change href

    The tag base is <A> whose attributes HREF : the destination address and TARGET : the target frame (optional). For an explanation of the frames, see chapter Frames . This tag is actually a container that is to say, it must be closed by </A> . The elements located inside (text, images) will return to a page under the action of a click. Moreover, when the mouse hovers over a link, its appearance changes: an arrow becomes a hand.

  5. #5
    Join Date
    May 2009
    Posts
    543

    Re: onClick - change href

    As you can see, in the below example the destination address specified in value to the attribute HREF can be relative or absolute. It may also contain ski endorsements directory. Just as web pages, GIF, PNG and JPG TXT documents but also can be marked by links. <A HREF=" thenameofwebsite " TARGET=" _top > Back to my Home. You will just need to edit that.

  6. #6
    Join Date
    May 2008
    Posts
    2,389

    Re: onClick - change href

    The text links appear underlined and in color defined by the tag about the images they are shown to a border with a thickness of two pixels and color of text links. When one wishes to create a large page, it is preferable to insert a menu with links to internal hyper-text page (like this page). For this we use the same tags but this time the destination address is a keyword preceded by sharp musical sign # . And it will, within the page insert a marker tag whose id is the key word for a mouse click on the link toward the marker.

  7. #7
    Join Date
    May 2009
    Posts
    511

    Re: onClick - change href

    It is interesting to share a mouse click to allow your visitors to leave you a message. To do this, set it as the destination address syntax mailto: + your email address. There are constants on the target frame specified value to the attribute TARGET . When you make a link from an image, specify the value 0 to the attribute BORDER beacon <IMG> to remove the blue border.

Similar Threads

  1. IE7 href + onclick - both happen
    By Ucchal in forum Software Development
    Replies: 5
    Last Post: 24-05-2010, 03:58 PM
  2. Dynamic HREF on onClick
    By hounds in forum Software Development
    Replies: 6
    Last Post: 13-05-2010, 11:53 PM
  3. onclick=location.href (new window)
    By Raja-Ji in forum Software Development
    Replies: 6
    Last Post: 12-05-2010, 10:04 AM
  4. A Href And OnClick Button
    By Endowed in forum Software Development
    Replies: 5
    Last Post: 11-05-2010, 10:24 PM
  5. Cancel href via an onclick
    By Doshi1 in forum Software Development
    Replies: 5
    Last Post: 11-05-2010, 10:04 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,532,916.13263 seconds with 17 queries