/    Sign up×
Community /Pin to ProfileBookmark

Calling a function from url[NEWBIE]

Hello! I’m a stranger to javascript, and i hope you can help me whit this.

i have my index.html file which uses AJAX to change the contents in id=”col1″ container which works perfectly, but the question is, how can i get to load, lets say, “articles” section whitin “col1”.
i hope you can understand what i need.

ie, if i type: “http://www.someurl.com/index.html/?articles” or “http://www.someurl.com/index.html/articles” or something like that, i want to load index.html but show it as if i had called from there javascript:callasync(‘kart/articles’, ‘col1’);

index.html

[CODE]
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
“http://www.w3.org/TR/html4/loose.dtd”>
<html lang=”es”>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=”iso-8859-15″>
<title>KartingEntreRios.com.ar</title>
<link href=”css/silk.css” rel=”stylesheet” type=”text/css” media=”screen, all” />
<script language=”JavaScript” type=”text/javascript” src=”js/ajax.js”></script>
</head>
<body>
<div id=”container”>
<div id=”topcontainer”>
<div id=”header”>
<h1>KartingEntreRios.com.ar</h1>
</div>
</div>
<div id=”linksheader”>
<a href=”kart/”>HOME</a> | | |
<a href=”javascript:callasync(‘kart/articles’, ‘col1’);”>NOTICIAS</a> | | |
<a href=”javascript:callasync(‘kart/ranking’, ‘col1’);”>RANKING</a> | | |
<a href=”javascript:callasync(‘kart/pics’, ‘col1’);”>FOTOS</a> | | |
<a href=”javascript:callasync(‘kart/champ’, ‘col1’);”>CAMPEONATO</a> | | |
<a href=”javascript:callasync(‘kart/buy’, ‘col1’);”>CLASIFICADOS</a> | | |
<a href=”javascript:callasync(‘kart/contact’, ‘col1’);”>CONTACTOS</a> | | |
</div>
<div id=”middlecontainer”>
<div id=”col1″>
NO CONTENT
</div>
<div id=”col2″>
NO CONTENT
</div>
<div id=”col3″>
NO CONTENT
</div>
</div>
<div id=”footer”>
<a href=”index.html”>kartingentrerios.com.ar</a><br />
Powered by <a href=”http://www.python.org/”>Python</a><br />
Development and design by <a href=”mailto:[email protected]”>k0001</a>
</div>
</div>
</body>
</html>
[/CODE]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@bathurst_guyMay 20.2007 — I would replace all this JavaScript with server side coding, PHP.
×

Success!

Help @k0001 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.23,
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,
)...