How to combine URLs when the iframe inside of a mainframe changes - hyperlink

How can I create a URL that will take a user to a specific iframe inside of a mainframe when not originally in the mainframe site?
For example, if I have 3 iframes of images on my site and I want to share one of the images with another user, is there a way I can create a URL so that the person I share the URL will go to the specific iframe I choose?

You could use JavaScript and just set my_iframe_elem.src = "http://www.example.com";

Related

Microsoft Teams deep link to tab with iframe

I tried to deep link a Microsoft Teams static Tab containing an iframe.
The link to the tab works but I want to change the iframe based on the deep link. Which is possible with the use of task modules, since task modules use https://teams.microsoft.com/l/task/<APP_ID>**?url=<TaskInfo.url>**&height=<TaskInfo.height>&width=<TaskInfo.width>&title=<TaskInfo.title>
Which can be found here.
while deep links to tabs use
https://teams.microsoft.com/l/entity/<appId>/<entityId>?webUrl=<entityWebUrl>&label=<entityLabel>&context=<context>
I know about the official documentation for deep links in teams.
But I can't manage to achieve the same with the iframe as with the task module. Is this even possible?
It is possible, but basically you need some code your side to intercept what's coming in from Teams, and directing/setting the iframe src appropriately. For instance, on the deeplink, you can set the "subEntityId", which you could use to indicate which page you want to show in your frame. You'd need to query the Teams js context in your "container" page, in that case, and set the src of the iframe to the respective destination. You would be accessing context.subEntityId. It's possible to do this using the querystring options as well, I think. See here for more.

What's the best way to create a FAQ page for ios app

Many ios apps contain a FAQ or How to use page, when loaded, will display some FAQs in text format. The content is loaded from remote server rather than built in so the contents can be updated anytime with flexibility.
What's the best way to implement this type of page? My app does not contain any server side function except this page so I am really looking for a cheap (or free) way instead of renting a server just for this. Also, my FAQs will be static HTML.
Thank you for any suggestions.
The simplest way to display an HTML page is to use a UIWebView as the main view of your view controller and set its URL or file-path using the loadRequest() method of your view.
You can use this method for both remote FAQs (in this case you'll set an URL) and local and static ones for which you'll use a path to the file included in your project.

Is is possible to share elements or parts of a page on social media sites?

I'm hoping this is a pretty simple question to answer. I have a page with 6 recipes on it. I'm being asked to include share buttons for each recipe and they want the shares on FB or Twitter to be formatted to use a specific image and text for each recipe. This is something we would normally handle via Open Graph metatags and the like, but that only works at the page-level.
You must use a separate URL/page for each Like/Share. But you can redirect to the main page, or just use a GET parameter. For example, each Like/Share Button can use the following URL: http://www.yourdomain.com/yourrecipepage.php?recipeid=x
The "x" being dynamic, of course. Now you can check the recipeid parameter and use different OG tags. the rest of the page will be the same. I hope you understand what i mean :)

Hide website filenames in URL

I would like to hide the webpage name in the url and only display either the domain name or parts of it.
For example:
I have a website called "MyWebSite". The url is: localhost:8080/mywebsite/welcome.xhtml. I would like to display only the "localhost:8080/mywebsite/".
However if the page is at, for example, localhost:8080/mywebsite/restricted/restricted.xhtml then I would like to display localhost:8080/mywebsite/restricted/.
I believe this can be done in the web.xml file.
I believe that you want URL rewriting. Check out this link: http://en.wikipedia.org/wiki/Rewrite_engine - there are many approaches to URL rewriting, you need to decide what is appropriate for you. Some of the approaches do make use of the web.config file.
You can do this in several ways. The one I see most is to have a "front door" called a rewrite engine that parses the URL dynamically to internally redirect the request, without exposing details about how that might happen as you would see if you used simple query strings, etc. This allows the URL you specify to be digested into a request for a master page with specific content, instead of just looking up a physical page at that location to serve.
The StackExchange sites do this so that you can link to a question in a semi-permanent fashion (and thus can use search engines with crawlers that log these URLs) without them having to have a real page in the file system for every question that's ever been asked (we're up to 9,387,788 questions as of this one).

Customize YouTube Embed URL

Is it possible to modify the URL used to embed YouTube videos in an iframe (http://www.youtube.com/embed/_AJS0lgT-4a)? For example, adding the channel name.
My organization blocks YouTube so I need to create a rule on our proxy server to allow users to access our channel only.
Thank you.
Yes, if you load the videos directly from the user's channel, it'll look like this:
http://www.youtube.com/user/vsauce#p/u/4/CSf8i8bHIns
So you'd be on the user's channel homepage.
"/user/username" is your golden ticket, and #videoid will point to the video if you want to link directly to it.
Multiple other varibles are passed in the url that you can make exceptions for, most notably a playlist. This string will appear somewhere in the url, generally tacked onto the end:
"&list=PLAYLISTIDHERE" ex. "&list=PLE126C843377DCE64"
One of those should do the trick as long as the admins are willing to play nice!
Best of luck!

Resources