The best way to change the text on a webpage without refresh

I’m trying to emulate the upvote/downvote system used on the SE sites. Each of my pages have a score which users can upvote or downvote. The arrows are images with onclick links to javascript functions....

Clone a draggable div

This script to clone a draggable has a weird effect. I create a clone of a draggable div and then remove the original. When I drag the clone and drop it on a second container, two draggables appear: the...

PHP background Script blocking connection for whole browser

I have the following problem:A PHP Script is called via Ajax. The script itself closes the connection using the following lines ignore_user_abort(true);header(“Content-Length: 0″);header(“Connection:...

Using variable as value in post to php/mysql

I get a random row from a mysql-server using php. I then display some information and would like to let the users give feedback on that specific row. However, I can’t seem to transfer the ID correctly...

safest way to let users with no login to delete mysql entry

so heres the problem,i have an if() statement that determines whether a user has visited my site before, if they have then they have an option for removing their record from the database. Problem is,...

Allow PHP file to be requested by javascript but not directl

I’m using a jquery script that uploads files with ajax and PHP. It sends a request to upload_a_file.php which then uploads files.Is there a way that I can make sure upload_a_file.php is not loaded...

foreach is closing after first value then displaying the rem

I wrote a wordpress widget that lists the categories of the blog in a tag. Initially the code I wrote works and you can select a value and when you click save the widget displays the correct information...

Handling a fatal error in PHP from an AJAX call

Quite simply, I want my javascript to be able to react to a fatal 500 error caused by PHP, appropriately to the error.My goal is simply to collect the fatal error message that the script produced, so...

Adding custom page template to thesis

I’m trying to add a custom page template to show only one sidebar for specific pages.I created a template page in thesis folder and I put these lines<?php echo thesis_header(); ?><?php...

alert another page

I have an index.php. It has a log in function. Let’s say I have 2 users A and B.Page1(index.php of user A) -with function(checks whether there are changes in the database, if yes: alert(‘message’))Page2(index.php...