SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Jun 2004
    Location
    U.S.
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    removeChild() isn't working

    Hi experts,

    I wanted to remove the character " | " typed from keyboard on a ASPX page. But the " | " is on ASPX page which cannot be accessed. Can javascript remove the " | " listed on the ASPX page?

    <td class="prog-asset"> | <a href="/global_id=002350">Video</a> | <a href="global_id=002350">Photography</a> | <a href="global_id=002350&">Press Releases</a> |
    </td>

    Any helps would be gratefully appreciated it!!!

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,712
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by begeiste View Post
    Can javascript remove the " | " listed on the ASPX page?
    Yes it can. Just loop through the children of that prog-assets TD element, and wherever you find space-bar-space replace it with something else, such as only a space.

    Are you looking for a pointer in the right direction, or are you looking for someone to do the work for you?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2011
    Location
    Bs. As. - Argentina
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    May be it's me, but i did not saw the code of the "removeChild()" that you tried, if you got it, post it and then we can see why it does not work.

    By the way, if the " | " comes from the server, in your place i would remove it from there, not at the client.


    See you

  4. #4
    SitePoint Addict
    Join Date
    Jun 2004
    Location
    U.S.
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I have solved that problem. Appreciated for your time.


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
  •