View Full Version : Saving dynamically changed values JS

02-26-2007, 10:38 PM
I am building a kind of editor that reads a file and displays it in a nice GUI (input boxes and so on) but once javascript has changed some values in the boxes by using pop up clour menus and things how can i save that modificaiton. Because if i change the values, and then look at "view source" in the browser the values are still the same as before???

02-26-2007, 10:41 PM
Get the Webdeveloper extension for Firefox and try View Source>View Generated Source. You can see the current values of elements that way.

02-27-2007, 12:17 AM
Well im not really asking whether it is there or not (because i know it is, the values change) im really asking how you can save the modified value - pass it to another page with a reference to where it is supposed to go / a reference to which value it is suppose to replace?

update: sorry i was being lazy and now i have just done a simple input box change with onclick:

if($_POST['submit']) {

echo $_POST['change'];

<script type="text/javascript">
function change() {
document.getElementById('change').value='i have been changed';

<form action="test.php" method="post">
<input type="text" name="change" id="change" value="changeme"><br>
<div onclick="return change();">Change</div>
<input type="submit" name="submit">

even though the source says the original value when i post it reads the changed value. Sorry to have wasted time, delete this topic.

02-27-2007, 12:19 AM
You have the values there, so yes, just send them via a form as post data and receive them with the server-side language of your choice and then (probably) put them into your database.