Re: [SMARTY] problem with slashes in section

From: Date: Tue, 09 Sep 2003 18:07:58 +0000
Subject: Re: [SMARTY] problem with slashes in section
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10182@lists.php.net to get a copy of this message
Sorry. I must apologise. I making the changes to the wrong but simliar tpl so no matter what changes i made ... nothing would work. DOH!!!! Thank you anyway. -Gerard ----- Original Message ----- From: "Gerard L Petersen" <gerard@gamelink.co.za> To: <smarty-general@lists.php.net> Sent: Tuesday, September 09, 2003 7:51 PM Subject: [SMARTY] problem with slashes in section Hi I have a strange problem in my php i have this in a loop: $smarty->append('name', $row['name']); $smarty->append('slashed_name', addslashes($row['name'])); its the same thing except on is slashed and in my tpl i have this to generate some javascript: {section name=a_index loop=$slashed_name} if(document.formname.eventtype.options[document.formname.eventtype.selectedI ndex].text == '{$slashed_name[a_index]}') MM_swapImage('thumb_image','','{$thumbnail[a_index]}',1); {/section} and then later on i populate a drop down list with the smarty array $name output comes out as this: if(document.formname.eventtype.options[document.formname.eventtype.selectedI ndex].text == 'Girl's Night') MM_swapImage('thumb_image','','/images/blank.gif',1); for some reason the Girl's Night isnt slashed and its still causing javascript errors Any Ideas Thanks -Gerard

« previous php.smarty.general (#10182) next »