Need your help: "fuction not defined" problem

This is a discussion on "Need your help: "fuction not defined" problem" within the JavaScript Forum section. This forum, and the thread "Need your help: "fuction not defined" problem are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 4th, 2006, 13:30
New Member
Join Date: Sep 2006
Location: Ukraine
Age: 21
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Need your help: "fuction not defined" problem

Hello everybody! I have a problem, in IE my code works properly, but Firefox writes "Error: guardMaxLength is not defined" the code is following:

checklength.js
Code: Select all
function guardMaxLength(ta,event)
{    
    maxlength=parseInt(ta.maxlength,10);
    if(ta.value.length>=maxlength)
    {    
       return false
    }
    ta.value=value;
}
HTML: Select all
<script type="text\JavaScript" src="checkLength.js">

</script>
<textarea maxlength="10" onkeypress="return guardMaxLength(this, event)" >
Thanks a lot!
Reply With Quote

  #2 (permalink)  
Old Oct 4th, 2006, 20:06
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Need your help: "fuction not defined" problem

The slash in 'text\JavaScript' is the wrong way round and I suggest you use all lowercase. So you want;
Code: Select all
<script type='text/javascript'....
Reply With Quote
  #3 (permalink)  
Old Nov 2nd, 2006, 14:50
New Member
Join Date: Nov 2006
Location: Latvia
Age: 29
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Need your help: "fuction not defined" problem

i remember something about 'event' being an IE only property

Cool JavaScript Formatter
Reply With Quote
Reply

Tags
firefox

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a "tag" system to find relevant "related" pages MrQuestions PHP Forum 3 Mar 20th, 2008 23:06
[SOLVED] Show "Image" Depends On User "Status"? Monie Classic ASP 6 Oct 16th, 2007 01:22
? IS "meta name="robots" content="?" necessary in pages ? Love2Java Starting Out 6 Aug 8th, 2007 13:48
window.opener.document["nameForm"].getElementById("someid").value; doesnt work drpompeii JavaScript Forum 0 Feb 17th, 2007 23:09
<option value="yes" class="x"> problem in Firefox mameha1977 Web Page Design 1 Jun 21st, 2006 11:20


All times are GMT. The time now is 05:48.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43