change style by javascript

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

change style by javascript

infodima
I want change the object's style (font-size, color) with javascript(id.style.color.for example), and no work, it's possible that it was the same bug that focus' bug?
Reply | Threaded
Open this post in threaded view
|

Re: change style by javascript

Alessandro Vernet
Administrator
On Jan 15, 2008 8:56 AM, infodima <[hidden email]> wrote:
>
> I want change the object's style (font-size, color) with
> javascript(id.style.color.for example), and no work, it's possible that it
> was the same bug that focus' bug?

I assume you want to change the style of an XForms control in
JavaScript; is that right? What is the JavaScript code you are using
to change the "object's style"?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: change style by javascript

Agustin (infodima)
We want capture the keyboard hits with this code:

        <xhtml:script type="text/javascript">
            var pregunta='';
            function keyReleased (myEvent) {
                if (!myEvent)
                    myEvent = window.event;
                if (myEvent.which) {
                    myKeyCode = myEvent.which;
                    //window.event.which=9;
                } else if (myEvent.keyCode) {
                    myKeyCode = myEvent.keyCode;
                    //window.event.keyCode=9;
                }
                pregunta=myEvent.target.name;
         
               
                if (myKeyCode == 48){
                    ORBEON.xforms.Document.setValue(pregunta, myKeyCode -
38);

                } else if ((myKeyCode &gt; 48) &amp; (myKeyCode &lt;= 57)){
                    ORBEON.xforms.Document.setValue(pregunta, myKeyCode -
48);

                } else if (myKeyCode == 96){
                    ORBEON.xforms.Document.setValue(pregunta, myKeyCode -
38);
                } else if ((myKeyCode &gt; 96) &amp; (myKeyCode &lt;= 105)){
                    ORBEON.xforms.Document.setValue(pregunta, myKeyCode -
96);
                }
          myEvent.target.id.focus();
        myEvent.target.id.style.font-size=20px;
            }
            document.onkeyup = keyReleased;
        </xhtml:script>
And save the number hits, select the option button with this number and we
wants that the label of the option button selected change its style and set
focus, but both atempts fail.

-----Mensaje original-----
De: [hidden email] [mailto:[hidden email]] En nombre de Alessandro
Vernet
Enviado el: jueves, 17 de enero de 2008 21:11
Para: [hidden email]
Asunto: Re: [ops-users] change style by javascript

On Jan 15, 2008 8:56 AM, infodima <[hidden email]> wrote:
>
> I want change the object's style (font-size, color) with
> javascript(id.style.color.for example), and no work, it's possible that it
> was the same bug that focus' bug?

I assume you want to change the style of an XForms control in
JavaScript; is that right? What is the JavaScript code you are using
to change the "object's style"?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: change style by javascript

Alessandro Vernet
Administrator
Agustin,

On Jan 18, 2008 3:35 AM, Agustin (infodima) <[hidden email]> wrote:
> [...]
> And save the number hits, select the option button with this number and we
> wants that the label of the option button selected change its style and set
> focus, but both atempts fail.

I don't see anything wrong with the code you just pasted. Could you
submit a full example that runs in the XForms sandbox and that shows
the problem? (You can read more about submitting example that run in
the XForms sandbox at:
http://www.orbeon.com/ops/doc/home-faq#reporting-issues)

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws