Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Javascript size limit?

Javascript size limit?

Scheduled Pinned Locked Moved Web Development
javascriptcsscomtoolshelp
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Christer Claesson
    wrote on last edited by
    #1

    I'm developing a page that uses a table and lists objects. Each object also have a tooltip which is created by using a javascript from here: http://migoicons.tripod.com/dhtips.htm I more or less add these in a javascript block:

    Text[0]=["The Title","This Tip has a title or caption"]

    and then use

    onMouseOver="stm(Text[0],Style[0])"

    on every object. The thing is that I have quite a number of objects and the Text[] will get up to 90+ and for some reason after 29ish the script just stops working. I'm wondering if there is a maximum size limit on javascript and if is is there a way to get around it? Or do you think the problem is something else?

    G 1 Reply Last reply
    0
    • C Christer Claesson

      I'm developing a page that uses a table and lists objects. Each object also have a tooltip which is created by using a javascript from here: http://migoicons.tripod.com/dhtips.htm I more or less add these in a javascript block:

      Text[0]=["The Title","This Tip has a title or caption"]

      and then use

      onMouseOver="stm(Text[0],Style[0])"

      on every object. The thing is that I have quite a number of objects and the Text[] will get up to 90+ and for some reason after 29ish the script just stops working. I'm wondering if there is a maximum size limit on javascript and if is is there a way to get around it? Or do you think the problem is something else?

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      There is probably some kind of size limit, but you not even close to it. If you had 9.000.000 records in the array, then perhaps... I would guess that the most likely reason is the contents of the strings in the array. You probably have a quote or a backslash in some of the strings, that breaks the code. Quotes has to be coded as \" and backslashes as \\ in a string surrounded by quotes. --- b { font-weight: normal; }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups