[TYPO3] Handling Typo3 database with JavaScript commands

Tapio Markula tapio.markula at atwebteam.com
Thu Oct 26 09:34:36 CEST 2006


Hi

I tried to make from 'hidden' field a button usin <a...><img...

I found
http://www.quirksmode.org/js/forms.html.

I think I don't need any Typo3-specific JavaScript functions.

but just generic document.element.name.value=value syntax

$panel .= '<a href="#" 
onclick="document.editform.data['.$key.']['.$uid.'][hidden].value='.$hidden.';document.editform.submit(); 
return false;">';
     that didn't work - maybe problem with the name - names are normally 
simple, but in Typo3 forms they are array names.
I tried by adding \

$panel .= '<a href="#" 
onclick="document.editform.data[\''.$key.'\'][\''.$uid.'\'][\'hidden\'].value=\''.$hidden.'\';document.editform.submit(); 
return false;">';

Neither
<a href="#" 
onclick="document.editform.data['tt_content'][37][hidden].value=1;document.editform.submit(); 
return false;">
      nor
  <a href="#" 
onclick="document.editform.data['tt_content']['37']['hidden'].value='1';document.editform.submit(); 
return false;">
work

There is no explanation for these kinds of situations and the syntax is 
not valid. I just don't know how to define
the form command.

Do someone know how to define those or know some other page, which 
explains more thoroughly this, I would be pleased.



More information about the TYPO3-english mailing list