I suck at javascript

I would like to include and RSS feed in one of my prototypes. I did before years ago, but do not remember at all how I did it.

I have the javascript for the feed, and I’ve looked at a lot of other posts talking about javascript, but I have to be honest, they all went right over my head.

I need someone to please explain, in the simplest terms possible, how to do this.

Well it’s going to be difficult to tell you specifically what to do if I can only imagine the code you have, but here’s a general outline:

If your prototype is hosted on AxShare, you can insert most things with a plugin. Log in to AxShare, find your project, and click the gear icon on the far right side. From the menu choose plugins.

I can’t tell you specifically what to do next because I don’t know what code you have, but you would create a new plugin, paste your code, and make sure the plugin is added to the correct pages. I’m sure there’s more that needs to be done, but again, can’t really tell you if I don’t know what the code you have actually does.

The point I’m making is that if you want specific answers, you need to ask specific questions :wink:

Here is the code (I had to take of the beginning and ending < & > so it would display):

script type=“text/javascript” language=“javascript” src=“http://www.the-numbers.com/feeds/daily.php”></script

If it’s just a script tag then a plugin should suffice (assuming there’s no other configuration required).

I don’t know what the script does so you might just choose “End of Body” instead if it needs the DOM to be loaded before it runs.

Can you explain to me the difference between the three location options? Ideally I’d like the text to display in a box, so I’m assuming I need the Dyanamic Panel option, which I tried (and failed) to get to work.

End of Head places the content before the closing </head> tag, before the <body> loads.

End of Body places the content before the closing </body> tag, after all the other content in the body loads.

Dynamic panel places the content in a specific dynamic panel on the page, referenced by name.

In all cases it simply places the content you paste in. If it’s still not working, then it’s probably an issue with the content you have (in this case a script tag).

I tried the dynamic panel option and am not getting any results. here’s what I did:

added and named a dynamic panel on the page where I want the feed to appear.
added a plugin, named it, pasted the script and referenced the dynamic panel.

Still getting zilch on my page.

What am I missing? I can create a separate rp with all of the above if it would help; I appreciate your patience and assistance.

If I had to guess the script needs something else to function properly. Where did you get the script from? I might look there for assistance as well.

Hey there Niki -

That javascript basically uses a document.write command to write the content into the webpage. As such, the placement isn’t going to be controllable directly by the javascript.

If you want to put in a specific place, you’ll need to create a seperate page with a plugin that loads it (by placing the script at the end of the head), and then use an inline frame to place that page where you want it on your page. In a quick test, I needed to put some content on the script page to get it to load full width.


You’ll probably want to remove scroll bars and size appropriately, but I’ll leave that to you :slight_smile:

OMG you are my hero! Can you upload the RP so I can see how you did it and what I did wrong?

Two pieces: 1 is the plugin, which should go like this:

The other is the RP file, which I have attached.
FeedSample.rp (47.4 KB)

Let me know if you have any questions!

Mine is STILL coming up blank! Is there a setting when I publish or something that I’m missing? I even took your file, renamed it, published it to my axshare and added the plugin. No Dice.

ARGH! I’m sure it’s something really stupid that I’m missing too…


Broken RSS.rp (46.7 KB)

Okay now this is SUPER weird! I can see the RSS feed in your axshare file in Chrome, but I cannot see mine. However, I CAN see the RSS feed in my file in EXPLORER!

So there’s some setting related to my file specifically and the browser I need to sort out.

I think it’s because the script is hosted at an unsecure location… change your http:// in the script to be https:// and i think it’ll work for you.

Its not an issue in mine because I have turned off the https preference for my prototypes.

OMG that’s what it’s been this whole time! AARRRGGGHH.

I’m so glad I tried it in another browser!

Yeah, sorry I didn’t think about that at first… the HTTPS thing is relatively new!