Visit Our Home Page
 Explored,Designed,Delivered.sm
Welcome, Guest. Please Login or Register (Password Reminder)


Creativyst Forums 
Support & Discussion 
Register Help Search Login  
   
   Creativyst Forums-TOP
   Web Site Design
   html doesn´t get data from JSMsg.js
(Moderator: admin)
 Author
Topic: html doesn´t get data from JSMsg.js       [Link=146]
Reply Please log in first.
elmikeg
New Member


Posts: 18





Gender:
     
    html doesn´t get data from JSMsg.js   (Date posted: 01/03/06 at 15:26:46) Quote Modify Delete

Well, when I embed your output string into my web page the data comes up beautifully, that is until some other fan of yours runs another test! I have copied the output into the place where my web files are, but cannot retrieve the data. The permissions seem to be set to 0644 which I thinks is OK otherwise the application would not run. And looking via the url I think I have a java file unlike one of your other forum members.
Here is the code I have. Under that there´s another question.

<!--
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"
SRC="http://www.creativyst.com/Doc/Std/JSMsg/Data/Demo/JSMsg.js" >
</SCRIPT>
-->
<SCRIPT TYPE="text/javascript" LANGUAGE="JAVASCRIPT"
SRC="http://www.matraverssystems.co.uk/JSMsg.js">
</SCRIPT>

next ..
To test using jsmfeed also in my home directory I put <SCRIPT TYPE="text/javascript" LANGUAGE="JAVASCRIPT"
SRC="http://www.matraverssystems.co.uk/JSMFeed.pl?ns=np&url=http://www.avira.com/rss/news_es.rss">
</script>
This doesn´t work but I suppose the permissions have to be reset by my hosting site.
I wanted to run the jsmfeed via a cron and then access via the first method.
If you can advise I would be delighted and thankful.
Mike

  WWW  E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: html doesn´t get data from JSMsg.js   (Date posted: 01/03/06 at 18:29:28) Quote Modify Delete

Mike,

Well, a lot can go wrong when installing a script. But let's start with the chmod attributes you've reported.

644 doesn't include Execute permissions in any of the security ... sets.

You should be able to get the correct permissions for your scripts from your hosting service. They sometimes will include specific permissions in each of the three sets. Often, 755 or something similar.

You will also need to know the path to the perl interpreter on your server so you can set the shebang line ('#!'). Get this from your host at the same time you get the right permissions.

Finally, some hosts don't include the special module used by JSMFeed.pl to access content at outside web-pages. Ask your host if their perl install includes the module LWP::UserAgent.

-djr

   E-Mail   Ip: Logged
elmikeg
New Member


Posts: 18





Gender:
     
    Re: html doesn´t get data from JSMsg.js   (Date posted: 01/04/06 at 10:52:27) Quote Modify Delete

Thank you for helping me. I have got somewhere with the inline generation which now works, ie in the HEAD section

<SCRIPT TYPE="text/javascript" LANGUAGE="JAVASCRIPT"
SRC="http://www.matraverssystems.co.uk/JSMFeed.pl?ns=demo&url=http://www.avira.com/rss/news_es.rss">
</script>

That can stay for the time being.
So far I cannot run jsmfeed from cron. I am trying to find out why.

The other things is that I cannot access the demo.js file which I put in my directory. I am actually now confused as to whether the file must be namespace.js or JSMsg.js given that the scrolling code I have copied from you was generated for namespace demo.

I have tried the entry
<SCRIPT TYPE="text/javascript" LANGUAGE="JAVASCRIPT"
SRC="http://www.matraverssystems.co.uk/JSMsg.js">
</SCRIPT>

and demo.js

having copied the file.
I think it doesn´t matter as long as the file has the correct information in it.

It would be nice to get this working so that the feeder does not have to run every time someone looks at the screen.
Thank you for your help.

I have another question and will post it separately. Thank you for your time
Mike

  WWW  E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: html doesn´t get data from JSMsg.js   (Date posted: 01/04/06 at 11:26:06) Quote Modify Delete

Mike,

Hi,

Glad you're making progress.

First, filename - the name of the file doesn't matter. People have found that it is very helpful to name it after the namespace it contains, so a JSMsg.js file containing 'demo' can be renamed (or initially named) 'demo.js'. This way, you don't have to open the file to look in and see what the namespace is. Regardless of what the FILE is named, the namespace must be used to access the content in your web page. The two are unrelated as far as programming.

Second, running from cron - simplifying a bit, when you run a script from cron, you can't assume that it will be run from the same directory as the script. So, while you could do something like this:

JSMFeed.pl -bla -blabla

or this:

./JSMFeed.pl -bla -blabla

from the command-line, you will have to give it a FULL PATH from cron. So, something like this:

/big/hoster/virts/mydomain/local/scripts/JSMFeed.pl -bla -blabla

will be required.

You may even have to run the perl interpreter yourself depending on the path information used by cron.

almost forgot - Don't forget to specify the full path of your output file (the JSMsg file you're creating) when you invoke JSMFeed.pl from cron. This is for the same reason as above. The cron facility simply doesn't know where to put it otherwise.

    -djr

   E-Mail   Ip: Logged
elmikeg
New Member


Posts: 18





Gender:
     
    Re: html doesn´t get data from JSMsg.js   (Date posted: 01/05/06 at 07:08:08) Quote Modify Delete

I am pleased to say this is all working now. I have a cron extract working every 6 hours and am able to read this from my html. That´s great. Thanks very much.
When I have time I am going to set up more news readers!
Mike

  WWW  E-Mail   Ip: Logged
JRepici
Administrator


Posts: 328





Gender:
      JohnRHere2
    Re: html doesn´t get data from JSMsg.js   (Date posted: 01/05/06 at 11:12:49) Quote Modify Delete

Woohoo!

Let me know if you'd like to list your site as a source for JSMsg feeds. This means you make your JSMsg files available to other webmasters (you would generally ask for a link back or something similar if they use your JSMsg feeds).

Something to think about.

    -djr

   E-Mail   Ip: Logged
elmikeg
New Member


Posts: 18





Gender:
     
    Re: html doesn´t get data from JSMsg.js   (Date posted: 01/05/06 at 15:40:27) Quote Modify Delete

Thank you, I will. I just must get all this stuff up on the web otherwise people will get impatient to say the least. I have a few important things to finish. But I will come back on this. Regards, Mike

  WWW  E-Mail   Ip: Logged
Reply Please log in first.
Pages: 1
Jump to:

YaBB Board c 2000
YaBB Programming Team
 



















© Copyright 2002 - 2008 Creativyst, Inc.