flash mx - _Post php problem

  • divx
  • Born
  • Born
  • No Avatar
  • Joined: Jul 22, 2007
  • Posts: 3
  • Status: Offline

Post July 22nd, 2007, 3:11 pm

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() {
  2.  
  3.  getURL("javascript:openNewWindow('http://www.example.com','thewin', 'height=200,width=250,toolbar=no,scrollbars=no')");
  4.  
  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");
 
}
  1.  
  2. var serverPage1:String = "http://www.example.com/MySave.php"
  3.  
  4. var serverIn1:LoadVars = new LoadVars()
  5.  
  6. var serverOut1:LoadVars = new LoadVars()
  7.  
  8.  
  9.  
  10. function SaveStuff() {
  11.  
  12. serverOut1.Avariable = WhatEverValue;
  13.  
  14. serverOut1.sendAndLoad(serverPage1, serverIn1, "post");
  15.  
  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?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 22nd, 2007, 3:11 pm

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post July 23rd, 2007, 2:38 am

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?
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • divx
  • Born
  • Born
  • No Avatar
  • Joined: Jul 22, 2007
  • Posts: 3
  • Status: Offline

Post August 30th, 2007, 4:54 am

without the JS you might find it hard to do things like:
height=200,width=250
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post August 30th, 2007, 6:37 am

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 71 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.