www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: error: stack overflow at line 1797

  1. #1
    Join Date
    Jun 2007
    Posts
    33

    error: stack overflow at line 1797

    stack overflow at line 1797

    hello i have this error when i run my java script calendar.
    any tips?
    thanks

  2. #2
    Join Date
    Aug 2007
    Location
    Apartment
    Posts
    175
    Can you supply us with more information?

  3. #3
    Join Date
    Feb 2006
    Posts
    2,926
    Usually javascript caused stack overflows happen when you have a function that calls another function that calls the first function- recursion.

    Accessing an array index that is too large will usually get caught by the browser with a message like 'Not enough Stack Space' or 'Invalid Array', but that is another possibility.

    There are also OS stack overflows, but they usually crash or freeze the application running the stack, and any error message will come from the OS, and not the browser.
    Last edited by mrhoo; 09-07-2007 at 11:02 PM.

  4. #4
    Join Date
    Aug 2007
    Posts
    151
    please show some code around line 1797.
    maybe it is just a zero-divide
    The classic script: alert("Hello world!")

  5. #5
    Join Date
    Jun 2007
    Posts
    33

    Here is the calendar.js code

    <!---- this happens after i open the calendar and i click on a DAY ---------->


    If you need anymore info please let me know.

    thanks
    Attached Files Attached Files
    Last edited by silviasalsa; 09-10-2007 at 10:31 AM. Reason: add attachement

  6. #6
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Those aren't JavaScript comments
    What are you doing when the error occurs?
    Last edited by Fang; 09-10-2007 at 10:35 AM.
    At least 98% of internet users' DNA is identical to that of chimpanzees

  7. #7
    Join Date
    Jun 2007
    Posts
    33

    but what info do we need so we can resolve this issue?

    Thanks

    but what info do we need so we can resolve this issue?
    again
    thanks

  8. #8
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Preferably a site link and when does the error occur.
    At least 98% of internet users' DNA is identical to that of chimpanzees

  9. #9
    Join Date
    Jun 2007
    Posts
    33

    link and when it does happen?

    cannot provide you the link

    hope this helps.


    it happens when i after i click on a date (DAY) for example day 6.

    when i click on the textbox (works)
    then the calendar pops up (works)

    it happens when i after i click on a date (DAY) for example day 6.

  10. #10
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    At least 98% of internet users' DNA is identical to that of chimpanzees

  11. #11
    Join Date
    Jun 2007
    Posts
    33

    what do they mean by wrap?

    thanks so far i have seen it.
    what do they mean by wrap?

    and what do add change on the js files?
    -----------------------

  12. #12
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Change to this beginning at line 1797:
    Code:
    if ( Date.prototype.__msh_oldSetFullYear == null )
    {
    	Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
    }
    	var d = new Date(this);
    	d.__msh_oldSetFullYear(y);
    	if (d.getMonth() != this.getMonth())
    		this.setDate(28);
    	this.__msh_oldSetFullYear(y);
    };
    At least 98% of internet users' DNA is identical to that of chimpanzees

  13. #13
    Join Date
    Jun 2007
    Posts
    33

    where ? in this code? or the one attached?

    where in this code?

    where ? in this code? or the one attached?
    ------------------------------------------


    <cfif ListFindNoCase(variables.ListOfEntriesToShow,"DateHours") or ListFindNoCase(variables.ListOfEntriesToShow,"all")>
    <tr>
    <td align="right" valign="baseline" width="40%"><strong>Worked Date:</strong></td>
    <td valign="top">From
    <input type="text" name="startdate" size="10" id="sdate">
    <input type="image" src="images/calendar.gif" id="f_trigger_a" >
    <script type="text/javascript">
    Calendar.setup({
    inputField : "sdate", //*
    ifFormat : "%m/%d/%Y",
    showsTime : true,
    button : "f_trigger_a", //*
    step : 1
    });
    </script>

    &nbsp;&nbsp;&nbsp;To
    <input name="enddate" type="text" size="10" id="edate">
    <input type="image" src="images/calendar.gif" id="f_trigger_b" >
    <script type="text/javascript">
    Calendar.setup({
    inputField : "edate", //*
    ifFormat : "%m/%d/%Y",
    showsTime : true,
    button : "f_trigger_b", //*
    step : 1
    });
    </script>
    </td>
    </tr>
    </cfif>
    Attached Files Attached Files

  14. #14
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    At line 1796
    At least 98% of internet users' DNA is identical to that of chimpanzees

  15. #15
    Join Date
    Jun 2007
    Posts
    33

    i have changed the code with your help but.

    i have changed the code with your help but when i click on the calendar, it goes directly to the report.

    meaning that the calendar does not pop up.

    i changed it to :
    --------------------------------------------------------------------------

    if ( Date.prototype.__msh_oldSetFullYear == null )
    {
    Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
    }
    var d = new Date(this);
    d.__msh_oldSetFullYear(y);
    if (d.getMonth() != this.getMonth())
    this.setDate(28);
    this.__msh_oldSetFullYear(y);
    };

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles