Menu

How to move a tag and it's content?

Help
2005-02-21
2013-04-27
  • mikeliu1976

    mikeliu1976 - 2005-02-21

    regards:
                                                                                    
    How to move a tag and it"s content?
    if  a tag which is named as A,and the tag has an attribute
    named HREF.
    The attribute"s content is "Javascript:self.close()";
    Examples as follows:<A HREF="Javascript:self.close()">Close Window</A>
    How to move the tag and it"s content
    if attribute"s content containing some string like "Javascript"?
    ------------------------------------------------------------------
    My goal is as the link:
    http://www.wretch.cc/album/show.php?i=otp&b=1&f=1107098054&p=0
    ------------------------------------------------------------------
    My mobile client browser profile is
    http://nds.nokia.com/uaprof/N6600r100.xml

    The mobile client browser doesn't support "Javascript".

    To decrease the GPRS bandwidth transmission(GPRS packets transmission takes money),
    Wap2.0 Translator should filter out key word "Javascript",and tag which use key word
    "Javascript",even though mobile user can tolerate un-work link.
    remember (GPRS packets transmission takes money)!

    followings is comment from Derrick Oswald.
    ------------------------------------------------------------------
    From: Derrick Oswald <DerrickOswald@Ro...>
    Re: How to move a tag and it"s content?  
    2005-02-09 12:09 
    I don"t think you need to "move" that link, if by that you mean change
    it when the page is moved to another URL.
    Isn"t that a client side action independant of the source of the document?
    ------------------------------------------------------------------

    am I right or wrong?....@@.
    or any comments on the issue?....
                                                                                    
    Any positive suggestion is welcome.
    thank you
    May goodness be with you all

     
    • Derrick Oswald

      Derrick Oswald - 2005-02-21

      Ah, remove a tag!

      Just remove it from the list of children carried by the parent,
      or if the text is importatnt substitute a TextNode with the tags text contents (use toPlainTextString()).

       
      • Suresh Setty

        Suresh Setty - 2006-09-11

        can anyone give some sample code snippet for this?

         
        • Derrick Oswald

          Derrick Oswald - 2006-09-12

          // how to remove this tag (null checking removed for clariity):

          Tag tag;

          tag.getParent ().getChildren ().remove (tag);

           
    • mikeliu1976

      mikeliu1976 - 2005-02-23

      thank you
      May goodness be with you all ^^

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.