SourceForge has been redesigned. Learn more.
Close

#25 Problem using Javascript in a template

closed
nobody
None
5
2012-09-23
2007-09-26
P Cause
No

I am creating a template. My template is a variation of headlines, but it shows about the first 2-3 lines of the content of the description and, when you click on the text of that 3 lines it will display the full description text.

My problem is that I can't seem to get the javascript to be included. If I include the javascript inline, I get an error, even though I have used this Javascript before and it is good. If I include <script src="localfile"> it doesn't seem to get included or execute the Javascript, even though I can see the line for including the Javascript if I do a view source.

I've provided a src="file://c:\program files\rssbandit\templates\file.js" for the URI of the file and I do have javascript enabled in the checkbox about allowed content.

ANy help would be appreciated.

Discussion

  • P Cause

    P Cause - 2007-09-26

    Logged In: YES
    user_id=69421
    Originator: YES

    Added data: I saved the source of the generated page and opened in Firefox/Firebug. There is an error loading the javascript file and browser is displaying the file as some Asian characters. I noticed the xml statement at the top has encoding to utf-16. Tried eliminating that and it makes no difference.

     
  • P Cause

    P Cause - 2007-09-26

    Logged In: YES
    user_id=69421
    Originator: YES

    Seems to be encoding related and IE specific. I added a charset="US-ASCII" to the script tag and it now works in Firefox and if I save the page and load in Firefox it works just fine. If I load in IE7 then:

    • I get a message that it has to load in a new window becuase of zones.
    • get a warning about content so I enable

    And it works in IE7. Just not RSSBandit.

     
  • Torsten Rendelmann

    Logged In: YES
    user_id=714452
    Originator: NO

    If you just embed the javascript into the template itself: would it work?

     
  • Torsten Rendelmann

    Out of date

     

Log in to post a comment.