Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-15-2009, 11:37 AM   PM User | #1
BubikolRamios
Senior Coder

 
Join Date: Dec 2005
Location: Slovenia
Posts: 1,876
Thanks: 114
Thanked 76 Times in 76 Posts
BubikolRamios is on a distinguished road
split replace '

Code:
  dropDownPart.innerHTML = tmpInnerHTML;
how does this tmpInnerHTML gets filled :

Code:
for (var i = 0; i < arr.length ; i++)
{
        var arr1 = arr[i].split('|');
        id_tezaver = arr1[0];                  
        term = arr1[1]  
        // if  arr1[1] contains ',   then ewerything after that disapears inside term,
        // like "bird's eyes"  becomes  "bird"
        // how to handle that  ?
       
        // bad example how I get to verify that the stuff is complete inside array
        // term = arr1[1].replace(/'/i, /oo/); 

}
BubikolRamios is offline   Reply With Quote
Old 12-15-2009, 01:25 PM   PM User | #2
gusblake
Regular Coder

 
Join Date: Jan 2006
Posts: 568
Thanks: 6
Thanked 84 Times in 84 Posts
gusblake is on a distinguished road
Code:
if(arr1[1].indexOf("'")!=-1) term=arr1[1].substring(0,arr1[1].indexOf("'"));
else term=arr1[1];
gusblake is offline   Reply With Quote
Old 12-15-2009, 02:37 PM   PM User | #3
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
innerHTML is not a standard DOM method. It will not always read/insert the elements or their attributes from/to the DOM tree. Take care of.
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:01 AM.


Advertisement
Log in to turn off these ads.