This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » sf_method PUT DELETE uses javascript? What about users with it turned off?
sf_method PUT DELETE uses javascript? What about users with it turned off? [message #103252] Thu, 29 July 2010 17:11
rob.davidson84  is currently offline rob.davidson84
Messages: 15
Registered: June 2010
Junior Member
Hi.

I have tried searching the forums for answers to my question and google but did not manage to find anything. So any feedback is appreciated.

Basically
link_to('Delete', 'admin_permission_delete', $permission, array('method' => 'delete')) 


creates
<a href="/frontend_dev.php/admin/permission/4/delete" onclick="var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'post'; f.action = this.href;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', 'sf_method'); m.setAttribute('value', 'delete'); f.appendChild(m);var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_csrf_token'); m.setAttribute('value', '3983f382d7886e20f43568c88d38b476'); f.appendChild(m);f.submit();return false;">Delete</a>


If I disable javascript it no longer works? Can you still use the PUT and DELETE without javascript?

Previous Topic:Looking for free projects to download
Next Topic:How to filter the index view of a module ?
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software