SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict Feudalism's Avatar
    Join Date
    Jun 2002
    Location
    Buenos Aires, Argentina
    Posts
    361
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE working, FF not.

    IE working:

    Code:
    document.getElementById('status/one').value='B';
    What do I need to change in FF?

  2. #2
    SitePoint Evangelist bals28mjk's Avatar
    Join Date
    Aug 2007
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mind posting more code.

  3. #3
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Definition of ID attribute:
    String that specifies or receives any alphanumeric string that begins with a letter. The underscore (_) can also be used.

    So - no slashes /

  4. #4
    SitePoint Evangelist bals28mjk's Avatar
    Join Date
    Aug 2007
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jimfraser
    Definition of ID attribute:
    String that specifies or receives any alphanumeric string that begins with a letter. The underscore (_) can also be used.

    So - no slashes /
    Your wrong.

  5. #5
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bals28mjk View Post
    Your (sic) wrong.
    Care to expand on that?

    I got my info from:
    http://msdn2.microsoft.com/en-us/library/ms533880.aspx

    Also, w3c validator has this to say:
    Code:
     Line 3, Column 13: character "/" is not allowed in the value of attribute "ID".
    <a id="status/one">test</a>

  6. #6
    SitePoint Evangelist bals28mjk's Avatar
    Join Date
    Aug 2007
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Care to expand on that?
    Sure. I got my info by testing . That’s not his problem, it works in all major browsers. He needs to post more code so we can see what's causing his script not to work.

  7. #7
    SitePoint Addict Feudalism's Avatar
    Join Date
    Jun 2002
    Location
    Buenos Aires, Argentina
    Posts
    361
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <input name="status/editar/cantidades_de_ejemplo/9" type="text" value="S">
    <img src="iconos/ico_borrar.gif" alt="Borrar" width="16" height="16" border="0" onClick="document.getElementById('status/editar/cantidades_de_ejemplo/9').value='B';">
    Exactly this, works in IE, but not on FF. Test it yourself: http://www.reev.halconweb.com.ar/prueba_cantidades.php

    Thanks!

  8. #8
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Error: document.getElementById("status/editar/cantidades_de_ejemplo/9") has no properties
    Source File: http://www.reev.halconweb.com.ar/prueba_cantidades.php
    Line: 1
    That's what the Javascript Console in FF tells me.

    And the reason? You have defined a NAME for that element but not an ID.
    Ian Anderson
    www.siteguru.co.uk


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
  •