SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    May 2008
    Location
    Missouri, USA
    Posts
    273
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Inline Javascript Function Call Problem

    I'm receiving this error:
    "Expected ']'";
    With this HTML in IE8. Any ideas why this is happening and why it is only happening in IE8?
    Code HTML4Strict:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    <HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE></TITLE>
    <BODY>
     <a onclick='test_func([[1302684000,Int Subs]]);'>Test</a>
    </BODY>
    </HTML>

    The purpose of the code is to pass a dynamic array to the javascript function.

    Thanks for your help.
    Follow Me On Twitter: BryceRay

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,592
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Off Topic:

    Moved to the JavaScript forum from HTML and XHTML.

  3. #3
    SitePoint Guru
    Join Date
    Apr 2006
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Int Subs should be in quotes, or if it is an identifier, not have a space in it.


Bookmarks

Posting Permissions

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