Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8581859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:09:10+00:00 2026-06-11T21:09:10+00:00

I want to include in my web page another web page. I know how

  • 0

I want to include in my web page another web page. I know how to do that.

<html>
<head>
<br>
<some links to external scripts...><br>
<br>
</head><br>
<body onload='$("#divkat").load("page1.php");'><br>
<div><br>
<br>
<br>
<div class="sidebar"><br>
              <h3>category :</h3><br>
         <a onclick='$("#divkat").load("page1.php");'>page1</a><br>
         <a onclick='$("#divkat").load("page2.php");'>page2</a><br>
         <a onclick='$("#divkat").load("page3.php");'>page3</a><br>
             <a onclick='$("#divkat").load("page2.php");'>page4</a><br>
           </div><br>
<br>
<br>
<div id="divkat"><br>< /div><br>
<  ! - - < ?php include( 'page1.php' ); ?>    - - ><br>
             < /div><br>
            < /div>
<br>
<br>
<br>
</body><br>
</html>

it’s working fine.

the problem is that the “page1.php” contain a few shadowbox (lightbox).
like this :

 <br>
< /div><br>
< div style="height:180px;width:180px;float:left;margin-top:15px;margin-left:15px;"><br>
< a href="img/panorama-split.jpg" rel="shadowbox; height=500; width=960"><br>< img src="img/tumb-kastel.jpg" alt="Klematis" width="180" height="180" />< /a><br>
< div>

the main page won’t run the JS. If I open the “pag1.php” it work normally.

I want to make a web gallery (main page containing categories) when I click on a category,
php function include a page containing the items which open in a shadowbox.
One solution is to have many pages as categories, but is not piratical. To add a new
category you must edit all of them.
Someday maybe I’ll program a admin interface for easy adding new category, pictures, and other media with links and thumbnails. Ofcorse with possibility to delete and backup.

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:09:11+00:00Added an answer on June 11, 2026 at 9:09 pm

    One problem you have here is that you are using HTML comments:

    <  ! - -
    

    This means that when PHP includes the HTML in page1.php it will actually be commented out. Try just:

    < ?php include( 'page1.php' ); ?><br/>
    

    Instead.

    As to the rest, maybe we can get some clarification. Page1.php contains no JS so how can it run the JS as normal when opening it directly? Maybe you can explain what doesn’t work normally?

    Edit

    I have a feeling you are referring to the body onLoad within your question. If so I have always found JQuery to be a bit weird when put into the HTML directly. Instead you can try and run your JQuery after the DOM itself has loaded by putting this into your head tag:

    <script type="text/javascript">
        $(function(){
            $("#divkat").load("page1.php");
        });
    </script>
    

    And replace the body tag with:

    <body>
    

    Also for the hyperlinks you might wanna look into using JQuery events using the function on(): http://api.jquery.com/on/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Spring 3.1 and want to include Spring Web Flow 2.3. One
I'm developing an ajax based web site and I want to include a FB
I want to detect when an include in a jsp occurs in a web
I'm building an as3 only web application and want to be able to include
This is PURE HTML. (no php or anything like that, if you want to
I'm using ReportViewer to create some reports to my web application and I want
I have a web page that lists a number of companies from a MYSQL
The variable $page includes a webpage (full HTML file), but I want to filter
I have a web page that has a few text boxes, and a dual
I want to make include jspf into index jsp page , these statements <%--

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.