Guide to get best SEO results
How do you create a hyperlink that opens to another webpage inside the current webpage?
| Print article | This entry was posted by admin on June 3, 2010 at 8:55 am, and is filed under Web Page. Follow any responses to this post through RSS 2.0. Responses are currently closed, but you can trackback from your own site. |
No trackbacks yet.
Comments are closed.
about 1 year ago
This in theory can be done, but unfortunately, it gets really complicated really fast. Here’s a simple example that works in Standards-compliant browsers like Firefox, Opera and Safari =)
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
In-line Hyperlink
Search the Web!
Edit: This is extremely simple example, in reality, you’d probably want to use JavaScript to create the object and target it when the link is clicked. This way, the link behaves normally if the user isn’t using a graphical browser.
It would be a little trickier, but doable, to get the link itself to change into an object element and create a sort of GUI for expanding the link into the current web page and minimising it back into a regular link. This would all be done using JavaScript. I’ve personally been experimenting with its interface, but haven’t implemented it on anything yet.
In theory, this general concept was one of the main advantages of XLinks versus Hyperlinks, but it was discovered in the making of XHTML2, that XLinks and HTML are not compatible.
Interestingly enough, Vannevar Bush’s description of the Memex sounded like it might have worked using in-line Hyperlinks, particularly the trickier implementation I noticed.
about 1 year ago
The easiest cross-browser approach is to load the external page in an iframe. I assume you don’t want the video to load on initial page load. If you *do* want it to load on initial page load, then simply use an iframe that loads whatever URI you want, e.g.:
Otherwise, try something like this:
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd">
function loadIframe(str) {
var d = document;
var myDiv = d.getElementById(‘myDiv’);
var myFrame = d.createElement(‘iframe’);
myFrame.setAttribute(‘src’, str);
myFrame.setAttribute(‘frameborder’, ’0′);
myDiv.appendChild(myFrame);
return false;
}
My Page
Watch video!
End of my page
If you want to get sophisticated, you should look into using a JavaScript framework like jQuery.
about 1 year ago
Easier to make the link a popup link calling a popup file with the video. You can control the size of the page to fit just the video. On the popup page, you can add a “Close This Window” button.
Online Popup Makers…
http://www.wilsoninfo.com/pop_gen.html
http://www.freewebmasterhelp.com/tools/popup/
http://www.hypergurl.com/newwindow.html
http://javascript.internet.com/generators/popup-window.html
http://www.htmlbasix.com/popup.shtml
http://www.dynamicdrive.com/dynamicindex8/popwin.htm
http://javascript.internet.com/generators/popup-window.html
Ron