Web Analytics Made Easy -
StatCounter Inserting javascript within tables ? - CodingForum

Announcement

Collapse
No announcement yet.

Inserting javascript within tables ?

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

  • Inserting javascript within tables ?

    Hi, I've been trying to install a javascript news letter, (as featured at http://www.dmxzone.com/ShowDetail.asp?NewsId=6474) and have it working perfectly in a straight-forward HTML page.

    I am trying to include the ticker within a page that has nested tables. Having placed the SCRIPT code in the head section of the page - then the following code appears in the body tag:

    <!--
    <div class="tickerDiv"><span class="stories">Latest News : </span><a id="tickerHREF" href=""></a></div>
    -->
    (commented out here so the code displays in the post)

    But it doesn't work ? the 'Latest News' text appears on the page, but not the headlines. Yet when I do this in a html file without any tables, it works fine ?

    Do I need to alter the code / DIV tag statements as I'm working within a table?

    Thanks in advance for your very kind help.

    Matt

  • #2
    Javascript in tables

    Internet Explorer enforces a NO JS in tables Rule, I came across your post whilst trying to find a solution since my webpage is in tables and requires JS for my google maps. There are (assuming they both work) two soloutions that i can see, either an IFRAME linking to a new webpage with just:
    <html><head></head><body>javascript goes here</body></html>
    or you can put a div at the top of the page with an absoloute postion relating to the page, this is not a great idea however as people with different font sizes may not see it at all or it may be floating somewhere unexpectedly.

    Comment

    Working...
    X