SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Nov 2000
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    place button in javascript

    I try to change the text link to button in the uebimiau mail script:

    In readmsg.htm, below is the code to click to reply, reply to all, forward and so on:

    <a class="menu" href="javascript:goback()">Back</a> ::
    <a class="menu" href="javascript:reply()">Reply</a> ::
    <a class="menu" href="javascript:replyall()">Reply to All</a> ::
    <a class="menu" href="javascript:forward()">Forward</a> ::

    I try to place a button instead of the link to make it easier to see, so I did this with the Reply to All button:

    <a class="menu" href="javascript:replyall()"><input type="button" value="Reply to All"></a>

    However, it doesn't work, the button is there, but nothing happen when I click on it. I don't know anything about javascript, please help.

  2. #2
    SitePoint Zealot
    Join Date
    Nov 2000
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind, I think I found out how, correct me if I'm wrong:

    <input type=button onClick=replyall() class=menu>

  3. #3
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks good to me, but I'd put double quotes around your attribute values

    <input type="button" onClick="replyall()" class="menu">
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





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
  •