<
html
>
<
head
>
<
script
type
=
"text/javascript"
src
=
"javascript/prototype.js"
>
</
script
>
<
script
type
=
"text/javascript"
src
=
"javascript/scriptaculous.js?load = controls"
>
</
script
>
<
script
type
=
"text/javascript"
>
window.onload = function () {
// InplaceEditor with okButton
// option set to true
new Ajax.InPlaceEditor(
'editableElement',
'inplace.php',
{
okButton: true
}
);
// InplaceEditor with okButton
// option set to false
new Ajax.InPlaceEditor(
'editableElement2',
'inplace.php',
{
// Specify the boolean value
// whether the button will be shown or not
okButton: false
}
);
}
</
script
>
</
head
>
<
body
>
<
h1
style
=
"color: green"
>
GeeksforGeeks
</
h1
>
<
h2
>InPlaceEditor okButton Option</
h2
>
<
p
>
The "okButton" option is used to specify
whether the ok button will be shown or not
</
p
>
<
b
>
This element has the okButton set to true
</
b
>
<
div
id
=
"editableElement"
>
Click this element to edit
</
div
>
<
br
>
<
b
>
This element has the okButton set to false
</
b
>
<
div
id
=
"editableElement2"
>
Click this element to edit
</
div
>
</
body
>
</
html
>