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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:10:15+00:00 2026-06-18T10:10:15+00:00

I have a PHP page where I display in a Div values obtained from

  • 0

I have a PHP page where I display in a Div values obtained from a database. This div is loading data automatically using Ajax. My problem is that when the Div is reloaded I can´t use Jquery functions or attributes overs objects in the Div (Like converting a label in button).

This is the code I´m using:
//jquery

 $(function() { 
            $("label").button();
    });

//ajax

var RequestObject = false;
var unidad = <?php echo json_encode($unidad);?>;
parametros='?unidad='+ unidad;

var Archivo = 'obtiene_ultimas_lecturas.php'+ parametros ;
window.setInterval("actualizacion_reloj()", 15000); 
 if (window.XMLHttpRequest)    
    RequestObject = new XMLHttpRequest();  
 if (window.ActiveXObject)     
    RequestObject = new ActiveXObject("Microsoft.XMLHTTP");  

function ReqChange() {  
if (RequestObject.readyState==4) {  
    if (RequestObject.responseText.indexOf('invalid') == -1)   
    {   
    document.getElementById("marco").innerHTML = RequestObject.responseText;  
    }  
    else 
    {  
    document.getElementById("marco").innerHTML = "Error llamando";  
    }  
  }  
}         

function llamadaAjax() {  
        RequestObject.open("GET", Archivo , true);  
    RequestObject.onreadystatechange = ReqChange;  
    RequestObject.send(null);   
 }  

function actualizacion_reloj() {  
    llamadaAjax();  
  } 

//html

 <div id="marco" name="marco">
    <table> 
     <tr class="Estilo4">
          <td align="center"><input name="nge" type="text" size="9" value="<?php printf("%.3f",$nge); ?>" />&nbsp;<label>m³</label></td>
         </tr>
    </table>
    </div>

This is basically my code, I’d want to label contained in div could get ‘button’ attribute.

  • 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-18T10:10:16+00:00Added an answer on June 18, 2026 at 10:10 am

    This will do it for you..

    function actualizacion_reloj() {  
        llamadaAjax();  
        $("label").button();
      } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple php page that displays data from a mysql database. I
I have a little problem with a php page that display an sqlite database
I have a PHP page that loads external content using other PHP files. I'm
I have this PHP page where the user can select and un-select items. The
Basically, I am doing this: I have already read the database and obtained all
I am trying to fetch data from my database and when I display it
I have a php-ajax page that where user writes search string in search.php ,
I have a php page that connects to a mysql database. I know that
I have a div with the id hubspot-contact-form. This div has a display style
I am trying to display information from database. I have set $config['per_page'] to 2,

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.