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 5976357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:13:00+00:00 2026-05-22T21:13:00+00:00

I currently have a link: <a href=view.php?page=1>Click Here<a> What I need is to do

  • 0

I currently have a link:

<a href="view.php?page=1">Click Here<a>

What I need is to do the same thing using ajax so that I don’t have to go to a different url and still get the same result.

UPDATE:

I have page A and page B

On page A I have a link to page B

<a href="view.php?page=1">Display Page B<a>
<div id="page-b-goes-below">
Page B goes here
</div>

Can the above be done please?

  • 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-05-22T21:13:00+00:00Added an answer on May 22, 2026 at 9:13 pm

    HI,

    You cant change a pages complete html with ajax, and the script in the ajax file won’t be executed. so you have to make some tricks
    some thing like iframe or a master div.

    if you wish to use iframe ajax is no need.

    still you need this in ajax what you have to do is.
    1. ajax files should have only the body content not even the body tag.
    2. have a div next to body tag of the first page and load all the file with ajax in that div.

    Example:
    First or Initial page.
    <html>
    ……….
    ……….
    <body>
        <div id=”ajax-container”>
            you content comes here..
            ……………………
            ……………………
        </div>
        <script>
        $(document).ready(function() {
            init_linkhandler();
        });
        function init_linkhandler() {
            $(‘a’).click(function() {
                $(‘#ajax-container’).load($(this).attr(‘href’));
                init_linkhandler();
                return false;
            });
        }
        </script>
    </body>

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

Sidebar

Related Questions

I have a page on my site that currently loads html via ajax. The
I have a -link element that has href link to page, but I have
This is what I have currently: $('#dialog').dialog({autoOpen: false, buttons: [{ text: 'View Here', click:
Sorry about the length here. I'm using oscommerce and have a page with all
I have a php script that outputs a link element within a list element
I have the following Nav: <li id=categories> <ul> <li class=cat-item cat-item-8 current-cat><a href=#>Link</a> <ul>
I currently have an MS Access application that connects to a PostgreSQL database via
I currently have an existing database and I am using the LINQtoSQL generator tool
I have next link that lets users navigate through a list of URL (stored
I have an event handler that is called six times when I click on

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.