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
Post a Comment