Hello Mark,
This should do what you want:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript"
src="javascripts/prototype.js"></script>
<script src="javascripts/scriptaculous.js"
type="text/javascript">
</script>
<style>
#hiddenBox{background-color:red; color:white;}
</style>
</head>
<body>
<div id="thingToEdit">This is an InPlaceEditor!</div>
<div id="hiddenBox" style="display:none;">
This wasn''t here before!
</div>
<script>
var thingToEditIPE = new Ajax.InPlaceEditor(''thingToEdit'',
'''');
thingToEditIPE.onEnterEditMode =
function(){$(''hiddenBox'').show();};
thingToEditIPE.onLeaveEditMode =
function(){$(''hiddenBox'').hide();};
</script>
</body>
</html>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---