The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

RPG Page script

View previous topic View next topic Go down

RPG Page script

Post by JDC on August 31st 2011, 10:13 pm

I have made a script for so it displays a message based on the url. However, I'm having some trouble getting the script to work...

I want the script to display a message on a specific user's RPG page. It works partly, but the message only shows when generating the RPG page, not viewing it.

Code:

<script type="text/javascript" language="JavaScript">

  function beginLocal(url)
  {
    url = document.URL;
    if (url)
    document.writeln("\<!--");
  }
  function endLocal(url)
  {
    url = document.URL;
    if (url)
    document.writeln("--\>");
  }
</script>
Code:

<script type="text/javascript">
  beginLocal(/u1rpgsheet);
</script>
            <p>test</p>
           
<script type="text/javascript">
  endLocal(/u1rpgsheet);
</script>

Can anyone tell me what is wrong with the script? It's not putting the message on the right url for some reason...
(I added this to the RPG page template)

JDC
Forumember

Posts : 46
Reputation : 0
Language : English

Back to top Go down

Re: RPG Page script

Post by JDC on September 4th 2011, 5:55 pm

Well any answer?

JDC
Forumember

Posts : 46
Reputation : 0
Language : English

Back to top Go down

Re: RPG Page script

Post by JDC on September 8th 2011, 9:02 pm

Uh? Anyone?

JDC
Forumember

Posts : 46
Reputation : 0
Language : English

Back to top Go down

Re: RPG Page script

Post by JDC on September 17th 2011, 6:48 pm

Please? I would need help with this.

JDC
Forumember

Posts : 46
Reputation : 0
Language : English

Back to top Go down

Re: RPG Page script

Post by LGforum on September 18th 2011, 2:35 am

Your function isn't being called upon.
You need to add this to your head or body tag:

Code:

<body onload="beginLocal()">

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum