The Little Guy Posted June 1, 2012 Share Posted June 1, 2012 I have never tried this, and have been attempting... Can I put working javascript in an XML file? If so how? Quote Link to comment https://forums.phpfreaks.com/topic/263498-javascript-in-xml-file/ Share on other sites More sharing options...
requinix Posted June 1, 2012 Share Posted June 1, 2012 Define "working". Quote Link to comment https://forums.phpfreaks.com/topic/263498-javascript-in-xml-file/#findComment-1350359 Share on other sites More sharing options...
The Little Guy Posted June 1, 2012 Author Share Posted June 1, 2012 JavaScript that executes what it is supposed to do, for example: <script> alert("hello"); </script> will actually display an alert. I have ads that use JavaScript, I would like to add them to my RSS feed. Quote Link to comment https://forums.phpfreaks.com/topic/263498-javascript-in-xml-file/#findComment-1350369 Share on other sites More sharing options...
Maq Posted June 1, 2012 Share Posted June 1, 2012 I have never tried this, and have been attempting... So you attempted to try it but have not? Quote Link to comment https://forums.phpfreaks.com/topic/263498-javascript-in-xml-file/#findComment-1350371 Share on other sites More sharing options...
requinix Posted June 1, 2012 Share Posted June 1, 2012 Ads in your RSS? Please no. Quote Link to comment https://forums.phpfreaks.com/topic/263498-javascript-in-xml-file/#findComment-1350372 Share on other sites More sharing options...
The Little Guy Posted June 2, 2012 Author Share Posted June 2, 2012 But it is my 3 most viewed file.... Quote Link to comment https://forums.phpfreaks.com/topic/263498-javascript-in-xml-file/#findComment-1350613 Share on other sites More sharing options...
requinix Posted June 2, 2012 Share Posted June 2, 2012 Don't put the full content in there - just a snippet. Then people have to go to your website to see everything, and that's where they get the ads. And are you sure it's the most viewed and not the most downloaded? FYI Google Reader's bot includes the number of subscribers in its user agent string. Quote Link to comment https://forums.phpfreaks.com/topic/263498-javascript-in-xml-file/#findComment-1350665 Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 You need to learn how RSS works. Quote Link to comment https://forums.phpfreaks.com/topic/263498-javascript-in-xml-file/#findComment-1350673 Share on other sites More sharing options...
requinix Posted June 2, 2012 Share Posted June 2, 2012 Speaking of, you could put ads in the item description, but odds are that any code you put in there would not be executed. Simple links+images would work. With that in mind, you could generate the ad markup yourself (or via your ad provider) - at worst you could replicate the JavaScript in your PHP (which would be totally possible). Quote Link to comment https://forums.phpfreaks.com/topic/263498-javascript-in-xml-file/#findComment-1350681 Share on other sites More sharing options...
.josh Posted June 3, 2012 Share Posted June 3, 2012 But it is my 3 most viewed file.... And you will watch your RSS Subscriptions plummet and it become one of your least viewed files if you put ads in it. How many people do you know or even think will willingly subscribe to advertisements? Quote Link to comment https://forums.phpfreaks.com/topic/263498-javascript-in-xml-file/#findComment-1350887 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.