Ticket #1419 (closed bug: invalid)

Opened 5 years ago

Last modified 5 years ago

loadURL doesn't work if params are passed as a string

Reported by: elemoine Owned by:
Priority: minor Milestone: 2.7 Release
Component: Ajax Version: SVN
Keywords: Cc:
State:

Description

This problem was reported on the mailing list:

When calling this function the 'params' parameter doesn't work.
I think I've found why  :

When you call OpenLayers.loadURL(url, param,... ) and you give string like
param = "toto=blabla&titi=haha";

The following function (Ajax.js, line 257) :
this.options.parameters = OpenLayers.Util.getParameters(this.options.parameters);
return null.

OpenLayers.Util.getParameters() seems to need a full url like "page.php?toto=blabla&titi=haha" to work.
if you only give the params, it return null. So parameters are lost.

This looks like a bug to me.

Change History

Changed 5 years ago by elemoine

  • type changed from feature to bug
  • version changed from 2.5 to SVN
  • component changed from general to Ajax
  • milestone set to 2.7 Release

Changed 5 years ago by elemoine

  • status changed from new to closed
  • resolution set to invalid

I'm closing this. The params string must look like this: "?toto=blabla&titi=haha". Note the leading question mark! I've improved the ND comments in [7039]

Note: See TracTickets for help on using tickets.