SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2003
    Location
    Lanka
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question using button onClick() event

    Hi guys

    in mysite I want to send the viewer to an URL when he clicks on a checkbox
    I tried to use button onClick() event but it didn't work.

    <FORM>
    <input type=checkbox name=link onClick="http://www.test.com" value="xxxx">
    </FORM>

    could someone tell me the right way?

  2. #2
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Code:
    <input type=checkbox name=link onClick="location.href='http://www.test.com'" value="xxxx">

  3. #3
    SitePoint Member
    Join Date
    May 2003
    Location
    Lanka
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it's working thanks!!!


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
  •