
Originally Posted by
maturs i need to evaluate a field from other usin enhanced Studio.
for example i have a button with this code
echo <<<END
<script>
</script>
<input type="button" value="BUTTON"
style="background-color: #cc0000; color: #ffffff;"
onclick=$xtpl->assign(text_c","pepe")
END
;
I want to know if the onclick sintax i correct
thanks
No, I don't think it works.
The onclick needs a single or duoble quote, and the "assign" method may not be executed inside the heredoc.
You should use the following:
PHP Code:
echo '
<script>
</script>
<input type="button" value="BUTTON"
style="background-color: #cc0000; color: #ffffff;"
onclick="'.$xtpl->assign("text_c","pepe").'">';
Bookmarks