Shoutbox

help with forms - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: help with forms (/showthread.php?tid=71849)

help with forms by pmarcon on 02-17-2007 at 12:07 PM

how can i submit a HTML form from inside of a script????
Please i need this to finish my script!!!! :S


RE: help with forms by -dt- on 02-17-2007 at 12:12 PM

use xmlhttp and POST
http://shoutbox.menthix.net/showthread.php?tid=69...d=759603#pid759603


RE: help with forms by pmarcon on 02-17-2007 at 12:19 PM

Can you give me some example??????
it will stay something like this:

code:
var http = new ActiveXObject("Microsoft.XMLHTTP");
         http.open ("POST", "http://example", true);
         http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
         http.send ("numTelefone=000000"+"name=abcdefgh");

RE: help with forms by pmarcon on 02-17-2007 at 03:17 PM

i don't know how to do this!!!!
I need urgently of help
the problem is:
I have a HTML form, and i need pass the values that i get in the Messenger Plus script to the file *.html.
I'm thinking in use something like this
var IE = new ActiveXObject("InternetExplorer.Application");
    IE.width="";
    IE.height="";
    IE.toolbar=false;
    IE.menubar=false;
    IE.addressbar=false;
    IE.visible=true;
       IE.navigate(filepatch);

but i don't know how can i put the commands in the page!!!!


please i'm getting crazy:|
       


RE: help with forms by Matti on 02-17-2007 at 03:17 PM

code:
http.send ("numTelefone=000000"+"name=abcdefgh");
That won't work, since "a"+"b" simply gives "ab". POST-values should be separated with a & sign, so that line should be:
code:
http.send ("numTelefone=000000&name=abcdefgh");

EDIT: You don't need to open IE for this, the XMLHTTP object is made for this kind of situations! ;)
Don't forget to create a onstatuschange event!
code:
http.onreadystatechange = function() {
  if(http.readyState==4) {
    if(http.status == 200){
      //worked
      Debug("Yay! Success! Here's the returned HTML:");
      Debug.Trace(html.responseText);
    }else{
      //error
      Debug.Trace("Crap, something f*cked it up... You're sure you're not trying to run this on a Gameboy?");
    }
  }
}

RE: help with forms by pmarcon on 02-17-2007 at 04:06 PM

ok it's done when i finish the script i post here


RE: help with forms by TYL3R on 02-17-2007 at 08:05 PM

can't wait to see the script ;)


RE: help with forms by felipEx on 02-17-2007 at 08:11 PM

what about your script?
i wanna see your script :D


RE: help with forms by pmarcon on 02-17-2007 at 10:29 PM

i need tell something this script it will just work in Brazil
and i need time to finish
it's my first script but i think that it's stayng very good (realy)
maybe i tell my idea of the script before i finish =)