Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 7 of 7

Thread: Medialab, HTML and redirections to PHP

  1. #1

    Medialab, HTML and redirections to PHP

    I wanted to present a page which is written in PHP. I made a html document with a redirection to the index of the php-page. Just using IE as stand-alone, everything works. I can click on the links and everythings fine. The trouble starts when I put the html-redirection file in Medialab. If I have luck the index page appears on the screen. But if I want to click a link, a white screen appears followed by the ML-instruction window that the session is completed (the html-file is the only file/item in the questionaire). It gets also more worse if I set a direct link to one of the subcategories/links of the page. Then, once again, only a white screen appears followed by the instruction window. Any suggestions why it doesn´t work? Maybe problems with php?


  2. #2
    Join Date
    Nov 2005
    Were you presenting the HTML page as an HTML item or as a Custom item in your questionnaire? Or maybe it was entered in your Experiment file? I'd be curious to get a copy of the que (or exp) file that calls it as well as a copy of the html and php files. Is this version 2006?

    ps., for other users, Tom found the following work around:

    it´s not necessary to answer my question in the forum immediately. I made it in another way: I start the internet explorer via the Iexplore.exe command and put the url in the parameters.
    It works ;-)

  3. #3


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

  4. #4
    Join Date
    Nov 2005
    I also wonder if you were doing this within a .exp file or within a .que file. If using a .que file and the HTML item type, you should be able to enter a .php filename. For example, if you do that and enter http://www.empirisoft.com/support/index.php, you should see this support page pop up in your questionnaire. If that doesn't happen, I'd like to see that que file!

  5. #5
    I guess now I know why it didn´t worked last time. Recently, I had a similar problem recently and as you sayed my php-page was presented within ML, but all the options which were programmed in php were not available. In the html file I used recently I set some text-form fields on readonly and added php-variables which should be presented instead of type-in-text-form field, and instead the variables values only the php-code was presented (the <?php ...>). So I guess that the problem simply was that php-code was not parsed if you just click a file into ML by using the html-item (i.e. by not calling php-files by an url), and then of course all other links which directed to another location in the same php-file were also "broken". Rookie-mistake made by me, sorry.


  6. #6
    Join Date
    Nov 2005
    So after all that, all is well?

  7. #7


Posting Permissions

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