Web Analytics Made Easy -
StatCounter help w/ syntax error in google module - CodingForum

Announcement

Collapse
No announcement yet.

help w/ syntax error in google module

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • help w/ syntax error in google module

    I get the following error message when my page loads...

    JavaScript - http://58.gmodules.com/ig/ifr?url=ht.../ig/ifpc_relay
    Inline script compilation
    Syntax error while loading: line 41 of inline script at http://58.gmodules.com/ig/ifr?url=ht.../ig/ifpc_relay :
    chapter (ex. 003)')";>*</a></td></tr>');
    ---------------------------------------------------^


    this is a google module, but the problem is in my javascript... I'm almost sure of it. (If this is better suited in a different forum I'm sorry and please move it where appropriate).


    The whole source code is found here: http://blewett.googlepages.com/lawmawd2L.xml

    here is the snippet of code where the error is coming from.

    Code:
      if (prefs.getString("StateLaws") == DE) {
        sHref = 'http://www.delcode.state.de.us/title'+ document.getElementById('DE_Title').value + '/c'+ document.getElementById('DE_Chapter').value;
           document.write('<tr><td>Del. Code</td>');
           document.write('<td>Title <input type="text" id="DE_Title" size="1" value="##">Ch. <input type="text" id="DE_Chapter" size="4" value="###"></td>'); 
           document.write('<td>');
           document.write('<input type="image" name="Find" alt="Go find this section" title="Go find this section" align="top" border="0" src=" http://statcont.westlaw.com/images/go_v602.gif" onClick="top.location.href=\'' + sHref + '\' style="cursor: pointer"><a href="#" onClick="alert(\'format: 3 digit chapter (ex. 003)')";>*</a></td></tr>'); 
      }
    This problem has been stumping me for far too long now... Any help at all that you could give is GREATLY appreciated...

    Thanks a ton.
    Bill

    P.S... I'll admit that I am below the bar as far as my javascript abilities... So I may need some hand holding.

  • #2
    Your string contains some single quotation marks which are closing it prematurely.

    Code:
    document.write('<input type="image" name="Find" alt="Go find this section" title="Go find this section" align="top" border="0" src=" http://statcont.westlaw.com/images/go_v602.gif" onClick="top.location.href=\'' + sHref + '\' style="cursor: pointer"><a href="#" onClick="alert(\'format: 3 digit chapter (ex. 003)')";>*</a></td></tr>');

    Comment


    • #3
      I guess I don't know how to do what I'm trying to do then... can someone help me out?

      Comment


      • #4
        I messed w/ the code a bit where the original error message was showing up... and it's not coming up anymore....

        But now I've got another error


        JavaScript - http://58.gmodules.com/ig/ifr?url=ht.../ig/ifpc_relay
        Inline script compilation
        Syntax error while loading: line 232 of inline script at http://58.gmodules.com/ig/ifr?url=ht.../ig/ifpc_relay :
        n='+ document.getElementById('VT_section').value';
        ----------------------------------------^


        I assume it's the same sort of thing that was said earlier about the single quotes... but what I don't get is that this is like the 45th time this type of thing is in the script and as far as I can tell it's the same exact format as all of the other instances of it.

        http://blewett.googlepages.com/lawmawd2L.xml
        Last edited by thewillum; Sep 29, 2006, 11:30 AM.

        Comment


        • #5
          I think I figured it out... can't have the single quotation at the end after value.

          Comment

          Working...
          X