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

  • Home
  • SEARCH
  • 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 598395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:23:02+00:00 2026-05-13T16:23:02+00:00

I have this script: <? $query = mysql_query(SELECT * FROM azzdk) or die(mysql_error()); $row

  • 0

I have this script:

<?
$query = mysql_query("SELECT * FROM azzdk") or die(mysql_error()); 
$row = mysql_fetch_array($query); 
?>
<p>
<script language="JavaScript">
function myEditable(e, act) {
    if (act == 'click') {
        // lav indholdet af span om til et input felt og sæt et onblue event på den
        e.innerHTML = '<input type="text" value="'+e.innerHTML+'" onblur="myEditable(this, \'edit\')" />';

        // fjern span onclick eventen
        e.onclick = null;

    } else if (act == 'edit') {
    var nocache = 0;
        // hent span elementet igen
        var parentElement = e.parentNode;

        // Opdater span teksten, e.value er den nye værdi
        parentElement.innerHTML = e.value;
        nocache = Math.random();
        var tekstny= e.value;
            http.open('get', 'editsave.php?tekstny='+tekstny+'&nocache = '+nocache);
http.onreadystatechange = insertReply;
http.send(null);
        // placer onclick eventen igen på span elementet
        (function(e){
                e.onclick = function()
                {
                    myEditable(e, 'click');
                };
            })(parentElement);


    }
    function insertReply() {
if(http.readyState == 4){
var response = http.responseText;
// else if login is ok show a message: "Site added+ site URL".
document.getElementById('insert_response').innerHTML = response;
}
} 

}
</script>
<p>
    <h1><div align="center"><span onclick="myEditable(this, 'click');"><?=$row["felt"]; ?></span></h1></div>
</p>    <div id="insert_response">Respons: </div>

This script does so when you click on that span text ( $row[felt] ) it will make it to a input and then, you will be able to edit the text, and then when you press somewhere else it will save.
This worked before, but for some reason it doesnt work now, i think i accidently removed something.. And i cant find where i did something wrong.
It doesnt send correct (it should send like editsave.php?tekstny=THE NEW VALUE YOU HAVE EDITED HERE)

I have checked editsave.php and that works, so the error must be in this script somewhere.

Hope you guys can help me out. Thank you.

  • 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-05-13T16:23:02+00:00Added an answer on May 13, 2026 at 4:23 pm

    This is broken because you don’t define your http var. You’re missing something like:

    var http = new XMLHttpRequest();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So i have this script: <?php $query = mysql_query( SELECT meetup AS text, id
I am using this category script: <?php include(connect.php); $nav_query = mysql_query(SELECT * FROM `categories`
Hey guys, I have this piece of jquery code: <script type=text/javascript > $(function() {
I have this script : $limit1=10; $MySQL=mysql_connect($myhost,$myuser,$mypass); mysql_select_db($sitedb); $rank = mysql_query('SELECT usrid,num FROM 7stat
I have this code: $result = mysql_query(SELECT * FROM quote ORDER BY RAND() LIMIT
I have this script to output everything from table called Articles. If I load
I have a script, see below: Index page: jQuery script <script type=text/javascript> $(document).ready(function(){ $(#loadmorebutton).click(function
I have this script: $db = mysql_connect($hostname, $db_user, $db_password); mysql_select_db($database,$db) or die( Unable to
I have created this php script, to create an xml-file from my database: <?php
i have a javascript function like this: function addfamily(divName){ var newdiv = document.createElement('div'); newdiv.innerHTML

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.