Visit Our Home Page
 Explored. Designed. Deliveredsm


Creativyst Docs 
Page to test JSMsg concept 

RSS Feed to JSMsg
Paste the XML from an RSS newsfeed into the text area on the right (limit to ~64K please).
  - OR -
Enter the URL to a newsfeed here


(find thousands of feeds at syndic8.com)

The JSMsg (JavaScript) file will be returned in the Output area below. It will be statically linked into this document in a <SCRIPT> section and used in some examples below. Check the HTML of this page to see them.

IMPORTANT: You may need to CLEAR and then reload/refresh this page to get your browser to see the new JavaScript file you've made.

XML Data
Make JSMsg from:  
Namespace: 


Output JSMsg File:




Examples of Content displayed using this JSMsg File:

The following examples demonstrate how JSMsg (JavaScript) files are used to display content on static HTML pages. We've included the JSMsg.js file you produced above in the HEAD section of this page like this.
 <SCRIPT TYPE="text/javascript"
     SRC="http://www.creativyst.com/Doc/Std/JSMsg/Data/Demo/JSMsg.js" >
  </SCRIPT>
We then used simple JavaScript calls from within the demo namespace (such as "demo.Msg()") to display the content in these examples. To see these search for "Example n" (where n is the example number) in the page's HTML source.

 
Important: Due to the way server writes are cached, you may need to clear and then refresh/reload this page to get your browser to see the new JavaScript file you've made.
 


Example 0: Meta Information from this RSS feed:


1. Five random entries in an un-ordered list:

The format and the message parts used are shown first. Then five randomly selected entries from the JSMsg file are displayed. If there's no description, local code replaces it with length-truncated Body content.

  • LinkTitle
    Month2N/Day2N/Year4N - hh:mm
    Category: "Cat"     from:Source
    Description

    -- Author <P>
2. Select messages from a drop-down

Same format as example 1 but now we display a pop-up window containing the message you select from this drop-down list.





3. Plain vanilla top message.

Just a single call to the LinkTitle of the top story, to demonstrate easy content embedding in any page.

The most current story at this time is titled and you should read it :-).




4. Content from Multiple JSMsg Files

To demonstrate how content from multiple JSMsg files (possibly from many different sources) may be displayed on a single static web page we've included our ../Site/quotes/JSMsg.js file on this same page along with the JSMsg file produced above. Here is a random quote from that JSMsg file's content:

 


 

This uses the ...Msg() function so will change each time the page is reloaded.


5. Writing JSMsg compatible display scripts

We'll use the example "client" functions to demonstrate how display scripts can be written to interface to any JSMsg file(s). Such scripts need only ask the user for the namespace of the JSMsg content s/he wants to display.

 


 

Here, we go for the same effect as in examples three and four. We included an offset of 2 for the quote example so it will be a different random entry than the one displayed above.

More importantly, this uses the example client functions instead of using the functions from the JSMsg files directly. The client functions work just like the direct functions, but they take a namespace as first parameter. This allows client functions to access any JSMsg file included above them on the page.

This is very handy when writing display scripts. For example, you can ask the user to set one namespace variable at the top of your display script to the namespace they wish to display. Or, you may also have the user specify multiple namespaces dynamically.
















home page
(Creativyst® JSMsg Convention)