Upcoming Events

no events match your query!

New Events

no events posted in last week

Examples of javascript code

Examples of javascript code you can use to show Indymedia Ireland articles on your site

JavaScript Syndication Examples

The examples below show you some of the ways that you can embed a JavaScript news feed into your webpage. The examples use some functions which are included in the dynamically generated newsfeed but you may of course study the JavaScript file yourself and write your own display methods using the array of stories provided.

Marquee Sample 1

This example shows a simple scrolling marquee

To add this to your own web page insert the following code:

<script src="http://www.indymedia.ie/jsnewsfeed.php">
</script>
<script type='text/javascript' language='JavaScript'> writeStoryMarquee();
</script>

Marquee Sample 2

This example also shows a scrolling marquee but illustrates how you can use the parameters to display the marquee differently.

To add this to your own web page insert the following code:

<script src="http://www.indymedia.ie/jsnewsfeed.php">
</script>
<script type='text/javascript' language='JavaScript'>
// parameters are width,height,direction[up,down,left,right],style(in CSS format)
// any parameter left as null will use default.
writeStoryMarquee(100,200,"up","background-color=lightgreen; border:1px solid black");
</script>

Table Sample 1

This example also shows a simple table but illustrates how you can use the parameters to display the table differently.

To add this to your own web page insert the following code:

<script src="http://www.indymedia.ie/jsnewsfeed.php">
</script>
<script type='text/javascript' language='JavaScript'>
writeStoryTable();
</script>

Table Sample 2

This example also shows a simple table but illustrates how you can use the parameters to display the table differently.



To add this to your own web page insert the following code:

<script src="http://www.indymedia.ie/jsnewsfeed.php">
</script>
<script type='text/javascript' language='JavaScript'>
// parameters are width,height,alignment[left,right],style(in CSS format)
// any parameter left as null will use default.
writeStoryTable(380,null,"left","background-color=#44AA44; border:1px solid black");

</script>