#597 enhancement

Ajax.Request does nothing with empty url in some browsers

Reported by Spezi | March 14th, 2009 @ 06:12 PM

When calling

new Ajax.Request('', { parameters: 'do=something' })

(empty string for the first argument) the request is not sent, even no JavaScript error message appears. This also happens if the first argument is null. I wanted to use this to send an XHR to exactly the same page used for generating the output. If the first argument is ' ' (space) or '.' (dot), the request is sent, but that's just a workaround.

Tested with prototype on Windows. In Firefox 3.0.7 and IE 7 the behavior is as described. For Opera 9.64 and Safari 3.2.2 the request is sent even with '' (empty string) but not with null for the first argument.

I attach a simple test environment for this using PHP. Just add prototype- and call index.php.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins