Change an 'object' content...

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Sacapuss
Forum Commoner
Posts: 40
Joined: Mon May 16, 2005 9:46 pm
Location: Earth...

Change an 'object' content...

Post by Sacapuss »

Hi !

To transfer a file content in a part of my page, i'd like to change an 'object' content.

It could be something like that :

Code: Select all

<object
id=&quote;tarmac&quote;
data=&quote;1.html&quote;
>
</object>

<a onclick=&quote;document.getElementById('tarmac').data='2.html'&quote;>
change
</a>
But this way doesn't work !

Who has the solution ???

Thanx for your help !
User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post by wwwapu »

Have you succeeded with this?

Code: Select all

<object id=&quote;tarmac&quote; data=&quote;1.html&quote;></object>
because I havn't. Object would be ideal way of inserting menus and such on servers where there isn't any PHP or other programmatic way of including them. Only if it worked with all browsers.
User avatar
Sacapuss
Forum Commoner
Posts: 40
Joined: Mon May 16, 2005 9:46 pm
Location: Earth...

You may find answers in my next question...

Post by Sacapuss »

Hi wwwapu !

You may find answers in my next question...
Post Reply