SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,180
    Mentioned
    65 Post(s)
    Tagged
    2 Thread(s)

    Prevent new line after JS text update

    Code HTML4Strict:
    <td><strong>Desired Username:</strong></td>
    <td><input type="text" name="username" id="username" onkeyup="checkUsername(this.value)" value="" class="errorInput" />
    <span id="message"><span class="error">Handle must consist of letters and numbers.</span></span>
    </td>

    This displays fine until I use javascript to update the span "message". I have no way of viewing the source after the update. Originally the span sits next to an input field but then drops to a new line after the update. Any ideas what would cause this and how to stop it?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,167
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    I have no way of viewing the source after the update.
    Why not? Normally you can view source in a browser, or inspect elements with Firebug.

    Originally the span sits next to an input field but then drops to a new line after the update. Any ideas what would cause this and how to stop it?
    Can you show the CSS associated with this (after the update)? Again, it should be visible in Firebug.

  3. #3
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,180
    Mentioned
    65 Post(s)
    Tagged
    2 Thread(s)
    After some messing around I decided to go with a different approach and it's working. There must have been some white space somewhere along the line of includes.


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
  •