Author Topic: MOTD is not working corrently  (Read 3036 times)

0 Members and 2 Guests are viewing this topic.

Offline Rambomst

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
MOTD is not working corrently
« on: May 15, 2010, 04:33:23 PM »
I made an MOTD which used javascript to hide several divs and when you clicked a link one div would appear and another would disappear but since all the recent updates it doesn't work anymore. It doesn't give me any errors and it works fine in Firefox and IE so has javascript functionality been removed or is it bugged?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: MOTD is not working corrently
« Reply #1 on: May 15, 2010, 04:34:55 PM »
Is this SVN or release? Have you tried restoring the default motd file to see if one of your changes is buggy?
Experiencing God's grace one day at a time.

Offline Rambomst

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
Re: MOTD is not working corrently
« Reply #2 on: May 15, 2010, 04:37:25 PM »
It is SVN and the MOTD itself is displayed fine its just the javascript within the MOTD isn't working.

*edit*
I just noticed that there is also an issue where some hyphens show up as weird symbols
« Last Edit: May 15, 2010, 04:44:23 PM by Rambomst »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: MOTD is not working corrently
« Reply #3 on: May 15, 2010, 04:45:33 PM »
I'm surprised you ever had it working at all in Source html. I tried javascript and divs once that worked fine in IE and Firefox, but Source html was limited and didn't allow it to work. Static pages were all it would allow.
Perhaps Source allows it now. It's been a while since I tried it.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Rambomst

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
Re: MOTD is not working corrently
« Reply #4 on: May 17, 2010, 09:34:45 PM »
Bump

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: MOTD is not working corrently
« Reply #5 on: May 17, 2010, 09:50:44 PM »
Rambomst, bumping isn't liked here. We're a slow moving enough board that if someone has an answer, we answer.

I'll be a bit firmer with my answer. Source HTML is limited. If the ULX default motd displays fine, and you only have trouble when you attempt to add non-static javascript, it is most likely 1) Source html decoder not liking non-static pages, or 2) an error in your javascript.
See my quote from 2007.
ULib uses the html engine provided by Source, the same engine code that every other Source game uses.
<clip>
However, though the Source engine html interpreter is based off of internet explorer, it is limited, for several reasons including security, in what it can do.
<clip>
I've recently tried to use javascript and a <div> tag to dynamically update a page and discovered that Source won't allow dynamicly updating a page once its already been presented.
I believe it also won't allow download of files. (it won't prompt where to save them)
<clip
Updates have been made to Gmod as of late. It wouldn't surprise me if the Source decoder has been changed within Gmod, nothing to do with ULX... all we do is throw the html code at the decoder within Gmod.

I'm not sure if Source relies on Internet Explorer anymore. I'm thinking when the Steam GUI changed, they started using a new web kit (since they're going towards Linux/Mac, no IE on those)

I've seen complaints on Facepunch about other motd mods where people say a motd that worked fine one day doesn't the next.
I'm guessing point 1.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Rambomst

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
Re: MOTD is not working corrently
« Reply #6 on: May 17, 2010, 10:06:41 PM »
Sorry about the bumping but you didn't answer my original question and it seemed like it was an issue with ULX rather than GMod itself as I am not as clued about the working of GMod as I am with all other source engine games LUA kind of throws me off a bit so I guess I will look around on the facepunch forums for the answers i seek. Thanks for the quick reply after the bump... Even if it is frowned upon it worked perfectly :P The move firmer answer was a lot more informative than the previous reply.

Offline Rambomst

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
Re: MOTD is not working corrently
« Reply #7 on: May 18, 2010, 06:24:48 AM »
I made a post on the facepunch forums and it seems javascript was removed due to an exploit.... Sigh someone always has to ruin it for everyone else :(
"An exploit was found regarding ActiveX in IE that allowed a server to force download something via a http panel. To prevent this for now, Garry has disabled Javascript. There's no real idea when it'll be back, but there is the hope that he'll add Webkit instead."