Is it possible to hide the page paths in the URL and only show the domain name without anything else?
So now I have multiple pages:
www.example.be/index.html
www.example.be/travel.html
www.example.be/links.html
...
But on all the pages I only want to show www.example.be in the address bar.
I was looking into the .htaccess file but I cannot figure it out.
You can wrap your entire website in an iframe tag. And change the src property of the iframe dynamically using client side code. This way your page names won’t be visible in the url bar.
<iframe src="/index.html" height="200" width="300" title="Page Title"></iframe>
Related
I'm trying to embed an "clickable" image (Html code with links and shapes in it) to a new style sharepoint site. As the new one doesn't feature the option to edit the source code I tried to embed it via an iframe and the embed webpart. I managed to get some html code in the iframe via the srcdoc attribute but it isn't showing my image. The image is on the Sharepoint and the link also correct.
The Code:
<iframe srcdoc="<img src=https://Testsite.com/:i:/r/sites/GBPMTest1/Shared%20Documents/Pictures/SC%20EMEA%20CoE%20Stamp%20SLENDER%20neg.png" width="400" height="400" "="" src="https://Testsite.com/:i:/r/sites/GBPMTest1/Shared%20Documents/Pictures/Weltkarte%20fertig.jpg?csf=1&web=1&e=v7OI07"></iframe>
The scr attribute is for the Sharepoint, because without it it doesn't accept the code.
Is it just not possible or did I something wrong?
What is stopping you from using the Image Web part?
Cheers
Truez
I know it has almost been 2 years but just in-case you still need the solution here it is:
The Solution:
Your img syntax is incorrect, you do not have a closing ">". Here is the proper syntax:
<iframe srcdoc="
<img src='https://Testsite.com/:i:/r/sites/GBPMTest1/Shared%20Documents/Pictures/SC%20EMEA%20CoE%20Stamp%20SLENDER%20neg.png' width='400' height='400'/>" src="https://Testsite.com/:i:/r/sites/GBPMTest1/Shared%20Documents/Pictures/Weltkarte%20fertig.jpg?csf=1&web=1&e=v7OI07" width="iframe width here" height="iframe height here"></iframe>
Don't forget to include an iframe height and width as SharePoint requires it. Also remember when embedding any html code that requires ", you need to change it to ' instead as it will break the code.
What I want to achieve:
Extracting the current url of an iFrame.
Search info
All the sugested "similar questions" return nothing of what I want to achieve here.
The setup:
I have an iframe which links to a website. For instance, let's say:
<iframe src="http://www.google.com"></iframe>
Then, after the user searches for something on google will the iFrame src change to reflect the current URL of the page? For instance:
https://www.google.pt/search?site=&source=hp&q=test&oq=test
If not, is there any other way to extract this info?
THanks in advance :)
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
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.
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>