Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

refresh / reload a single div without loading page.

Featured Replies

Hello, looking for a quick way around a problem.

 

I have a follow button on my website that when clicked, submits data via ajax.

 

I have else where used the ajax code so that the div changes its css as it happens, but its not working with this one as i have variables for the colour etc in the php files and all sorts.

 

So i have the form contained in a div called "followdiv"

 

I just want the content of the div to reload. On the page there is a call to the database in which it makes a check and sets the submit buttons class depending on the result.

 

Is it possible to just reload the div and nothing else so it works like that?

 

Here is what i have so far for the success part of the ajax call:

if (response.databaseSuccess)
			  $("#buildtopinfo").load(''),
			document.getElementById("followsubmit").disabled = true;

this however ofcourse loads the whole page inside that one div.

 

Hope this makes sense!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.