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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:30:17+00:00 2026-05-30T15:30:17+00:00

I have a div which is getting reloaded with an ajax update (when pressing

  • 0

I have a div which is getting reloaded with an ajax update (when pressing on the a href link “CLICK HERE!”).

In this div there is an event observer for “window onload”.
This event only fires when the page is getting reloaded in the browser, not when hitting on “CLICK HERE”. Although evalScripts is set to true.

The function “refreshDiv”:

new Ajax.Updater('ajax', ajaxUrl, {
        method: 'post',
        parameters: {...},
        evalScripts: true,
        onComplete: function() {..}
}

The HTML:

<div id="ajax"> 
    <a href="" onclick="return refreshDiv('ajax');">CLICK HERE!</a>

    <?php trigger here>
    <script type="text/javascript" language="javascript">
         Event.observe(window, 'load', function() { release(); });
    </script>
    <? php trigger end>
</div>

I must put it in the DIV section which is getting reloaded, cause there is a trigger from PHP which decides to output the function release(); or not.

Can anybody help here?

  • 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-30T15:30:18+00:00Added an answer on May 30, 2026 at 3:30 pm

    Obviously the window is already loaded by the time your AJAX executes so there is no window load event. If you know this then the HTML part looks much simpler:

    <div id="ajax"> 
        <a href="" onclick="return refreshDiv('ajax');">CLICK HERE!</a>
    
        <?php trigger here ?>
        <script type="text/javascript" language="javascript">release();</script>
        <?php trigger end ?>
    </div>
    

    You might need to check the page request really is AJAX, in which case it must be part of the PHP trigger.


    PS. function() { release(); } is just a longer way of saying release – you could have used that originally.

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

Sidebar

Related Questions

I have a div which I have attached an onclick event to. in this
I have a div which get's its content loaded through ajax .load(ajaxcontent.php). Inside this
I have made this jsFiddle for searching/filtering the div content which I am getting
I have a div which is getting hidden/displayed by a click on another element.
I have 3 radio buttons which hide/show some div's. The radio buttons are getting
I have a DIV which I want to be removed when I click a
Here i have a div in which i am showing it during the mouse
I have a link in a grid on click of which i show the
I have one div which is dynamic and getting the increments in the css
I currently have a PHP page in which there a couple of div elements

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.