java script error after transformation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • paprika
    New Member
    • Oct 2007
    • 2

    #1

    java script error after transformation

    I'm using ParseNeko to parse a html into a DOM; then after transforming the DOM into HTML again (using TransformFactor y) I'm having a problem with javascript part. (the output is the same as the original except the javascript)

    [CODE=html]<SCRIPT language="JavaS cript"><!-- function google_ad_reque st_done(google_ ads) { (...) google_ad_clien t = 'ca-mcn_js'; // substitute your client_id google_ad_chann el = 'Singapore'; google_ad_outpu t = 'js'; google_max_num_ ads = '3'; //google_page_url = 'http://www.channelnews asia.com/'; google_language = 'en'; google_encoding = 'latin1'; google_safe = 'high'; //google_adtest = 'on'; google_ad_secti on = 'default'; // --></SCRIPT>
    <!-- End: Google ADS -->[/CODE]

    Because it is a mess, after the comment sign // everything behind is considered comment as well.

    Anyone know how to solve this problem??

    Thanks a lot.
    Last edited by gits; Oct 18 '07, 08:57 AM. Reason: added code tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Welcome to TSDN!

    Remove the comments. That was only required for ancient browsers that no-one uses any more.

    Comment

    • paprika
      New Member
      • Oct 2007
      • 2

      #3
      Originally posted by acoder
      Welcome to TSDN!

      Remove the comments. That was only required for ancient browsers that no-one uses any more.
      Thanks a lot for the reply, but I'm not sure I catch what u mean (I'm totally new with transformation) .

      I got a suggestion to write a xslt to transform the DOM-->html, but I'm not sure how to remove the comment.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        By removing comments, I meant the starting and ending lines:
        [HTML]<!--[/HTML] and [HTML]//-->[/HTML]If that doesn't solve the problem, post your code.

        Comment

        Working...