jquery - passing var with quote from parent to child in javascript -


i try differents ways of passing variables parent child jquery , ve got issues text containing quote:

in child popup create html element embedding javascript calling method parent, 1 of variable (label) string can contains quote, if try display content on parent page, string cut after first quote.

.data( "ui-autocomplete" )._renderitem = function( ul, item ) {   $('#grille_table').append( "<tr><td><img onclick=parent.updatefunction('"+ item.id +"',this.title,this.src); src=/uploads/media/source/"+ item.image +" width=100 height=100 title='"+ item.label +"' />"+ item.label +"" ); 

how can achieve ?

thx

i think mean

.data( "ui-autocomplete" )._renderitem = function( ul, item ) {   $('#grille_table').append(     '<tr><td><img onclick="parent.updatefunction(\''+    item.id +   '\',this.title,this.src);" src="/uploads/media/source/'+    item.image +   '" width="100" height="100" title="'+    item.label +   '" />'+ item.label); } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -