Current location: Hot Scripts Forums » General Web Coding » JavaScript » 2 errors can't solve them please help

2 errors can't solve them please help

Reply
  #1 (permalink)  
Old 11-07-09, 09:38 AM
hscorp hscorp is offline
Newbie Coder
 
Join Date: Nov 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
2 errors can't solve them please help

i got two different errors in two different pages


i got this error in page 1
Name:  1.jpg
Views: 30
Size:  44.2 KB

and this error in page 2
Name:  2.jpg
Views: 27
Size:  45.2 KB

and here is the pages in zip file
pages.zip

please help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-07-09, 10:36 AM
wirehopper's Avatar
wirehopper wirehopper is offline
Community Liaison
 
Join Date: Feb 2006
Posts: 1,540
Thanks: 1
Thanked 22 Times in 22 Posts
Please post your code.

If there's a lot of code, use the line numbers in the error messages and post about 10 lines before and after.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 11-07-09, 10:45 AM
hscorp hscorp is offline
Newbie Coder
 
Join Date: Nov 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
this is the part that has the error but it's the same in the two pages but i got different error in every page
HTML Code:
Line 32: <script language="javascript" type="text/javascript">
Line 33:  function startUpdate(){
Line 34:	 ajaxFunction();
Line 35:	 executeTimer();
Line 36:	 executeKiller();
Line 37: }
Line 38: function executeTimer(){
Line 39: 	var interval=setInterval("ajaxFunction()",2000);
Line 40: }
Line 41: function executeKiller(){
Line 42: 	var killer=setInterval("ajaxKiller()",5000);
Line 43: }
Line 44:
Line 45: function clearTimer(){
Line 46:	clearInterval(interval);
Line 47:	clearInterval(killer);
Line 48: }
Line 49: </script>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 11-07-09, 01:36 PM
wirehopper's Avatar
wirehopper wirehopper is offline
Community Liaison
 
Join Date: Feb 2006
Posts: 1,540
Thanks: 1
Thanked 22 Times in 22 Posts
interval and killer are variables local to the functions they are declared in.

The var statement, outside the function, establishes the variable so that all functions can get to it. If the var is inside a function, the variable is only available inside that function. To learn more, go to W3Schools and look up 'javascript variable scope'.

Code:
var interval;

function executeExample()
{
interval=setInterval("doSomething()",5000);
}

function clearExample()
[
clearInterval(interval);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem and errors in Page dharprog PHP 1 12-07-06 06:36 AM
Display errors while "display_errors=off" dave111 PHP 1 02-24-06 11:26 AM
Useful PHP errors in OS X kjmatthews PHP 1 04-04-05 10:44 AM
visual basic problem I cannot solve: data grid : need vb programmer for hire chrismonroe10 Visual Basic 1 03-25-05 07:42 PM
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 11:15 AM


All times are GMT -5. The time now is 08:27 PM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.