Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  22 Jun 2018, Frederik Wauters, Forum, custom script on custom page 
    Reply  22 Jun 2018, Stefan Ritt, Forum, custom script on custom page 
       Reply  25 Jun 2018, Frederik Wauters, Forum, custom script on custom page 
Message ID: 1372     Entry time: 22 Jun 2018     Reply to this: 1373
Author: Frederik Wauters 
Topic: Forum 
Subject: custom script on custom page 
I am implementing buttons to launch scripts from a custom page. 

The simple way works, i.e.

  <input type=submit name=customscript value="run_script">

But I want to stay on the page. Copying "Customscript button without a page 
reload" from https://midas.triumf.ca/MidasWiki/index.php/Custom_Page_Features 
yields the following error:

Uncaught ReferenceError: XMLHttpRequestGeneric is not defined
    at cs_button (Trend:165)
    at HTMLInputElement.onclick (Trend:90)  

I included  <script src="mhttpd.js"></script> and call mhttpd_init on page load.

So why can`t it run this ajax request?


Or is there a better way to launch a script without messing up the page
ELOG V3.1.4-2e1708b5