I'd like to customize the "indeed.com" jobroll in my page which usually appears as so:
<script type="text/javascript"><!--
indeed_jobroll_format = "120x600";
indeed_jobroll_publisher = "19051066";
indeed_jobroll_keywords = "";
indeed_jobroll_location = "";
//--></script>
<script type="text/javascript" src="http://jobroll.indeed.com/ads/jobroll2.js">
</script>
<noscript><a href="http://www.indeed.com/">Jobs</a> by Indeed</noscript>
what I'd like to do is modify the indeed_jobroll_keywords var dynamically based on user actions. So I tried concatenating all that code into one string, for example:
var code = "<script type='text/javascript'><!-- indeed_jobroll_format = '120x600'; ...
...
"indeed_jobroll_keywords = '" + keywords + ...
and then load this into the page with
$(#identifier).html(code)
and when I do this Firefox appears to refresh the page on the same URL of the page it was on but nothing ever shows.
Could someone please explain why this happens, why this doesn't work, and another way to do this?