/    Sign up×
Community /Pin to ProfileBookmark

Linking Code in HTML or Java

(I have posted this in the HTML Catergory as well, looking for more responce)

Hi,

I was trying to link an HTML file with a JAVASCRIPT code:
<source type=”text/javascipt” src=”header.html”>

I realized that this didn’t work, and now assume it only works with JAVASCRIPT files (.js). Being so, I used my limited knowledge to try to find the code myself, coming up with:
<area shape=”rect” coords=”551,7,751,108″ src=”header.html”>

This didn’t work either. I’m hoping someone can interprit what I’m trying ot do with the code I’ve mentinoed and help me out with the right code to use. I want to have a main index.html page that uses complete code from other .html files. This would make it easier to update the page being as I’d only have to update 1 file (for a menu for example).

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@tabzterOct 27.2005 — You cant do this with client-side development!

There is one way round this, in which you use frames to display all the pages you want in one window.

As an example, suppose you have 3 html pages called [I]index.html[/I], [I]directory.html[/I] [I]and main.html[/I], you can display all of these pages at the same time using the following code:<frameset rows="33%,33%,*">

<frame src="index.html">

<frame src="directory.html">

<frame src="main.html">

</frameset>

[U]note://[/U] [B]The above code displays the 3 pages in a series of rows. You can choose any way you want to display the pages i.e. 1 column and 2 rows etc...

and you can also chose to have no borders aswell[/B]
Copy linkTweet thisAlerts:
@GusJustGus1authorOct 27.2005 — lol, I'm not an idiot... I've been using frames since Middle school, almost a decade ago. I'm looking to get out of using frames. That's why I automatically assumed areas would be my best bet.
Copy linkTweet thisAlerts:
@tabzterOct 28.2005 — Well I thought you was a noob by looking at your above above coding i.e.

[B]<source type="text/javascipt" src="header.html">[/B] and

[B]<area shape="rect" coords="551,7,751,108" src="header.html">[/B]

which are wrong. I mean <source> is not even a valid markup tag.

Also the question you posed.

But if you know all this, then ur next step would be to look into server side development i.e. PHP,PERL etc..
Copy linkTweet thisAlerts:
@VicOct 28.2005 — Try using <iframe src='mypage.html'>.

You can style this object with TOP; BOTTOM; LEFT; RIGHT; WIDTH; HEIGHT and other CSS attributes, so that you can position it anywhere on the page as needed.
×

Success!

Help @GusJustGus1 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...