bookmark home page embedded with an iframe? - html

The content of the iframe is actually perl-generated html loaded when the links on sidebar of the home page is clicked. But even if it was just plain html. Is there a way to bookmark the home page along with a specified iframe content?

You could always add a query string or hash tag to the URL. Then have your iframe load the HTML based on the query/hash input (after sanitized, of course). That way, when a user bookmarks the page, the appropriate content will populate the iframe.

Related

How to access iframe internal url when user goes to next page in iframe only (inside iframe)

how to retrieve the url from an iframe, when a user goes or clicks to next page inside iframe.
i mean for website which allows x-frame-options.
(src attribute is on external server page)
Eg:<iframe src="http://www.google.com"></iframe>
An user types a word in google's search engine and clicks on search button (inside iframe) the iframe renders a new page about the search page and again the user clicks on some link inside it, iframe renders a new page ,I want to retrieve the url for which the user click on it inside the iframe.
The only way to do this would be via Javascript. If you give the iframe an id, such as iframeId, you can do something like:
document.getElementById("iframeId").contentWindow.location.‌​href
I googled on other website,but there is no solution for this,iframe tag is built to view contents of the page only,like frameset.
As developers we need to disable external clicking from the user inside the iframe content as it violates some hacking from other website content.

share iframe with specific content

Lets say i have a website called http://123.com.
The index.html page of the website contains an iframe called theframe.
i have three different page (1.html, 2.html, 3.html) for the iframe content and they will be displayed when i click specific button in the site. The default content of the iframe is 1.html.
My question is, if i need to share http://123.com with 2.html or 3.html displayed on the iframe, how should i write the link on facebook/blog/IM to share? Is there a way without modifying the website?
Thank you.
you have hard coded value in iframe src
use querystring
make a parameter named dstntn palce in your url
http://123.com/?dstntn=your_url
and then get it in a var by $_REQUEST['dstntn'];
and give var to iframe src
then change iframe by changing dstntn value by 1.html || 2.html
NOTE: read encoded and decoded form for query string i think dots are not acceptable

Iframe links not to open in iframe

i have iframe that shows content from the page that is not mine. In that iframe exists some links. When user clicks on links, they open inside iframe. I want them to open in current window (parent window).
I have found solution to add
target="_parent"
to links, but i cant do that, becouse iframed page is not mine, and i cant edit that page.
Is there some way to do this, to open links from iframe in parent window?
Or js/jquery code to find all links on that page and add them attribut target?
Unfortunatley it is not possible to query the content of an <iframe> which origin is from a different server. The only thing what you could do is to "proxy" the page through a server-side script (with PHP or something) before outputting it:
request the page using "cURL" or something similar
parse the content for your needs (like setting the target-attribute on all links)
output it back to the page's iframe
Finally the <iframe> could look like this: <iframe src="myproxy.php"></iframe>

Load iframe once for multiple html pages

I use the same iframe in multiple pages of my web application. I want to have the iframe load once on the login screen and then when brought to the next page the same exact iframe will still be loaded and not refreshed.
Is there any way to keep a part of a webpage loaded and static when directed to the next page? Some sort of static footer with the iframe would be great.
Any help is appreciated thanks.
In the case of submitting a form or using a link, you can target yet another Iframe on the page. The target will load the new page, leaving the original alone.

How to open a specific tab in a different page

I have a home page on which, inside an IFrame a different HTML page is shown.
On that page there's a link, which on click, needs to open another page inside the same IFrame with specific tab shown. The new page has 3 tabs and the link need to open the second one.
There are other links too, which needs to open specific tabs. The problem is all this is for a demo purpose and no dynamic setting is there. No database or anything. All are static HTML pages.
Tab 2
assuming the page can parse the hash