mindboggle
07-26-2002, 10:46 PM
Does anyone know where I can find some JavaScript that will let me do the text insert the same way you can do it here? You know how when you click a smilie on the left (when creating a thread) it automatically places the text for the similie you choose in the text area? That's what I'm looking for.
Studio64
07-26-2002, 11:03 PM
Right Click -> View Source....
mindboggle
07-26-2002, 11:58 PM
I tried that, but I couldn't find the javascript that controlled it.
romeo
07-27-2002, 01:03 AM
<script language="javascript">
<!--
var postmaxchars = 10000;
function validate(theform) {
if (theform.message.value=="") {
alert("Please complete the message field.");
return false; }
if (postmaxchars != 0) {
if (theform.message.value.length > 10000) {
alert("Your message is too long.\n\nReduce your message to 10000 characters.\nIt is currently "+theform.message.value.length+" characters long.");
return false; }
else { return true; }
} else { return true; }
}
function checklength(theform) {
if (postmaxchars != 0) { message = "\nThe maximum permitted length is 10000 characters."; }
else { message = ""; }
alert("Your message is "+theform.message.value.length+" characters long."+message);
}
//-->
</script>
<script language="Javascript" src="vbcode.js"></script>
<script language="Javascript" src="vbcode_language.js"></script>
Part of the reason, you can't see all of the code, is because it is calling other sources of java, :) but you can get the other part of the source by going to the following urls: http://www.webhostingtalk.com/vbcode.js && http://www.webhostingtalk.com/vbcode_language.js
I hope this helps :).
mindboggle
07-27-2002, 01:08 AM
D'oh :homer:
I should have seen that, thanks for pointing it out, now it works. :)
romeo
07-28-2002, 01:39 AM
No problem, i'm always here for the Web Hosting Talk members :)