/    Sign up×
Community /Pin to ProfileBookmark

<?php include(‘menu.php’); ?>

When I clicked link, menu.php will be opened in div. Is it possible?

<a>Link</a>
<div></div>

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@NightShift58Jan 22.2007 — No, because the include takes place before the click...
Copy linkTweet thisAlerts:
@samanyoluauthorJan 22.2007 — I found this:



&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript"&gt;
function showMenu(){
if(document.getElementById('menu').style.display=='block'){
document.getElementById('menu').style.display='none';
}else{
document.getElementById('menu').style.display='block';
}
}
&lt;/script&gt;
&lt;/head&gt;&lt;body&gt;
&lt;u onClick="showMenu()"&gt;open menu&lt;/u&gt;&lt;br&gt;
&lt;div id="menu" style="display: none"&gt;&lt;?php include("menu.php"); ?&gt;&lt;/div&gt;&lt;/body&gt;
Copy linkTweet thisAlerts:
@NightShift58Jan 22.2007 — That should do it... The alternative would've been AJAX... So this is better...
×

Success!

Help @samanyolu 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.19,
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,
)...