Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Use <object> instead of <iframe>, how to <a href> to <object>

views
     
TSjayhan
post Dec 15 2006, 11:42 AM, updated 19y ago

7 ☆ DSLR noob
Group Icon
Elite
2,707 posts

Joined: Feb 2005
From: KL
check this article first:

http://www.aplus.co.yu/web-dev/insert-html...ther-html-page/

demo page:

http://intranation.com/test-cases/object-vs-iframe/


HERE IS IT:

I'm interested bout this method and try it, yes, is successful.

then, i try a lil further by trying to at link which the target will be at the <object> thing. So, i try the iframe style by naming the <object> a name, eg.

QUOTE
<object classid="clsid:25336920-03F9-11CF-8FD0-00AA00686F13" data="index2.html" name="loadhere"  style="width:500px;height:300px;">
note that the bold text is not by the source, i add in by myself

then i at a text hyperlink on the mainpage, and target it to the "loadhere" , so i test it, IE does not recognise this but open a new window, then i test in Firefox, firefox recognise the action and load it into the "loadhere"

so any solution to the IE? to make the code crossbrowser friendly smile.gif

notworthy.gif notworthy.gif thanks.

or actually this is an illegal function? hmm.gif

This post has been edited by jayhan: Dec 15 2006, 11:49 AM
onscreen
post Dec 15 2006, 01:19 PM

Nomby
****
Senior Member
675 posts

Joined: Jan 2003
From: PJ, Selangor


I got the problem now.. will update you soon. Pretty challenging thumbup.gif

This post has been edited by onscreen: Dec 15 2006, 01:31 PM
onscreen
post Dec 15 2006, 02:43 PM

Nomby
****
Senior Member
675 posts

Joined: Jan 2003
From: PJ, Selangor


Ha jay, dont laugh at what i have done. To me it works if you you use DIV tags for the links but.. oh well.. i am not ashame to share my findings :

CODE

<div id="mozillaonly"><a href="index.html" target="loadhere">Test Test</a>
<a href="pixel.html" target="loadhere">Test Test</a></div>
<1--[if IE]><div id="IEOnly"><a href="#" onclick="loadhere.location.href='index.html'">Test Test</a>
   <style type="text/css">
#mozillaonly {
    display: none;}
   </style>
<a href="#" onclick="loadhere.location.href='pixel.html'">Test Test</a></div>
<![endif]-->
<object name="loadhere" classid="clsid:25336920-03F9-11CF-8FD0-00AA00686F13" data="pixels/zeeko.html" type="text/html" style="width:600px;height:500px;">
   <p>Fallback text</p>
</object>


just replace the .html to your ones. Have fun.. tongue.gif

QUOTE
<1--[if IE]><div id...

Replace the 1 to ! due to posting restriction.

I am going for further readings about this technique and hopefully it might come out a proper IE linking workaround.

This post has been edited by onscreen: Dec 15 2006, 02:56 PM
TSjayhan
post Dec 15 2006, 05:42 PM

7 ☆ DSLR noob
Group Icon
Elite
2,707 posts

Joined: Feb 2005
From: KL
wow, thanks very much for the solution, very helpful indeed thumbup.gif

edit: tried, and it works notworthy.gif hands.gif

lolz, looks like doing ajax-like stuff, cool

This post has been edited by jayhan: Dec 15 2006, 11:59 PM
onscreen
post Dec 23 2006, 03:01 AM

Nomby
****
Senior Member
675 posts

Joined: Jan 2003
From: PJ, Selangor


Ahh glad it works for you biggrin.gif

anyway..late reply here.. my laptop and my computer graphics card died at the same time.. thats why tongue.gif

 

Change to:
| Lo-Fi Version
0.0149sec    0.49    5 queries    GZIP Disabled
Time is now: 2nd December 2025 - 05:17 PM