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 8347211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:17:28+00:00 2026-06-09T07:17:28+00:00

Now, everyone knows the cute little trick where you punch this Javascript code into

  • 0

Now, everyone knows the cute little trick where you punch this Javascript code into your browser’s URL bar:

document.body.contentEditable = 'true'; document.designMode = 'on'; void 0

And El Presto! You can start freely editing a website just how you want it.

The only problem is – you can’t save it!

After doing some quick research, I found that most likely, the best way to save this was by the method suggested here, which consists of somehow turning the page into a giant form and posting it to a MySQL database.

Sure, while doing this is great, it’s going to end up saving my whole page – and not just the section or container that I want to edit – and that’s a major problem because us developers need to preserve lines of code such as…

<?php include('header.php'); ?>

…that aren’t outputted in the HTML. In other words: it’s going to save my page as it appears in outputted HTML, overwriting what is in my original PHP file.

What I’m asking how to do, is how would I go about saving a website edited like this, but just to save or update one or two editable containers on the website (not the whole thing so my PHP code doesn’t get overwritten)?

For example:

<p>This Won't get updated when the page is "saved"</p>
<div id="update-this-contianer">
   This area will be passed on to the MySql database, and then updated into the same section of the original file.
</div><!-- End Area To Update -->
  • 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-06-09T07:17:29+00:00Added an answer on June 9, 2026 at 7:17 am

    Instead of setting contentEditable on the entire body, just put it on the element you want to edit. Then, send the contents of that element to the server. When you want to get the data back again, you just include that section in the appropriate place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Now I do have a hw question for everyone...I've been staring at this for
By now everyone writing for Windows probably knows that applications cannot (officially) steal focus
I am new to Ruby as probably everyone here knows by now :) I
everyone, thank for your time. Well this my problem (well it's not a probleam
Hi everyone Im on to the last part now which is file reading. i
MOV is probably the first instruction everyone learns while learning ASM. Just now I
Now I'm not sure if this is something I'm doing wrong, or something thats
Everyone knows that we should always use DOM techniques instead of regexes to extract
Everyone who's done any web application development in Scala knows that you can use
As everyone knows, we are NOT allowed to modify the Adsense PHP script as

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.