PDA

View Full Version : Loadvars not workingon Mac


Hybrid Kat
07-30-2007, 03:39 PM
Hi,

I'm currently working on a big project and I'm almost done, but since everything went too well, a problem has risen to make me swear at my screen throwing papers everywhere and jumping on my desk like an angry baboon. :p

It's very simple : I'm sending variables to a php and on Mac it's not working!

var myLoadVar = new LoadVars();
monLoadVar.test1 = "test";
monLoadVar.test2= "test again";
monLoadVar.send("http://www.blablabla.com/email.php","GET");

On PC (IE, FF) it works perfectly. On Mac (Safari, Opera, Camino) there's nothing more in the address bar.

PC : email.php?test1=test&test2=test%20again
Mac : email.php

Anyone has an explanation?

HK

grass
07-30-2007, 05:04 PM
ok... don't use loadvars.send but still... is the url just empty or are the params also missing if you do $_GET["param"] ?

I mean it should work with all browsers... sendandload does atleast....

if not you can use alternative:


__url = "somefile.php?";
__url+="param=value&";
__url+="param2=valuex";
getURL(__url);

Hybrid Kat
07-30-2007, 05:40 PM
The params are missing too. There's nothing in the address bar beside the email.php

I'll stick with your alternative since it's so obvious :p Why didn't I think of that? :rolleyes:

I still can't see why it wasn't working on Mac, but I can live with it.

Thanks!

thatblokemike
07-30-2007, 06:20 PM
maybe try POST instead of GET

quickly
07-30-2007, 06:28 PM
I think you that you need to specify the target window. The way your code is right now "GET" is where the target window should be.


like this
monLoadVar.send("http://www.blablabla.com/email.php","_self","GET");

Hybrid Kat
07-30-2007, 06:32 PM
You were right Quickly, with _self all works very well :)

And I can't put POST since I'm using a projector (sorry, forgot to tell) =^.^=

Thanks again :D