Results 1 to 4 of 4

Thread: Onclick and Firefox3

  1. #1
    Join Date
    Nov 2005
    Posts
    930

    Onclick and Firefox3

    I'm experiencing a very strange behaviour in Firefox.
    I have a button with a onclick

    Code: HTML

    Code:
    <button type="button" style="border:solid 0px #FFFFFF; width= 70px; height= 33px; background:transparent; cursor:pointer; " onclick="insertEvent('ValiderDonnees.php', 'Donnee', '', 'Valider')"><img src="../Images/Valider.png" alt="Valider" width="70" height="33" border="0">
    The script is
    Code: JavaScript
    Code:
    function insertEvent(FichierAMD, Source, Cible, ParentNoeud){
    var source = Source;
    alert(source);
    var conteneur = ParentNoeud;
    alert(container);
    }
    This works very well with IE, Safari, Opera but not in FF irrespective of the OS (Mac or Windows).
    With a onclick alert ( "Hello") everything is working properly.
    page is located or the button is loaded via a routine ajax! How can this be explained. Thank you for your help

  2. #2
    Join Date
    Dec 2007
    Posts
    1,599
    I think you will have to save input as tag and not button ^ ^

    HTML Code:
    <input type="button" style="border:solid 0px #FFFFFF; width= 70px; height= 33px; background:transparent; cursor:pointer; " onclick="insertEvent('ValiderDonnees.php', 'Donnee', '', 'Valider')"><img src="../Images/Valider.png" alt="Valider" width="70" height="33" border="0">
    Firefox is very strict it does not pass errors and so much mistakes.

    and also surprising as it may seem, a Firefox is a panda and not a fox ^

  3. #3
    Join Date
    Nov 2005
    Posts
    930
    Thank you for your swift response,
    Indeed it was input button instead.

  4. #4
    Join Date
    Dec 2007
    Posts
    1,547
    You may also need to lowercase the C, especially if you use an XHTML doctype.

Similar Threads

  1. CSS Button onclick event href="#" onclick="
    By Cornnelius in forum Software Development
    Replies: 6
    Last Post: 14-05-2010, 11:20 PM
  2. onClick - change href
    By Neutrals in forum Software Development
    Replies: 6
    Last Post: 12-05-2010, 09:25 AM
  3. A Href And OnClick Button
    By Endowed in forum Software Development
    Replies: 5
    Last Post: 11-05-2010, 10:24 PM
  4. Onclick event with DIV tag
    By ISAIAH in forum Software Development
    Replies: 5
    Last Post: 03-03-2010, 04:45 PM
  5. Retrieve a value with onclick
    By Sujit15 in forum Software Development
    Replies: 5
    Last Post: 05-01-2009, 03:47 PM

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,711,631,783.79024 seconds with 17 queries