I am trying to set my current iframe source with a variable that I created but it doesn't seem to work. I figured that my JavaScript syntax is wrong.
My script is:
<script type="text/javascript">
$(document).ready(function(){
var iframeAttributes = window.location.search;
var iframeForm = 'www.test.com/form.html';
var iframeURL = iframeForm + iframeAttributes;
$('.testframe').attr('src', iframeURL);
});
</script>
My IFrame code is:
<iframe id="testframe" src="" width="600" height="586" frameBorder="0">></iframe>