flash mx - _Post php problem

  • divx
  • Born
  • Born
  • divx
  • Posts: 3

Post 3+ Months Ago

Hi there, im trying to do 2 things, but i cant seem to satisfy one without discluding the other

1stly I need to open a new page (be it html or php) using action script eg:

PHP Code: [ Select ]
function openPage() {
 getURL("javascript:openNewWindow('http://www.example.com','thewin', 'height=200,width=250,toolbar=no,scrollbars=no')");
  1. function openPage() {
  3.  getURL("javascript:openNewWindow('http://www.example.com','thewin', 'height=200,width=250,toolbar=no,scrollbars=no')");
  5. }

However to this new page I want to post variables to it (not _GET but _POST, since I need to send a user name and password), the resulting page can be html or php, but what is important is that it is opend as a new page, and recieves the variables via post

I usualy send variable to vai _POST to back end php scripts which operate behind the scene with something like this:
PHP Code: [ Select ]
var serverPage1:String = "http://www.example.com/MySave.php"
var serverIn1:LoadVars = new LoadVars()
var serverOut1:LoadVars = new LoadVars()
function SaveStuff() {
serverOut1.Avariable = WhatEverValue;
serverOut1.sendAndLoad(serverPage1, serverIn1, "post");
  2. var serverPage1:String = "http://www.example.com/MySave.php"
  4. var serverIn1:LoadVars = new LoadVars()
  6. var serverOut1:LoadVars = new LoadVars()
  10. function SaveStuff() {
  12. serverOut1.Avariable = WhatEverValue;
  14. serverOut1.sendAndLoad(serverPage1, serverIn1, "post");
  16. }

But i cant figure out a way of both opening up a new page and posting the varibles to it (without sending then to a url which contain the variables- which i do not want to do)

Any ideas?
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1252
  • Loc: Ro

Post 3+ Months Ago

I don't get the point behind this.
Why opening a page from javascript and then posting values to it, when you can open it directly from flash using getURL or send or sendAndLoad with POST method. Can you explain what you are trying to do?
  • divx
  • Born
  • Born
  • divx
  • Posts: 3

Post 3+ Months Ago

without the JS you might find it hard to do things like:
  • joebert
  • Genius
  • Genius
  • User avatar
  • Posts: 13511
  • Loc: Florida

Post 3+ Months Ago

Javascript has the XMLHTTPRequest object, which supports POST operations.

Is this on the same domain ?
Could using Flash as the transport, and ExternalInterface to modify a popup via the DOM be an option ?

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.