Is the line bellow suppose to work for a javascript placed
in <a href="http://machine.domain:port/orbeon/apps/neuro/config/tema/javascript/eventos_teclado.js">http://machine.domain:port/orbeon/apps/neuro/config/tema/javascript/eventos_teclado.js ??? <xhtml:script type="text/javascript" src="oxf:/apps/neuro/config/tema/javascript/eventos_teclado.js"/> The javascript code embedded in a xhtml page works, but referenced with a line like the one above does not. For reference here you are the js code referred: //Registramos un escuchador para el ordered list que tiene las preguntas var ids = ["ol_escala", "dlg_criterio_puntuacion"]; YAHOO.util.Event.addListener(ids, "keypress", teclaPulsadaEnEscala); function teclaPulsadaEnEscala(e){ var keycode; if (window.event) keycode = e.keyCode; else if (e) keycode = e.which; switch(true) { case keycode==45: ORBEON.xforms.Document.dispatchEvent("modelo_principal", "tecla-resta"); break; case keycode==43: ORBEON.xforms.Document.dispatchEvent("modelo_principal", "tecla-suma"); break; case keycode > 47 && 58 > keycode: ORBEON.xforms.Document.setValue('dummy', keycode - 48); ORBEON.xforms.Document.dispatchEvent("modelo_principal", "tecla-numero"); break; } } Thx a lot rich -- 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 |
Administrator
|
This won't work: the link is sent to your browser, which has no idea
what oxf:/ protocols mean. -Erik On Jan 31, 2009, at 10:58 PM, [hidden email] wrote: > Is the line bellow suppose to work for a javascript placed > in > <a href="http://machine.domain:port/orbeon/apps/neuro/config/tema/javascript/">http://machine.domain:port/orbeon/apps/neuro/config/tema/javascript/ > eventos_teclado.js > ??? > > <xhtml:script type="text/javascript" > src="oxf:/apps/neuro/config/tema/javascript/eventos_teclado.js"/> > > The javascript code embedded in a xhtml page works, but > referenced with a line like the one above does not. For > reference here you are the js code referred: > > //Registramos un escuchador para el ordered list que tiene > las preguntas > var ids = ["ol_escala", "dlg_criterio_puntuacion"]; > YAHOO.util.Event.addListener(ids, "keypress", > teclaPulsadaEnEscala); > > function teclaPulsadaEnEscala(e){ > var keycode; > if (window.event) keycode = e.keyCode; > else if (e) keycode = e.which; > switch(true) > { > case keycode==45: > > ORBEON.xforms.Document.dispatchEvent("modelo_principal", > "tecla-resta"); > break; > case keycode==43: > > ORBEON.xforms.Document.dispatchEvent("modelo_principal", > "tecla-suma"); > break; > case keycode > 47 && 58 > > keycode: > > ORBEON.xforms.Document.setValue('dummy', keycode - 48); > > ORBEON.xforms.Document.dispatchEvent("modelo_principal", > "tecla-numero"); > break; > } > } > > Thx a lot > > rich > > -- > 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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way 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 |
Free forum by Nabble | Edit this page |