0

this is my first post here, and I hope I'm lucky to finaly get an answer after hours of seaching for this problem :/

I'm using a simple HTML iFrame code:

<iframe src="http://WEBSITE-HERE.com" style="border:0px #FFFFFF none;" name="myiFrame" scrolling="no" frameborder="1" marginheight="0px" marginwidth="0px" height="100%" width="100%"></iframe>

It works OK with desktop browsers, but when a mobile visitors goes to the link, they get promted to download some file and the link doesn't load at all. Is there any way I could make it work for mobile visitors too? (Link was visited from Samsung Galaxy S3)

BackY
  • 1
  • 2
  • What link are you referring to? Do you mean when a mobile device loads the page containing the iframe it prompts a download? – danwarfel Feb 13 '14 at 07:47
  • Yes, exactly. The "http://WEBSITE-HERE.com" is a different website, from the one where the code is being stored (it's like I'm trying to iFrame another website, in another website) both loading at the same page. But when a mobile user comes, I get promoted to download something like: Mobogenie .. – BackY Feb 14 '14 at 04:50

1 Answers1

-1

Alternatively you can use jQuery/AJAX to load the page in a div instead of iframe:

$('#w_oContainer').load('page.htm');

CSS or script doesn't require reference to apply/communicate, and give better UX over iframe. Here is more elaboration: (Reasons for not using IFrame?)

Kunj
  • 1,980
  • 2
  • 22
  • 34
  • First, thanks for your answer. But could u please tell me what I exactly need to do,how the code should look, cause I'm a begginer in this field... Thank you – BackY Feb 14 '14 at 04:47
  • Add `jQuery` in your `` section of page (e.g. ``), then simply write the above syntax. `#w_oContainer` is your `div` id. jQuery library can be download from - http://jquery.com/ – Kunj Feb 14 '14 at 07:30