Hi Keith
Thanks for your quick reply ...
What i'm trying to integrate is the Calendar from Dynarch ....http://
www.dynarch.com/projects/calendar/
What i' currently want to display in place, when clicking the
displayed text is this portion of HTML :
...I've included in my Layout all the dependencies to CSS stylesheets
and Calendar javascript files ...
<input class="editor_field" type="text" name="value" style="background-
color: rgb(255, 255, 153);"/>
<button id="f_trigger_b" type="reset">...</button>
<script type="text/javascript">//<![CDATA[
Calendar.setup({
align : "BR",
showOthers : true,
onClose : closed,
button : "f_trigger_b"
});
//]]></script>
And in fact in my last tests, i saw i've missed some scripts...so the
Javascript generated by the DOM is well executed ..it Works
Laurent...i could send you this once finished... i will see if it's
possible to include this component in Rails later...
Thanks again
L
On 2 mai, 13:47, Keith Pitt <[EMAIL PROTECTED]> wrote:
> Gday Laurent,
>
> I dont think you can create javascript code like that.
>
> var javascript = document.createElement("script");
> javascript.setAttribute("type", "text/javascript" );
> var code = document.createTextNode(
> "All my code");
> javascript.appendChild(code);
>
> You cant add javascript as a DOM element. What sort of code are you
> putting in
> there? Can it be executed where your doing the DOM creation stuff? Why does
> it have to be in there?
>
> Keith
>
>
>
> Laurent wrote:
> > 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
>
> --
> MindVision Interactive
>
> Ph: (08) 8212 9544
> Fax: (08) 8212 9644
>
> E-Mail: [EMAIL PROTECTED]
> Web:www.mindvision.com.au
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---