Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My iframes is not working not showing the address what i specified
Posted
Comments
Kornfeld Eliyahu Peter 20-Jul-14 4:04am    
Can you show us your code?
Vinay Mali 21-Jul-14 4:08am    
<div class="info">
<div class="title">
Ab Hi Tech Solutions •  <span>Contact Us</span>
</div>
<div class="section">

Contact Us


<div class="address">
<table>
<tr>
<td>Email Id :</td>
<td><p class="address_style set">Contact@enterpriseinfo-Tech</p></td>
</tr>
<tr>
<td>Address :</td>
<td><p class="address_style set">203, Eden Park,<br />Near Sai Mandir,<br />Viman Nagar</p></td>
</tr>

</table>

</div>
<form id="form1" runat="server">
<div class="middle">

<table>
<tr>
<td><asp:Label ID="lblname" runat="server" CssClass="text-style" Text="Name :"></td>
<td><asp:TextBox ID="name" runat="server" CssClass="textbox-style" placeholder="Name"></td>
</tr>
<tr>
<td><asp:Label ID="lblemail" runat="server" CssClass="text-style" Text="Email :"></td>
<td><asp:TextBox ID="email" runat="server" CssClass="textbox-style" placeholder="Email"></td>
</tr>
<tr>
<td><asp:Label ID="lblsubject" runat="server" CssClass="text-style" Text="Subject :"></td>
<td><asp:TextBox ID="subject" runat="server" CssClass="textbox-style" placeholder="Subject" ></td>
</tr>
<tr>
<td><asp:Label ID="lblmsg" runat="server" CssClass="text-style" Text="Message :"></td>
<td><asp:TextBox ID="message" CssClass="textbox-style msg" runat="server" placeholder="Message"></td>
</tr>
<tr>
<td colspan="2"><asp:CheckBox ID="CheckBox1" runat="server" /><asp:Label ID="Label1" runat="server" CssClass="text-style" Text=" Send copy of the message to yourself "></td>
</tr>
<tr>
<td colspan="2"><asp:Button ID="btnsubmit" runat="server" CssClass="button-style" Text="Submit" onclick="btnsubmit_Click" /></td>
</tr>
</table>


<iframe width="425" height="350" frameborder="1" marginheight="0"
marginwidth="0"
src="http://www.google.com/"
style="border-style: solid"></iframe><br />
View Larger Map
</div>
</form>

</div>

</div>



<div class="help">
</div>

1 solution

The problem is that Google set the X-Frame-Options header to SAMEORIGIN, and that to prvent put Google into an iframe...
You can see the error in the console of your browser...
Quote:
Refused to display 'https://www.google.com/?gws_rd=ssl' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

To learn more about X-Frame-Options read here: https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900