
|
If you were logged in you would be able to see more operations.
|
|
|
Loom
Created: 24/Mar/09 08:03 PM
Updated: 25/Mar/09 04:02 PM
|
|
| Component/s: |
None
|
| Affects Version/s: |
None
|
| Fix Version/s: |
1.5
|
|
|
I'd like to be able to specify the HTTP method in links.
The tricky thing here is that anchors always use GET, but the other verbs (like DELETE) should be POSTed, i.e. some JS is needed to intercept the click on the link.
|
|
Description
|
I'd like to be able to specify the HTTP method in links.
The tricky thing here is that anchors always use GET, but the other verbs (like DELETE) should be POSTed, i.e. some JS is needed to intercept the click on the link.
|
Show » |
|
For this to work, the user should add his/her own javascript code like this:
$(document.body).observe('click', function(e) {
var a = e.findElement('a[method]');
if (a) {
e.stop();
new Ajax.Request(a.href, { method: a.getAttribute('method') });
}
});
Right now, it's such a small amount of code that we are not adding it to our javascript library. We'll wait until some clear use case arises.