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

  • SEARCH
  • Home
  • 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

Ask A Question

Stats

  • Questions 449k
  • Answers 449k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Nevermind, I found the answer to this. Its actually not… May 15, 2026 at 8:11 pm
  • Editorial Team
    Editorial Team added an answer Looking @ the API docs for ActionController::Rescue, it appears that… May 15, 2026 at 8:11 pm
  • Editorial Team
    Editorial Team added an answer Everything depends on the hosting provider you use for your… May 15, 2026 at 8:11 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.