Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: onClick

Parašė ramon· 2008 Kov. 19 17:03:41
#3

Veiks jeigu pridesi script`a arba include :);)

#1.
echo "<script>
function insertText(elname, what) {
   if (document.forms['inputform'].elements[elname].createTextRange) {
      document.forms['inputform'].elements[elname].focus();
      document.selection.createRange().duplicate().text = what;
   } else if ((typeof document.forms['inputform'].elements[elname].selectionStart) != 'undefined') { // for Mozilla
      var tarea = document.forms['inputform'].elements[elname];
      var selEnd = tarea.selectionEnd;
      var txtLen = tarea.value.length;
      var txtbefore = tarea.value.substring(0,selEnd);
      var txtafter =  tarea.value.substring(selEnd, txtLen);
      var oldScrollTop = tarea.scrollTop;
      tarea.value = txtbefore + what + txtafter;
      tarea.selectionStart = txtbefore.length + what.length;
      tarea.selectionEnd = txtbefore.length + what.length;
      tarea.scrollTop = oldScrollTop;
      tarea.focus();
   } else {
      document.forms['inputform'].elements[elname].value += what;
      document.forms['inputform'].elements[elname].focus();
   }
}
</script>";




#2.

echo "<script type='text/javascript' src='".INCLUDES."jscript.js'></script>";



#3. Nauduokis subheader.php

Redagavo kiskiss· 2008 Kov. 19 17:03:42