Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi!
I'm using AJAX to edit a field on a test page
[syntax="html"]
<html>
<head>
<title>test</title>
<style type="text/css">
/* Define the basic CSS used by EditInPlace */
.eip_mouseover { background-color: #ff9; padding: 3px; }
.eip_savebutton { background-color: #36f; color: #fff; }
.eip_cancelbutton { background-color: #000; color: #fff; }
.eip_saving { background-color: #903; color: #fff; padding: 3px; }
.eip_empty { color: #afafaf; }
</style>
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="EditInPlace.js"></script>
<script type="text/javascript">
Event.observe(window, 'load', init, false);
function init() {
// Over ride some of the default options.
EditInPlace.defaults['type'] = 'text';
EditInPlace.defaults['save_url'] = 'edit.php';
// Textarea example.
EditInPlace.makeEditable({ id: 'bigedit', type: 'textarea' });
}
</script>
</head>
<body>
<p>
<div id="bigedit"><?php echo "$content"; ?></div>
</p>
</body>
</html>
But when I give e.g <h1>HEADER</h1> as new content the area isn't editable anymore..
Maybe something wrong then with the <div id> that needs to be edit.. anyone?
Weirdan | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]