SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Guru afridy's Avatar
    Join Date
    Mar 2007
    Posts
    966
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Whats Wrong with this function

    hai,

    why this function is not working?

    Code:
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <script type="text/javascript">
    function greeting(message)
    {
    alert(message);
    }
    </script>
    
    </head>
    <body>
    
    <form>
    <input type="button" value="Greet" onclick="greeting("Hai")">
    </form>
    
    </body>

  2. #2
    SitePoint Guru afridy's Avatar
    Join Date
    Mar 2007
    Posts
    966
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    ok ok friends

    i just found the problem

    it was a double quotes i ssue. below is the correct one.

    <input type="button" value="Greet" onclick="greeting('Hai')">


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
  •