I am developing a widget. the code for it is :
<script src="../test/js.js"></script> I want to pass paramters to a .js file like this, as we pass parameters like a query string.
<script src="../test/js.js?place=us&list=10"></script>. These are my contents in my .js file.
var _html = '<div id="FJ_TF_Cont" style="position: relative; padding: 0; margin: 0; border-width: 0px; width: 200px;">' + '<iframe width="210" height="640" src="../test/content.aspx" name="FJIframe" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="width: 210px; border-width: 0px; z-index: 1;">' + '</iframe>' + '</div>'; document.write(_html); Please note the content of src in Iframe it contains:
src="../test/content.aspx" now i want to pass these parameters that in js string to this src as querystring.
the final src should look like :
src="../test/content.aspx?place=us&list=0" I need help as i am a newbie to js.