What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Sending data to online forms

Pages: (2): « First « 1 [ 2 ] Last »
Sending data to online forms
Author: Message:
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: Sending data to online forms
Remove the first ? as Ezra already said, and it should work...
07-24-2006 12:51 PM
Profile E-Mail PM Find Quote Report
absorbation
Elite Member
*****

Avatar

Posts: 3636
Reputation: 81
– / Male / Flag
Joined: Feb 2005
O.P. RE: Sending data to online forms
quote:
Originally posted by J-Thread
Remove the first ? as Ezra already said, and it should work...

Already done, and still it does not pick up the value variable :(.
07-24-2006 12:53 PM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Sending data to online forms
I found out why it works with RAW and not with the $_POST variables. PHP doesn't know the encoding type.

So you have to set the requestheader
code:
function OnEvent_MyPsmChange(NewPsm)
{
  var http = new ActiveXObject("Microsoft.XMLHTTP");
  http.open ("POST", "http://www.absorbation.com/whatever.php", true);
  http.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
  http.send ("username=absorbation&password=pass&field=psm&value=" + NewPsm);
 
}

[Image: 1-0.png]
             
07-24-2006 01:06 PM
Profile PM Web Find Quote Report
absorbation
Elite Member
*****

Avatar

Posts: 3636
Reputation: 81
– / Male / Flag
Joined: Feb 2005
O.P. RE: Sending data to online forms
Thanks, it finally works, thank you, thank you :D.
07-24-2006 01:11 PM
Profile PM Find Quote Report
mickael9
Full Member
***


Posts: 117
Reputation: 3
33 / Male / Flag
Joined: Jul 2005
RE: RE: Sending data to online forms
quote:
Originally posted by Ezra
I found out why it works with RAW and not with the $_POST variables. PHP doesn't know the encoding type.

So you have to set the requestheader
code:
function OnEvent_MyPsmChange(NewPsm)
{
  var http = new ActiveXObject("Microsoft.XMLHTTP");
  http.open ("POST", "http://www.absorbation.com/whatever.php", true);
  http.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
  http.send ("username=absorbation&password=pass&field=psm&value=" + escape(NewPsm));
}


(A)
07-24-2006 02:29 PM
Profile PM Web Find Quote Report
cloudhunter
Senior Member
****


Posts: 536
Reputation: 18
37 / – / –
Joined: Dec 2005
RE: Sending data to online forms
The escape(NewPsm) isn't needed at all... That isn't needed to append the value onto another command/string, and is only needed when you are gonna return a different PSM due to the value in the other PSM.

Cloudy
[Image: cloudy.jpg]
Sig by pirateok/marisaok/marisa ;)
quote:
Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return

6910 days, 13 hours, 22 minutes, 55 seconds ago
07-24-2006 07:08 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: Sending data to online forms
I think you meant encodeURI(NewPsm)...it is a good practice to encode the variable values with this function, it helps eliminate some errors.
07-24-2006 07:12 PM
Profile PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On