INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Webremote HTML problem  (Read 1156 times)

Tompoes

  • Member
  • *
  • Posts: 1
Webremote HTML problem
« on: September 09, 2010, 05:59:58 am »

Hello,


I tried to add some extra functions to webremote by adding javascript functions in the HTML files. These functions are not executed because the '{' and '}' characters are apparently removed from the original source by the Render engine.
I like to use the "web template language" in these functions so they can not be placed in an external script file.

Is this a bug in the webremote render engine or a restriction?


Thanks
Logged

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: Webremote HTML problem
« Reply #1 on: September 11, 2010, 09:45:33 am »

I found this too. But just put your script in a linked JS file - that works fine

Brian
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: Webremote HTML problem
« Reply #2 on: September 15, 2010, 11:14:03 pm »

avid's advice is good.

The HTML gets run through a processor to support loops, translation, etc.

Because of this, it's best to simply put all javascript in its own file.  You'll notice that is what we did with the javascript functions in the default skin.

We may make the HTML processor better handle inline scripts if enough people want or need this.

Thanks.
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up