Results 1 to 5 of 5

Thread: onclick function

  1. #1
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default onclick function

    ok I have this onclick thing for my textarea box. Just one thing,

    when i try putting a image attribute to a input it gives me a wierd Url and everything is not working fine...?
    Code:
    <INPUT TYPE="image" VALUE="B" onClick="insertAtCaret(this.form.Copy,'B');" ID="BoldButton" 
    
    NAME="BoldButton" src="http://www.xudas.com/images/xudasaffy.gif">
    I have also tried putting a onclick attribute to a image tag but it doesn't work?
    Code:
    <img src="http://www.xudas.com/images/xudasaffy.gif" border="0" 
    
    onClick="insertAtCaret(this.form.Copy,'B');" ID="BoldButton" NAME="BoldButton">
    I don't know how to fix this, but you can see for yourself and please let me know how to fix this... thanks
    Click here to see

    Thankyou
    Last edited by insanemonkey; 10-07-2007 at 10:24 PM.
    Hey new design new look, goto xudas for personal webdsign help.. (:

  2. #2
    Join Date
    May 2007
    Location
    USA
    Posts
    373
    Thanks
    2
    Thanked 4 Times in 4 Posts

    Default

    It doesn't work in firefox.

    You probably should get in the habbit of lowercasing your tags and tag attributes as well as closing empty tags (" />") for two reasions: XML and more importantly, readability.

    Code:
    <input type="image" value="B" onclick="insertAtCaret(this.form.Copy,'B');" id="BoldButton" 
    name="BoldButton" src="http://www.xudas.com/images/xudasaffy.gif" />
    Trinithis

  3. #3
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    ooops, it doesn't work in IE thats what I am trying to say
    Hey new design new look, goto xudas for personal webdsign help.. (:

  4. #4
    Join Date
    May 2007
    Location
    USA
    Posts
    373
    Thanks
    2
    Thanked 4 Times in 4 Posts

    Default

    Here:

    Code:
    <img
       onclick="insertAtCaret(document.getElementById('frmAdd1').Copy,'B');" 
       src="http://www.xudas.com/images/xudasaffy.gif"
       alt="xudasaffy.gif"
       />
    Oh, and by the way, document.all.FinishedText is null or is not an object.
    Trinithis

  5. #5
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thankyou for your help, im going to test it,... yay..
    Hey new design new look, goto xudas for personal webdsign help.. (:

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
  •