Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 7 of 7

Thread: Medialab, HTML and redirections to PHP

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3

    appendix

    First a few words why I started the thread: I had problems running a webpage which is programend in PHP. Using the HTML-item, I only got a blank screen (of course, its PHP ;-) ). After that I made a HMTL-file (and used the html-item) containing a redirection to my php-url. Now the page was displayed, but if I wanted to click a link, ML skipped the item.
    After that I tried to use Internet Explorer (now I use Firefox. Fortunately, Firefox is not so "user-friendly" like IE) as "stand-alone", as I wrote. It worked, but my windowsize was really crappy (it covered the "continue" button).

    Now I found an (relative) easy and quick way to run stuff which you can normally not easily embed in ML like PHP, Flash and stuff like that.
    I use the webbrowser (I know: a great insight ;-) )

    1. Start your browser directly using the exe-item in ML (so you are not forced to use IE, e.g. "firefox.exe). Put an url in the parameters (e.g. chttp://myurl.htm).
    2. Write a html-file (the myurl.htm, in this case) with a redirection (using a <meta> command in the <head>) to your page you want to show (e.g. http:localhost/myphpsite/index.php).
    3. If you´ve done this and ML starts the browser, maybe your browser window size is really crappy or covers the continue-button of medialab, just set the size and position in the HTML-File using a JavaScript (scripts can be easily found in JavaScript-ressource-platforms).
    Using Javascript, you are also able to disable/enable toolbars, scrollbars and stuff like that. Normally every application or webpage (e.g. Flash-pages) which is supported by your browser should run because now your browser is your platform instead of ML.
    ML will patiently wait in the background until you reactivate it by clicking the "continue"-button or if ML skips the trail automatically (if you set a time limit).

    I´d say that this combination is taking the best from both worlds: Using the power and flexibilty of www-programming and the easiness of editing questionaires and experiments with ML.

    But two restraints: time shouldn´t matter. The browser may need time (several seconds after your ML command) to load the page(s).
    And you should have access to a webserver.
    You´ll get no information about the links clicked by your participant.

    If you don´t have access to a webserver, use a local webserver which is installed (that means: after you have installed it!) on your lab machine.
    I use XAMPP:
    http://www.apachefriends.org/en/index.html
    After installing XAMPP you have a fully-functioning APACHE-webserver with PHP and MySQL on your machine.
    If you use XAMPP, don´t use IE. IE is too "user friendly" and you´ll get error messages which are false and not necessary. Use Firefox. If you don´t want to use firefox you can simply chance the settings of IE. The opportunity of using IE is that you have smaller toolbars.

    Addition: Soon I´ll post sample html files with javascripts for redirections (browser-windows cover or do not cover the "continue" button)
    Last edited by Thomas; 04-03-2006 at 03:14 PM. Reason: update

Posting Permissions

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