Jörn,
Did you implement 'before' (with forms conflicts) or some other callback
name('prep','prepare','b4','preprepare'....)
Also, in the examples you (and everyone else) are calling the parameter to
'before' xml... it should be req , it's not the dom, it's the request. I
found that more confusing than had it been named 'parm'
(U couldn't get into svn right now)
On 12/5/06, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
Abdur-Rahman Advany schrieb:
> Hi,
>
> Is there a way I can change the accept header of ajax requests? as rails
> uses the accept header to load rjs (and it would be nice not to prepend
> .rjs on all requests).
>
> maybe someone already figure out a way to use jquery ajax and rails to
> replace rjs (with minus_r)?
>
With the latest revision of jQuery (not yet released, but available via
SVN), you could do something like this:
$.ajax({
...,
before: function(xml) {
xml.setRequestHeader("Accept", "whatever-you-need-here");
}
});
Would that do the trick?
--
Jörn Zaefferer
http://bassistance.de
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
--
Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/