Hello,
I currently have extended a class from the ScriptACulous Libary :
Ajax.InPlaceEditor .
I'm doing an InPlaceCalendarEditor, that i will then integrate in my
Rails project (with an helper) :
For this, when you click the highlighted text, i generate :
A textfield (for the date), and a button that will open a mini DHTML
Calendar (Dynarch).
All this UI is generated by working with DOM (code is the one from the
methode : createEditField) :
var calendarDiv = document.createElement("div");
var textField = document.createElement("input");
..
var buttonCalendar = document.createElement("button")
..
calendarDiv.appendChild(textField);
calendarDiv.appendChild(document.createTextNode("\u00a0\u00a0"));
calendarDiv.appendChild(buttonCalendar);
But, to open the mini calendar, i need to create a javascript node ,
so i do like this :
var javascript = document.createElement("script");
javascript.setAttribute("type", "text/javascript" );
var code = document.createTextNode(
"All my code");
javascript.appendChild(code);
Then finally:
calendarDiv.appendChild(javascript);
When integrating this in a page , all is well displayed (field &
button), unless the calendar (when clicking on teh button).
The javascript code created by DOM seems not executed...
Have you any idea?
Thanks
laurent
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---