Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  04 Nov 2008, Suzannah Daviel, Suggestion, <odb ... edit=1> buttons and javascript  
    Reply  09 Nov 2008, Stefan Ritt, Suggestion, <odb ... edit=1> buttons and javascript  
Message ID: 522     Entry time: 04 Nov 2008     Reply to this: 526
Author: Suzannah Daviel 
Topic: Suggestion 
Subject: <odb ... edit=1> buttons and javascript  
When writing custom webpages, it would be nice to be able to write code such as

<odb src="/Equipment/TITAN_ACQ/ppg cycle/trans3/time offset (ms)" edit=1>

from Javascript, e.g.
<script  type="text/javascript">
if ( flag != 3)
   document.write('<odb src="/Equipment/TITAN_ACQ/ppg cycle/trans3/time offset
(ms)" edit=1>ms');
   document.write('<odb src="/Equipment/TITAN_ACQ/ppg cycle/trans4/time offset
(ms)" edit=1>ms');

This is not translated correctly by mhttpd; the final quote and bracket get
stripped off, and it gives Javascript error

 Error: unterminated string literal
Source File: http://titan04:8089/CS/ppg_cycle?cmd=Edit&index=11
Line: 477, Column: 18
Source Code:
   document.write('<input type=text size=10 maxlength=80 name=value value="1">

I can get round this by using an input box and a combination of ODBGet and
ODBSet, but it would be easier if the edit=1 form above worked correctly, or
there was a command like ODBSet that would accept input from the user.


 would be nice is there was a command such as ODBGet or ODBSet that would work
with javascript to 
ELOG V3.1.4-2e1708b5