wordpress - Pass through '¶meter' in a URL -
i'm working on project passes variable iframe code:
jquery(function() { var search = window.location.search; jquery(".iframe-wrapper").attr("src", jquery(".iframe-wrapper").attr("src")+search); });
but, when pass through §ion=p1
in url, gives 404.
source of iframe: example.com/page?cart=1
after going site.com/§ion=p1
iframe should change example.com/page?cart=1§ion=p1
anyway pass through §ion=p1
through url?
please send html mine working fine below:
<iframe width="500" height="200" class="iframe-wrapper" src="http://www.google.com?param=1"></iframe> <script type="text/javascript"> $(function() { var search = window.location.search; search = search.replace("?","&"); $(".iframe-wrapper").attr("src", $(".iframe-wrapper").attr("src")+search); }); </script>
Comments
Post a Comment