Jump to content

Ajax to always pull and display data??


DeanWhitehouse

Recommended Posts

I have just started to learn AJAX and i am making a chatroom the problem i am having is on how to pull data from the php file and display the data inside another page, and how to show current data, as it will continuosly be changing. Any one know how to do this, the most i have been able to do so far is display data inside a input field from a php file.

Link to comment
https://forums.phpfreaks.com/topic/111567-ajax-to-always-pull-and-display-data/
Share on other sites

Use the "innerHTML" property for DIV, SPAN, and similar layout elements.

 

Use the "value" property for INPUT, TEXTAREA, and similar form elements.

 

Use events to specify when AJAX should be requested. The event verbiage "onClick", "onLoad", and "onMouseOver" is very easy to understand.

 

I've created a simple Base64 encoder and attached it to this post. You can see that when a user enters a string and clicks the "encode" button, the encoded string is displayed. I used the "onClick" attribute to make this work.

 

[attachment deleted by admin]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.