line break pb

Discussion in 'Javascript' started by steeve_dun@SoftHome.net, Oct 19, 2005.

  1. Guest

    Hi,

    I have this kind of code:
    Items[0]=['<a
    href="#x1">1st</a>']
    Items[1]=['<a
    href="#x2">2nd</a>']
    ....
    I need to transform it or treat it to have just:
    Items[0]=['<a href="#x1">1st</a>']
    Items[1]=['<a href="#x2">2nd</a>']
    without the line breaks.

    Can anybody help me please.
    Thanks

    -steeve
     
    , Oct 19, 2005
    #1
    1. Advertisements

  2. Hm.. see "replace" method of string type.

    Exmaple Items[0] = Items[0].replace("\n", ""); or
    Items[0] = Items[0].replace("\n\r", "");

    пиÑал(а):

    > Hi,
    >
    > I have this kind of code:
    > Items[0]=['<a
    > href="#x1">1st</a>']
    > Items[1]=['<a
    > href="#x2">2nd</a>']
    > ...
    > I need to transform it or treat it to have just:
    > Items[0]=['<a href="#x1">1st</a>']
    > Items[1]=['<a href="#x2">2nd</a>']
    > without the line breaks.
    >
    > Can anybody help me please.
    > Thanks
    >
    > -steeve
     
    Gomolyako Eduard, Oct 19, 2005
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason Coyne  Gaijin42

    Word wrap line break code and algorithm for c#

    Jason Coyne Gaijin42, Apr 8, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    25,001
    Jason Coyne Gaijin42
    Apr 8, 2004
  2. John A Grandy

    force line break inside .InnerText

    John A Grandy, Oct 17, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    7,249
    John A Grandy
    Oct 17, 2003
  3. Jacek Stepniewski

    How to break line in Label control

    Jacek Stepniewski, Dec 3, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    539
    mikeb
    Dec 4, 2003
  4. Hugo
    Replies:
    10
    Views:
    1,588
    Matt Humphrey
    Oct 18, 2004
  5. kaushikshome
    Replies:
    4
    Views:
    1,019
    kaushikshome
    Sep 10, 2006
  6. Replies:
    12
    Views:
    1,319
  7. scad
    Replies:
    23
    Views:
    1,447
    Alf P. Steinbach
    May 17, 2009
  8. Marek Stepanek
    Replies:
    12
    Views:
    670
    Peter J. Holzer
    Sep 2, 2006
Loading...