SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Beginner problems, concatenate.

    I don't see what i am doing wrong !!!

    I am using AJAX for retrieving from db 4 elements ( 2 links and 2 names ).
    It works fine!

    When i arrange my response in the page i made this : I have defined 6 vars that holds the html , then it goes like this :

    Code JavaScript:
    var text0 = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
    var text00 = ' </tr></table>';
    .
    var text2 = ' HTML STUFF';
    .
    .
     
    for ( var i=0; i<linkPozaArray.length; i++)
    	{
    		html += text0 + text1 + linkButonArray.item(i).firstChild.data + text2 + linkPozaArray.item(i).firstChild.data 
    				+ text3 + linkButonArray.item(i).firstChild.data + text4 + numeAlbumArray.item(i).firstChild.data
    				+ text5 + numeArtistArray.item(i).firstChild.data + text6 + text00;
    	}

    With the added html i am getting NaN error ? why it is evaluating to numeric ?
    What method do you use for encapsulating the response ? a more elegant method ?

    XSL stylesheet it is the answer ?

    Thanks for your time!
    Last edited by Pistocel; Jul 2, 2007 at 00:58.

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I resolved my self, i met some extra + ,

    But what about the method ?


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
  •