Skip to content Skip to sidebar Skip to footer

How To Pass A Parameter From A Jsp To An Iframe?

I have an jsp from which i call the iframe called iframe1 . Now i have a

Solution 1:

Pass it in the URL

src="Myjps.jsp?myval=something"

Solution 2:

Inside first jsp:

<iframe id="iframe1" style="display:none;" height="430" width="675" src="Myjps.jsp?myActualValue=<%= myActualValue %>" ></iframe>

Inside Iframe1 (Myjps)

<script>var myActualValue = location.search.substring(1).split("=")[1];
</script>

Post a Comment for "How To Pass A Parameter From A Jsp To An Iframe?"