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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:27:14+00:00 2026-05-27T00:27:14+00:00

i’m developing a php page that manage the access to some pubs…. right now

  • 0

i’m developing a php page that manage the access to some pubs….
right now i’m stuck with one hell of problem.

let me explain….

i have a button that call an ajaxrequest and reload a specific div called #entry
the problem arise when i try to access ther property of #entry AFTER the ajax request.

HTML STRUCTURE

<div id="all">
    <div id="prenotazioni" class="mobile-left">
        <? CController::renderpartial('_lista'); ?>
    </div>
    <div id="entry" class="mobile-right" style="width:280px;position:absolute;bottom:0px;right:0px;">
        <? CController::renderpartial('_pren'); ?>
    </div>
</div>

and the jquery code that have problem is the follow

       $(window).scroll(function() {
                $("#all").parent("div").find("#entry").css("bottom","");
                $("#all").parent("div").find("#entry").css("top", $(window).height() - $("#entry").outerHeight() + $(window).scrollTop() + "px");        
         });

so until i call the ajax everithing works fine after that nothing…… somebody can help me?????

Thanks

EDITED

jQuery('body').undelegate('#yt0','click').delegate('#yt0','click',function(){jQu‌​ery.ajax({'type':'GET','data':{'id_lista':-1},'url':'/mobile/showlista','cache':false,'success':function(html){jQuery("#all"‌​).html(html)}});return false;});

_PREN

<div id="tipo"></div>
<input name="report[id_pren]" id="report_id_pren" type="hidden" value=""/>
<div id="ingresso">
<table>
    <tr>
        <td>

        </td>
        <td>

        </td>

    </tr>
    <tr>
        <td style="margin-right: 10px;">
            <div class="male" >
                <span id="male_nr" class="nr">0</span>
            </div>
        </td>
        <td>
            <div class="female">
                <span id="female_nr" class="nr">0</span>
            </div>
            <div class="clear"></div>
        </td>

    </tr>
    <tr>
        <td style="line-height: 53px;">INGRESSI
            <div id="totale_div" style="float:right;">
                <span id="totale">0</span>
            </div>

            </td>
        </td>
        <td rowspan="2" style="text-align:right;"><input type="image" src="../images/mobile/invio.gif" /></td>
    </tr>
    <tr>
        <td style="line-height: 53px;">
           OMAGGI
            <div id="omaggi_div" style="float:right;">
               <span id="omaggi"> 0</span>
            </div>

        </td>

    </tr>
    <tr>
        <td style="width:50px;">
            <input type="button" id="omgplus" class="omgplus" />
            <input type="button"id="omgminus"  class="omgminus" />
        </td>
    </tr>

</table>  
</div>
  • 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-27T00:27:14+00:00Added an answer on May 27, 2026 at 12:27 am

    You are replacing the contents of the #all element with the returned results from the Ajax call. So both #prenotazioni and #entry get removed from the DOM.

    Perhaps you need to put the ajax results inside the #prenotazioni element. If so use

    jQuery("#prenotazioni"‌​).html(html)}
    

    General note

    $("#all").parent("div").find("#entry").css(..)
    

    should be

    $("#all").find("#entry").css(..)
    

    because #all is a container of #entry so you do not need to go further up the DOM hierarchy..

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

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

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.