User Tag List

Results 1 to 8 of 8

Thread: Need help with the "Get Object" function in HTML5

  1. #1
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Jan 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with the "Get Object" function in HTML5

    I have a mental error somewhere.
    I want to send two fixed variable values to a (already finished and functional) PHP script.
    However, the data does not arrive at the PHP script.

    Definition in fusion:
    : ADD Post Data "x1" = "1"
    : ADD Post Data "x2" = "2"
    Get Url "https:// www. Homepagename .com / scriptname.php"
    (Spaces are intentionally inserted.)

    I just can't figure out where my fault might be. Can anyone help?

  2. #2
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,675
    Mentioned
    284 Post(s)
    Tagged
    4 Thread(s)
    Get Object can only be running from web server if you are planning to make a post request this is a security concept used in HTML5

    be sure that your web server allow you to make post, check CORS
    most important here

    https://enable-cors.org/server.html

    the 2 first lines

    and for your PHP

    https://developer.mozilla.org/en-US/...Access_Control
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  3. #3
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Jan 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mhhh...
    Somehow different than before with Flash and Co.
    But OK, I'll try "Header set Access-Control-Allow-Origin' *'" in the. htaccess.

    Thanks for the tip!!!

  4. #4
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,675
    Mentioned
    284 Post(s)
    Tagged
    4 Thread(s)
    Totally different, flash only need a policy file, here you need to add at least this feature inside your .htaccess or the file name that your web provider mention to you
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  5. #5
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Jan 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's probably true.

    At the moment I am trying to integrate the app into my framework. When I call up the app using the standard file (created by Fusion) on my server, everything works without problems. However, if I integrate them into the framework, nothing will be displayed.

    I will probably have to work with iframes after all. ;o)

  6. #6
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Jan 2017
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If someone should have the same problems, below is the solution for my problem.

    Apache CORS / .htaccess
    <IfModule mod_headers.c>
    Header add Access-Control-Allow-Origin "*"
    Header add Access-Control-Allow-Methods: "GET,POST"
    Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
    </IfModule>

    PHP side variable reception does not work with $_GET:
    $variable01 = $_POST["variable01"];
    $variable02 = $_POST["variable02"];

    Sometimes the simplest things are the hardest to solve.

    Best regards

  7. #7
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,675
    Mentioned
    284 Post(s)
    Tagged
    4 Thread(s)
    this will help many users
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    158
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This is seriously exactly what I was looking for! Thank you!

Similar Threads

  1. Replies: 6
    Last Post: 15th June 2016, 06:05 PM
  2. Replies: 0
    Last Post: 29th October 2015, 08:42 AM
  3. Replies: 6
    Last Post: 18th August 2015, 02:23 AM
  4. Issues with "Clickteam Movement Controller" and "Runtime" Object
    By jimmyorpheus in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 29th November 2011, 07:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •