Is there anyone who can write a javascript/php code for refreshing the contents of only one DIV container on one page?

in what sense you are saying to refresh div? using ajax you can refresh any div or you have just static content and want to chage that static content then you can hide any div using javascript and can how any other div of same height width with different id

Member Avatar for diafol

Like bzz says if the info you want to insert into the div is static, you can do this with just js. Give the div an I'd and access this via the old faithful getElementById and set new data with innerHTML prperty.

If the data is dynamic/coming from dB. You'll need ajax. I'd recommend using a simple library like prototype to deal with the repetitive business of creating an ajax object.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.