/    Sign up×
Community /Pin to ProfileBookmark

Ajax Php include change?

This could probably be posted in the javascript forum too, but I thought I would have better luck here.

I’m trying to see if there is a way I can have an onclick event to change the inner content on one of my pages. I want the page to load with the original content in one of the cells of a table.

The current content is <?php include(“tiles/contents.php”); ?>.

I want to be able to have a button click and change the content of the cell to <?php include(“tiles/contents2.php”); ?>.

Is there a way to do this easily? I knew to php and not sure how you would code this. I know how this would work in jsp, but I can not figure out who it would work with php.

to post a comment
PHP

0Be the first to comment 😎

×

Success!

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