#1
  1. junior vice president
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Location
    Springfield
    Posts
    251
    Rep Power
    13

    Question Javascript Errors loading DevShed page


    I just noticed this (happend to be viewing DevShed code... ahem!) but I keep getting JavaScript errors whenever I use the 'Send Reply' on PM.

    IE window pops up telling me the error is on line 39 - here is the line(s):
    Code:
    <!--<script type="text/javascript" language="javascript" src="http://forums.devshed.com/spellcheck/spch.js"></script>-->
    <script language="javascript">
    <!--
    var pmmaxchars = ;
    function validate(theform) {
    	if (theform.touser.value=="" || theform.message.value=="" || theform.title.value=="") {
    		alert("Please complete the recipient, subject and message fields.");
    		return false; }
    	if (pmmaxchars != 0) {
    		if (theform.message.value.length > ) {
    			alert("Your message is too long.\n\nReduce your message to  characters.\nIt is currently "+theform.message.value.length+" characters long.");
    			return false; }
    		else { return true; }
    	} else { return true; }
    }
    function checklength(theform) {
    	if (pmmaxchars != 0) { message = "\nThe maximum permitted length is  characters."; }
    	else { message = ""; }
    	alert("Your message is "+theform.message.value.length+" characters long."+message);
    }
    //-->
    </script>
    Is var pmmaxchars = ; valid? Also, the if statement below it, can you do something like that in JS?

    Anyway, just wanted to find out if anybody else experiences this.

    Thanks,

    nao
    Last edited by nao; July 9th, 2003 at 04:54 PM.
    NAO'S DISCLAIMER
    YOU MAY FREELY APPLY, ENTIRELY AT YOUR OWN RISK, ANY ADVICE,
    IDEAS, METHODOLOGIES OR CODE CONTAINED IN THIS POSTING.
  2. #2
  3. Perl Monkey
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    May 2003
    Location
    the far end of town where the Grickle-grass grows
    Posts
    1,860
    Rep Power
    109
    I use Opera and, by default, the javascript console does not open on error. While I was working with some JS elsewhere I had it on and forgot to turn it off. The number of pages out there with errors, devshed included, amazes me. Either that, or Opera's pickier than other browsers. I decided I rather enjoyed being ignorant and turned the thing off again.

    __________________
    what nao said
  4. #3
  5. junior vice president
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Location
    Springfield
    Posts
    251
    Rep Power
    13

    baaaaaaaaaad javascript! down boy! down!


    You know, since I installed SP4 on my Win2K machine, I've begun noticing more and more JS errors all over the place. I guess I had debugging switched off before too... don't know why SP4 should decide to switch it on... (IE6)

    Thanks for your vote of confidence on the disclaimer!

    nao
    NAO'S DISCLAIMER
    YOU MAY FREELY APPLY, ENTIRELY AT YOUR OWN RISK, ANY ADVICE,
    IDEAS, METHODOLOGIES OR CODE CONTAINED IN THIS POSTING.

IMN logo majestic logo threadwatch logo seochat tools logo