Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/form/submitlink.php
Go to the documentation of this file.
00001 <?php
00002 global $CFG;
00003 require_once("$CFG->libdir/form/submit.php");
00004 class MoodleQuickForm_submitlink extends MoodleQuickForm_submit {
00005     var $_js;
00006     var $_onclick;
00007     function MoodleQuickForm_submitlink($elementName=null, $value=null, $attributes=null) {
00008         parent::MoodleQuickForm_submit($elementName, $value, $attributes);
00009     }
00010 
00011     function toHtml() {
00012         $text = $this->_attributes['value'];
00013         $onmouseover = "window.status=\'" . $text . "\';";
00014         $onmouseout = "window.status=\'\';";
00015 
00016         return "<noscript><div>" . parent::toHtml() . '</div></noscript><script type="text/javascript">' . $this->_js . "\n"
00017              . 'document.write(\'<a href="#" onclick="' . $this->_onclick . '" onmouseover="' . $onmouseover . '" onmouseout="' . $onmouseout . '">'
00018              . $text . "</a>');\n</script>";
00019     }
00020 }
 All Data Structures Namespaces Files Functions Variables Enumerations