I'll give it a shot....:) Thanks a lot!!!
On 14 Sep., 23:00, Miles J <[email protected]> wrote: > You need to wrap it in quotes, since it is a string. > > requestDelete('<?echo $attachment[LinkTmp][name]; ?>') > > On Sep 14, 10:35 am, Tomfox Wiranata <[email protected]> > wrote: > > > Hey, > > > this is a JQuery function i want to call when clicking the button: > > > <a onclick="requestDelete()"><img src="../img/icons/close.png" /></a> > > > and i need to pass a php variable with it since I am calling my > > controller function with it > > > function requestDelete(name) > > { > > alert("huhu"); > > $('#attachments_div').load('deleteattachment', {data: name}) > > > } > > > I tried > > > <a onclick="requestDelete(<?echo $attachment[LinkTmp][name] ?> )"><img > > src="../img/icons/close.png" /></a> > > > but it wont work... > > > thank you so much Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
