Hello---
I've got a simple OPS/MySQL webapp and I'm tying to integrate TinyMCE WYSIWYG HTML editor into the mix. I've seen discussion on this list indicating that it can be done. Unfortunately, I haven't got the option of deploying 3.5M with built-in TinyMCE. I'm finding no problems instantiating TinyMCE editors on my <textarea/ > elements. The problems arrive towards submission. Even after calling tinyMCE.triggerSave() (the JavaScript function that loads data from the TinyMCE editors into their corresponding form elements) I'm getting results in the HTML <textarea/> elements but not in the XForms instance, and thus nothing in those elements on submission. I've tried using ORBEON.xforms.Document.setValue() to try to load data directly from the TinyMCE editors into the XForms elements, with no luck. Is there anyone out there who has done this successfully? Is there some obvious (or not so obvious) pitfall I'm missing? Thanks! --- A. Soroka -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
> I've got a simple OPS/MySQL webapp and I'm tying to integrate
> TinyMCE WYSIWYG HTML editor into the mix. I've seen discussion on > this list indicating that it can be done. Unfortunately, I haven't > got the option of deploying 3.5M with built-in TinyMCE. > > I'm finding no problems instantiating TinyMCE editors on my > <textarea/> elements. The problems arrive towards submission. Even > after calling tinyMCE.triggerSave() (the JavaScript function that > loads data from the TinyMCE editors into their corresponding form > elements) I'm getting results in the HTML <textarea/> elements but > not in the XForms instance, and thus nothing in those elements on > submission. I've tried using ORBEON.xforms.Document.setValue() to > try to load data directly from the TinyMCE editors into the XForms > elements, with no luck. > > Is there anyone out there who has done this successfully? Is there > some obvious (or not so obvious) pitfall I'm missing? We cannot tell you what the issue is without a (potentially fairly long) investigation. In the meanwhile, the source code in xforms.js and a JavaScript debugger are probably your friends! We currently use FCKeditor for the same purpose. You can enable it with xforms:textarea/@mediatype="text/html". Are you saying that the built-in FCKeditor is not acceptable to you? Can you maybe look at thow the integration of the FCKeditor is done and try to do something simiar with TinyMCE? We would be interested in knowing whether anybody has compared TinyMCE with FCKeditor. Is TinyMCE better? In which case, it would make sense to use that instead of FCKeditor, which frankly is quite bulky. -Erik -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by ajs6f@virginia.edu
I forgot to add that xforms.js has changed drastically between 3.0 and
3.5 M1, and we strongly advise that you look at 3.5 M1 (or even the latest CVS) rather than 3.0 (as the subject of your email suggests). -Erik [hidden email] wrote: > Hello--- > > I've got a simple OPS/MySQL webapp and I'm tying to integrate TinyMCE > WYSIWYG HTML editor into the mix. I've seen discussion on this list > indicating that it can be done. Unfortunately, I haven't got the option > of deploying 3.5M with built-in TinyMCE. > > I'm finding no problems instantiating TinyMCE editors on my <textarea/> > elements. The problems arrive towards submission. Even after calling > tinyMCE.triggerSave() (the JavaScript function that loads data from the > TinyMCE editors into their corresponding form elements) I'm getting > results in the HTML <textarea/> elements but not in the XForms instance, > and thus nothing in those elements on submission. I've tried using > ORBEON.xforms.Document.setValue() to try to load data directly from the > TinyMCE editors into the XForms elements, with no luck. > > Is there anyone out there who has done this successfully? Is there some > obvious (or not so obvious) pitfall I'm missing? > > Thanks! > > --- > A. Soroka Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Yes, I understand that, and given my "druthers" I certainly would.
But 3.5 M1 is labeled "beta", and that's enough to convince systems folks around here (the University of Virginia Library system) that we can't deploy it. --- A. Soroka On Oct 17, 2006, at 8:20 AM, Erik Bruchez wrote: > I forgot to add that xforms.js has changed drastically between 3.0 > and 3.5 M1, and we strongly advise that you look at 3.5 M1 (or even > the latest CVS) rather than 3.0 (as the subject of your email > suggests). > > -Erik > > [hidden email] wrote: >> Hello--- >> I've got a simple OPS/MySQL webapp and I'm tying to integrate >> TinyMCE WYSIWYG HTML editor into the mix. I've seen discussion on >> this list indicating that it can be done. Unfortunately, I haven't >> got the option of deploying 3.5M with built-in TinyMCE. >> I'm finding no problems instantiating TinyMCE editors on my >> <textarea/> elements. The problems arrive towards submission. Even >> after calling tinyMCE.triggerSave() (the JavaScript function that >> loads data from the TinyMCE editors into their corresponding form >> elements) I'm getting results in the HTML <textarea/> elements but >> not in the XForms instance, and thus nothing in those elements on >> submission. I've tried using ORBEON.xforms.Document.setValue() to >> try to load data directly from the TinyMCE editors into the XForms >> elements, with no luck. >> Is there anyone out there who has done this successfully? Is there >> some obvious (or not so obvious) pitfall I'm missing? >> Thanks! >> --- >> A. Soroka > > -- > Orbeon - XForms Everywhere: > http://www.orbeon.com/blog/ > > > -- > You receive this message as a subscriber of the ops- > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/ > wws -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Erik Bruchez
> We cannot tell you what the issue is without a (potentially fairly
> long) investigation. In the meanwhile, the source code in xforms.js > and a JavaScript debugger are probably your friends! I understand-- thanks for the pointer to 'xforms.js'. > We currently use FCKeditor for the same purpose. You can enable it > with xforms:textarea/@mediatype="text/html". Are you saying that the > built-in FCKeditor is not acceptable to you? Can you maybe look at > thow the integration of the FCKeditor is done and try to do something > simiar with TinyMCE? My understanding was that this occurred for 3.5 M1, not 3.0. I have no choice about what I develop for-- 3.0 is it. --- A. Soroka On Oct 17, 2006, at 8:19 AM, Erik Bruchez wrote: > > I've got a simple OPS/MySQL webapp and I'm tying to integrate > > TinyMCE WYSIWYG HTML editor into the mix. I've seen discussion on > > this list indicating that it can be done. Unfortunately, I haven't > > got the option of deploying 3.5M with built-in TinyMCE. > > > > I'm finding no problems instantiating TinyMCE editors on my > > <textarea/> elements. The problems arrive towards submission. Even > > after calling tinyMCE.triggerSave() (the JavaScript function that > > loads data from the TinyMCE editors into their corresponding form > > elements) I'm getting results in the HTML <textarea/> elements but > > not in the XForms instance, and thus nothing in those elements on > > submission. I've tried using ORBEON.xforms.Document.setValue() to > > try to load data directly from the TinyMCE editors into the XForms > > elements, with no luck. > > > > Is there anyone out there who has done this successfully? Is there > > some obvious (or not so obvious) pitfall I'm missing? > > We cannot tell you what the issue is without a (potentially fairly > long) investigation. In the meanwhile, the source code in xforms.js > and a JavaScript debugger are probably your friends! > > We currently use FCKeditor for the same purpose. You can enable it > with xforms:textarea/@mediatype="text/html". Are you saying that the > built-in FCKeditor is not acceptable to you? Can you maybe look at > thow the integration of the FCKeditor is done and try to do something > simiar with TinyMCE? > > We would be interested in knowing whether anybody has compared TinyMCE > with FCKeditor. Is TinyMCE better? In which case, it would make sense > to use that instead of FCKeditor, which frankly is quite bulky. > > -Erik > > -- > Orbeon - XForms Everywhere: > http://www.orbeon.com/blog/ > > > > -- > You receive this message as a subscriber of the ops- > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/ > wws -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
ajs6f wrote:
>> We cannot tell you what the issue is without a (potentially fairly >> long) investigation. In the meanwhile, the source code in xforms.js >> and a JavaScript debugger are probably your friends! > > I understand-- thanks for the pointer to 'xforms.js'. > >> We currently use FCKeditor for the same purpose. You can enable it >> with xforms:textarea/@mediatype="text/html". Are you saying that the >> built-in FCKeditor is not acceptable to you? Can you maybe look at >> thow the integration of the FCKeditor is done and try to do something >> simiar with TinyMCE? > > My understanding was that this occurred for 3.5 M1, not 3.0. Correct. > I have no choice about what I develop for-- 3.0 is it. Wouldn't this depend on when you plan to deploy? I.e. if you deployed after 3.5 final was out, would that make any difference? -Erik -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Actually, you've solved that problem in a most unexpected way:
After I went to our systems folks and pointed out that "the Orbeon people" themselves recommend moving the 3.5, they were willing to make the change, and let me say that the FCKEditor integration looks great and runs superbly. So that problem is solved! <grin> Thank you -very- much for your advice; now I've got a new problem that I haven't found examined in the maillist archives. It's quite straightforward: Our application relies on some communication between the XForm (in Orbeon) and a GIS-related CGI system that is opened into a child window with an <xforms:load/>. With OPS 3.0, I was able to use: opener.document.getElementById('idofelement').value = newvaluetakenfromCGI ; to alter values in the parent (OPS/XForms) document. For 3.5, I understand that I need to use: opener.ORBEON.xforms.Document.setValue("idofelement", newvalue) ; The elements are all plain <xforms:input/>s and the values are simple strings. Unfortunately, when this executes, the form displays (permanently) the red "Loading..." insignia at the top and stops responding to input. Am I missing something here? No errors are thrown... there's no cross- domain issues or anything like that. Is there some new method that needs to be applied to change element values from outside the form? Thanks very much again for your help with this project! --- A. Soroka On Oct 17, 2006, at 10:51 AM, Erik Bruchez wrote: > ajs6f wrote: > >> We cannot tell you what the issue is without a (potentially fairly > >> long) investigation. In the meanwhile, the source code in xforms.js > >> and a JavaScript debugger are probably your friends! > > > > I understand-- thanks for the pointer to 'xforms.js'. > > > >> We currently use FCKeditor for the same purpose. You can enable it > >> with xforms:textarea/@mediatype="text/html". Are you saying that > the > >> built-in FCKeditor is not acceptable to you? Can you maybe look at > >> thow the integration of the FCKeditor is done and try to do > something > >> simiar with TinyMCE? > > > > My understanding was that this occurred for 3.5 M1, not 3.0. > > Correct. > > > I have no choice about what I develop for-- 3.0 is it. > > Wouldn't this depend on when you plan to deploy? I.e. if you deployed > after 3.5 final was out, would that make any difference? > > -Erik > > -- > Orbeon - XForms Everywhere: > http://www.orbeon.com/blog/ > > > > -- > You receive this message as a subscriber of the ops- > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/ > wws -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
On 10/17/06, ajs6f <[hidden email]> wrote:
> Am I missing something here? No errors are thrown... there's no cross- > domain issues or anything like that. Is there some new method that > needs to be applied to change element values from outside the form? Are you sure there are no JavaScript errors? Do you get the same result on both Firefox and IE? On Firefox, you might want to show the JavaScript console (menu Tools / JavaScript console). Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In fact, I have been checking the JavaScript console, and that's why
I'm sure about the lack of errors. It's really the -lack- of errors that puzzles me. <grin> --- A. Soroka On Oct 17, 2006, at 6:59 PM, Alessandro Vernet wrote: > On 10/17/06, ajs6f <[hidden email]> wrote: >> Am I missing something here? No errors are thrown... there's no >> cross- >> domain issues or anything like that. Is there some new method that >> needs to be applied to change element values from outside the form? > > Are you sure there are no JavaScript errors? Do you get the same > result on both Firefox and IE? On Firefox, you might want to show the > JavaScript console (menu Tools / JavaScript console). > > Alex > -- > Blog (XML, Web apps, Open Source): > http://www.orbeon.com/blog/ > > > -- > You receive this message as a subscriber of the ops- > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/ > wws -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Alessandro Vernet
Let me update my previous reply: I was finally able to get a
JavaScript error report-- from Opera browser. Unexpectedly, it's returning an error from 'xforms.js'. Below I quote the report. orion.lib.virginia.edu is, of course, the server running OPS. 'geochange.html' is the child page that executes script to change values in the parent page (which contains the XForm). I've included the script in question below the error report. I hope this clarifies matters... JavaScript - http://orion.lib.virginia.edu:8080/ops/shd/detail/geo/ geochange.html?state=Pennsylvania&year=1820&county=POTTER&fips=42105 Inline script thread Error: name: TypeError message: Statement on line 362: Could not convert undefined or null to object Backtrace: Line 362 of linked script http://orion.lib.virginia.edu:8080/ops/ ops/javascript/xforms.js if (typeof control.form == "undefined") else Line 1421 of linked script http://orion.lib.virginia.edu:8080/ ops/ops/javascript/xforms.js ORBEON.xforms.Globals.requestForm = ORBEON.xforms.Controls.getForm(ORBEON.xforms.Globals.eventQueue [0].form); Line 1379 of linked script http://orion.lib.virginia.edu:8080/ops/ ops/javascript/xforms.js ORBEON.xforms.Server.executeNextRequest(true); Line 1829 of linked script http://orion.lib.virginia.edu:8080/ops/ ops/javascript/xforms.js ORBEON.xforms.Server.fireEvents(newEvents, incremental); Line 349 of linked script http://orion.lib.virginia.edu:8080/ops/ ops/javascript/xforms.js xformsFireEvents(new Array(xformsCreateEventArray(control, "xxforms-value-change-with-focus-change", String(newValue), null)), false); Line 15 of inline#1 script in http://orion.lib.virginia.edu:8080/ ops/shd/detail/geo/geochange.html? state=Pennsylvania&year=1820&county=POTTER&fips=42105 opener.ORBEON.xforms.Document.setValue("state", getQ("state")); JavaScript - http://orion.lib.virginia.edu:8080/ops/shd/detail/geo/ geochange.html?state=Pennsylvania&year=1820&county=POTTER&fips=42105 Inline script thread Error: name: TypeError message: Statement on line 362: Could not convert undefined or null to object Backtrace: Line 362 of linked script http://orion.lib.virginia.edu:8080/ops/ ops/javascript/xforms.js if (typeof control.form == "undefined") else Line 1421 of linked script http://orion.lib.virginia.edu:8080/ ops/ops/javascript/xforms.js ORBEON.xforms.Globals.requestForm = ORBEON.xforms.Controls.getForm(ORBEON.xforms.Globals.eventQueue [0].form); Line 1379 of linked script http://orion.lib.virginia.edu:8080/ops/ ops/javascript/xforms.js ORBEON.xforms.Server.executeNextRequest(true); Line 1829 of linked script http://orion.lib.virginia.edu:8080/ops/ ops/javascript/xforms.js ORBEON.xforms.Server.fireEvents(newEvents, incremental); Line 349 of linked script http://orion.lib.virginia.edu:8080/ops/ ops/javascript/xforms.js xformsFireEvents(new Array(xformsCreateEventArray(control, "xxforms-value-change-with-focus-change", String(newValue), null)), false); Line 15 of inline#1 script in http://orion.lib.virginia.edu:8080/ ops/shd/detail/geo/geochange.html? state=Pennsylvania&year=1820&county=POTTER&fips=42105 opener.ORBEON.xforms.Document.setValue("state", getQ("state")); Here's the script in 'geochange.html'. (It's the only thing going on in that file.) state, year, county, and FIPS are all ids of <xforms:inputs/> in the form. The values to which they are to be changed are given to 'geochange.html' as the usual CGI-style query string. <script type="text/javascript"> function getQ(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i<vars.length;i++) { var pair = vars[i].split("="); if (pair[0] == variable) { return pair[1]; } } alert('Query Variable ' + variable + ' not found'); } opener.ORBEON.xforms.Document.setValue("state", getQ('state')) ; opener.ORBEON.xforms.Document.setValue("year", getQ('year')) ; opener.ORBEON.xforms.Document.setValue("county", getQ('county')) ; opener.ORBEON.xforms.Document.setValue("FIPS", getQ('fips')) ; window.close() ; </script> On Oct 17, 2006, at 6:59 PM, Alessandro Vernet wrote: > On 10/17/06, ajs6f <[hidden email]> wrote: >> Am I missing something here? No errors are thrown... there's no >> cross- >> domain issues or anything like that. Is there some new method that >> needs to be applied to change element values from outside the form? > > Are you sure there are no JavaScript errors? Do you get the same > result on both Firefox and IE? On Firefox, you might want to show the > JavaScript console (menu Tools / JavaScript console). > > Alex > -- > Blog (XML, Web apps, Open Source): > http://www.orbeon.com/blog/ > > > -- > You receive this message as a subscriber of the ops- > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/ > wws -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Another update:
By using your tip to Steve Lenhart, I was able to get an error message from Mozilla, and it seems to be the same line in 'xforms.js', though a different error. Error: control has no properties Source File: http://orion.lib.virginia.edu:8080/ops/ops/javascript/ xforms.js Line: 362 By the way, I forgot to include the information that the OPS version in use is: ops-3.5.M1.200608310259, just in case that has any relevance. Thanks very much for any hint you can give! --- A. Soroka On Oct 17, 2006, at 8:36 PM, ajs6f wrote: > Let me update my previous reply: I was finally able to get a > JavaScript error report-- from Opera browser. > > Unexpectedly, it's returning an error from 'xforms.js'. > > Below I quote the report. orion.lib.virginia.edu is, of course, the > server running OPS. 'geochange.html' is the child page that > executes script to change values in the parent page (which contains > the XForm). I've included the script in question below the error > report. > > I hope this clarifies matters... > > JavaScript - http://orion.lib.virginia.edu:8080/ops/shd/detail/geo/ > geochange.html?state=Pennsylvania&year=1820&county=POTTER&fips=42105 > Inline script thread > Error: > name: TypeError > message: Statement on line 362: Could not convert undefined or null > to object > Backtrace: > Line 362 of linked script http://orion.lib.virginia.edu:8080/ops/ > ops/javascript/xforms.js > if (typeof control.form == "undefined") > else > Line 1421 of linked script http://orion.lib.virginia.edu:8080/ > ops/ops/javascript/xforms.js > ORBEON.xforms.Globals.requestForm = > ORBEON.xforms.Controls.getForm(ORBEON.xforms.Globals.eventQueue > [0].form); > Line 1379 of linked script http://orion.lib.virginia.edu:8080/ops/ > ops/javascript/xforms.js > ORBEON.xforms.Server.executeNextRequest(true); > Line 1829 of linked script http://orion.lib.virginia.edu:8080/ops/ > ops/javascript/xforms.js > ORBEON.xforms.Server.fireEvents(newEvents, incremental); > Line 349 of linked script http://orion.lib.virginia.edu:8080/ops/ > ops/javascript/xforms.js > xformsFireEvents(new Array(xformsCreateEventArray(control, > "xxforms-value-change-with-focus-change", String(newValue), null)), > false); > Line 15 of inline#1 script in http://orion.lib.virginia.edu:8080/ > ops/shd/detail/geo/geochange.html? > state=Pennsylvania&year=1820&county=POTTER&fips=42105 > opener.ORBEON.xforms.Document.setValue("state", getQ("state")); > JavaScript - http://orion.lib.virginia.edu:8080/ops/shd/detail/geo/ > geochange.html?state=Pennsylvania&year=1820&county=POTTER&fips=42105 > Inline script thread > Error: > name: TypeError > message: Statement on line 362: Could not convert undefined or null > to object > Backtrace: > Line 362 of linked script http://orion.lib.virginia.edu:8080/ops/ > ops/javascript/xforms.js > if (typeof control.form == "undefined") > else > Line 1421 of linked script http://orion.lib.virginia.edu:8080/ > ops/ops/javascript/xforms.js > ORBEON.xforms.Globals.requestForm = > ORBEON.xforms.Controls.getForm(ORBEON.xforms.Globals.eventQueue > [0].form); > Line 1379 of linked script http://orion.lib.virginia.edu:8080/ops/ > ops/javascript/xforms.js > ORBEON.xforms.Server.executeNextRequest(true); > Line 1829 of linked script http://orion.lib.virginia.edu:8080/ops/ > ops/javascript/xforms.js > ORBEON.xforms.Server.fireEvents(newEvents, incremental); > Line 349 of linked script http://orion.lib.virginia.edu:8080/ops/ > ops/javascript/xforms.js > xformsFireEvents(new Array(xformsCreateEventArray(control, > "xxforms-value-change-with-focus-change", String(newValue), null)), > false); > Line 15 of inline#1 script in http://orion.lib.virginia.edu:8080/ > ops/shd/detail/geo/geochange.html? > state=Pennsylvania&year=1820&county=POTTER&fips=42105 > opener.ORBEON.xforms.Document.setValue("state", getQ("state")); > > > Here's the script in 'geochange.html'. (It's the only thing going > on in that file.) state, year, county, and FIPS are all ids of > <xforms:inputs/> in the form. The values to which they are to be > changed are given to 'geochange.html' as the usual CGI-style query > string. > > <script type="text/javascript"> > function getQ(variable) { > var query = window.location.search.substring(1); > var vars = query.split("&"); > for (var i=0;i<vars.length;i++) { > var pair = vars[i].split("="); > if (pair[0] == variable) { > return pair[1]; > } > } > alert('Query Variable ' + variable + ' not found'); > } > > > opener.ORBEON.xforms.Document.setValue("state", getQ('state')) ; > opener.ORBEON.xforms.Document.setValue("year", getQ('year')) ; > opener.ORBEON.xforms.Document.setValue("county", getQ('county')) ; > opener.ORBEON.xforms.Document.setValue("FIPS", getQ('fips')) ; > > window.close() ; > </script> > > > > > On Oct 17, 2006, at 6:59 PM, Alessandro Vernet wrote: > >> On 10/17/06, ajs6f <[hidden email]> wrote: >>> Am I missing something here? No errors are thrown... there's no >>> cross- >>> domain issues or anything like that. Is there some new method that >>> needs to be applied to change element values from outside the form? >> >> Are you sure there are no JavaScript errors? Do you get the same >> result on both Firefox and IE? On Firefox, you might want to show the >> JavaScript console (menu Tools / JavaScript console). >> >> Alex >> -- >> Blog (XML, Web apps, Open Source): >> http://www.orbeon.com/blog/ >> >> >> -- >> You receive this message as a subscriber of the ops- >> [hidden email] mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: http:// >> www.objectweb.org/wws > > > > -- > You receive this message as a subscriber of the ops- > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/ > wws -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
I see where the problem is in the code, and why this code is called,
thanks to the Opera stack trace. But I can't completely make sense of the situation. Would you be able to put your code is a stand-alone file that I can run here in the XForms sandbox? Alex On 10/18/06, ajs6f <[hidden email]> wrote: > Another update: > > By using your tip to Steve Lenhart, I was able to get an error > message from Mozilla, and it seems to be the same line in > 'xforms.js', though a different error. > > Error: control has no properties > Source File: http://orion.lib.virginia.edu:8080/ops/ops/javascript/ > xforms.js > Line: 362 > > By the way, I forgot to include the information that the OPS version > in use is: ops-3.5.M1.200608310259, just in case that has any relevance. > > Thanks very much for any hint you can give! > > --- > A. Soroka > > > On Oct 17, 2006, at 8:36 PM, ajs6f wrote: > > > Let me update my previous reply: I was finally able to get a > > JavaScript error report-- from Opera browser. > > > > Unexpectedly, it's returning an error from 'xforms.js'. > > > > Below I quote the report. orion.lib.virginia.edu is, of course, the > > server running OPS. 'geochange.html' is the child page that > > executes script to change values in the parent page (which contains > > the XForm). I've included the script in question below the error > > report. > > > > I hope this clarifies matters... > > > > JavaScript - http://orion.lib.virginia.edu:8080/ops/shd/detail/geo/ > > geochange.html?state=Pennsylvania&year=1820&county=POTTER&fips=42105 > > Inline script thread > > Error: > > name: TypeError > > message: Statement on line 362: Could not convert undefined or null > > to object > > Backtrace: > > Line 362 of linked script http://orion.lib.virginia.edu:8080/ops/ > > ops/javascript/xforms.js > > if (typeof control.form == "undefined") > > else > > Line 1421 of linked script http://orion.lib.virginia.edu:8080/ > > ops/ops/javascript/xforms.js > > ORBEON.xforms.Globals.requestForm = > > ORBEON.xforms.Controls.getForm(ORBEON.xforms.Globals.eventQueue > > [0].form); > > Line 1379 of linked script http://orion.lib.virginia.edu:8080/ops/ > > ops/javascript/xforms.js > > ORBEON.xforms.Server.executeNextRequest(true); > > Line 1829 of linked script http://orion.lib.virginia.edu:8080/ops/ > > ops/javascript/xforms.js > > ORBEON.xforms.Server.fireEvents(newEvents, incremental); > > Line 349 of linked script http://orion.lib.virginia.edu:8080/ops/ > > ops/javascript/xforms.js > > xformsFireEvents(new Array(xformsCreateEventArray(control, > > "xxforms-value-change-with-focus-change", String(newValue), null)), > > false); > > Line 15 of inline#1 script in http://orion.lib.virginia.edu:8080/ > > ops/shd/detail/geo/geochange.html? > > state=Pennsylvania&year=1820&county=POTTER&fips=42105 > > opener.ORBEON.xforms.Document.setValue("state", getQ("state")); > > JavaScript - http://orion.lib.virginia.edu:8080/ops/shd/detail/geo/ > > geochange.html?state=Pennsylvania&year=1820&county=POTTER&fips=42105 > > Inline script thread > > Error: > > name: TypeError > > message: Statement on line 362: Could not convert undefined or null > > to object > > Backtrace: > > Line 362 of linked script http://orion.lib.virginia.edu:8080/ops/ > > ops/javascript/xforms.js > > if (typeof control.form == "undefined") > > else > > Line 1421 of linked script http://orion.lib.virginia.edu:8080/ > > ops/ops/javascript/xforms.js > > ORBEON.xforms.Globals.requestForm = > > ORBEON.xforms.Controls.getForm(ORBEON.xforms.Globals.eventQueue > > [0].form); > > Line 1379 of linked script http://orion.lib.virginia.edu:8080/ops/ > > ops/javascript/xforms.js > > ORBEON.xforms.Server.executeNextRequest(true); > > Line 1829 of linked script http://orion.lib.virginia.edu:8080/ops/ > > ops/javascript/xforms.js > > ORBEON.xforms.Server.fireEvents(newEvents, incremental); > > Line 349 of linked script http://orion.lib.virginia.edu:8080/ops/ > > ops/javascript/xforms.js > > xformsFireEvents(new Array(xformsCreateEventArray(control, > > "xxforms-value-change-with-focus-change", String(newValue), null)), > > false); > > Line 15 of inline#1 script in http://orion.lib.virginia.edu:8080/ > > ops/shd/detail/geo/geochange.html? > > state=Pennsylvania&year=1820&county=POTTER&fips=42105 > > opener.ORBEON.xforms.Document.setValue("state", getQ("state")); > > > > > > Here's the script in 'geochange.html'. (It's the only thing going > > on in that file.) state, year, county, and FIPS are all ids of > > <xforms:inputs/> in the form. The values to which they are to be > > changed are given to 'geochange.html' as the usual CGI-style query > > string. > > > > <script type="text/javascript"> > > function getQ(variable) { > > var query = window.location.search.substring(1); > > var vars = query.split("&"); > > for (var i=0;i<vars.length;i++) { > > var pair = vars[i].split("="); > > if (pair[0] == variable) { > > return pair[1]; > > } > > } > > alert('Query Variable ' + variable + ' not found'); > > } > > > > > > opener.ORBEON.xforms.Document.setValue("state", getQ('state')) ; > > opener.ORBEON.xforms.Document.setValue("year", getQ('year')) ; > > opener.ORBEON.xforms.Document.setValue("county", getQ('county')) ; > > opener.ORBEON.xforms.Document.setValue("FIPS", getQ('fips')) ; > > > > window.close() ; > > </script> > > > > > > > > > > On Oct 17, 2006, at 6:59 PM, Alessandro Vernet wrote: > > > >> On 10/17/06, ajs6f <[hidden email]> wrote: > >>> Am I missing something here? No errors are thrown... there's no > >>> cross- > >>> domain issues or anything like that. Is there some new method that > >>> needs to be applied to change element values from outside the form? > >> > >> Are you sure there are no JavaScript errors? Do you get the same > >> result on both Firefox and IE? On Firefox, you might want to show the > >> JavaScript console (menu Tools / JavaScript console). > >> > >> Alex > >> -- > >> Blog (XML, Web apps, Open Source): > >> http://www.orbeon.com/blog/ > >> > >> > >> -- > >> You receive this message as a subscriber of the ops- > >> [hidden email] mailing list. > >> To unsubscribe: mailto:[hidden email] > >> For general help: mailto:[hidden email]?subject=help > >> ObjectWeb mailing lists service home page: http:// > >> www.objectweb.org/wws > > > > > > > > -- > > You receive this message as a subscriber of the ops- > > [hidden email] mailing list. > > To unsubscribe: mailto:[hidden email] > > For general help: mailto:[hidden email]?subject=help > > ObjectWeb mailing lists service home page: http://www.objectweb.org/ > > wws > > > > > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Actually, I'm not sure you want to spend anytime with that, because I
can tell you what was happening there: I had mis-id-ed an element and was asking to change the value of an element with id "x' when no such element existed. Hence control.form did not exist and therefore the 'Could not convert undefined or null to object' occurred when the comparison at line 362 was attempted. I'm sorry-- I should have made that clear. The real problem with which I was grappling was exactly the same as that of Steve Lenhart, and the solution was the same as well. I'm using a two-second delay before closing the daughter window to work-around. If I have time I may try to find a way to pass an event back to the daughter window as a more elegant solution. Thanks! --- A. Soroka On Oct 19, 2006, at 1:08 PM, Alessandro Vernet wrote: > I see where the problem is in the code, and why this code is called, > thanks to the Opera stack trace. But I can't completely make sense of > the situation. Would you be able to put your code is a stand-alone > file that I can run here in the XForms sandbox? > > Alex > > On 10/18/06, ajs6f <[hidden email]> wrote: >> Another update: >> >> By using your tip to Steve Lenhart, I was able to get an error >> message from Mozilla, and it seems to be the same line in >> 'xforms.js', though a different error. >> >> Error: control has no properties >> Source File: http://orion.lib.virginia.edu:8080/ops/ops/javascript/ >> xforms.js >> Line: 362 >> >> By the way, I forgot to include the information that the OPS version >> in use is: ops-3.5.M1.200608310259, just in case that has any >> relevance. >> >> Thanks very much for any hint you can give! >> >> --- >> A. Soroka >> >> >> On Oct 17, 2006, at 8:36 PM, ajs6f wrote: >> >> > Let me update my previous reply: I was finally able to get a >> > JavaScript error report-- from Opera browser. >> > >> > Unexpectedly, it's returning an error from 'xforms.js'. >> > >> > Below I quote the report. orion.lib.virginia.edu is, of course, the >> > server running OPS. 'geochange.html' is the child page that >> > executes script to change values in the parent page (which contains >> > the XForm). I've included the script in question below the error >> > report. >> > >> > I hope this clarifies matters... >> > >> > JavaScript - http://orion.lib.virginia.edu:8080/ops/shd/detail/geo/ >> > geochange.html? >> state=Pennsylvania&year=1820&county=POTTER&fips=42105 >> > Inline script thread >> > Error: >> > name: TypeError >> > message: Statement on line 362: Could not convert undefined or null >> > to object >> > Backtrace: >> > Line 362 of linked script http://orion.lib.virginia.edu:8080/ops/ >> > ops/javascript/xforms.js >> > if (typeof control.form == "undefined") >> > else >> > Line 1421 of linked script http://orion.lib.virginia.edu: >> 8080/ >> > ops/ops/javascript/xforms.js >> > ORBEON.xforms.Globals.requestForm = >> > ORBEON.xforms.Controls.getForm(ORBEON.xforms.Globals.eventQueue >> > [0].form); >> > Line 1379 of linked script http://orion.lib.virginia.edu:8080/ >> ops/ >> > ops/javascript/xforms.js >> > ORBEON.xforms.Server.executeNextRequest(true); >> > Line 1829 of linked script http://orion.lib.virginia.edu:8080/ >> ops/ >> > ops/javascript/xforms.js >> > ORBEON.xforms.Server.fireEvents(newEvents, incremental); >> > Line 349 of linked script http://orion.lib.virginia.edu:8080/ops/ >> > ops/javascript/xforms.js >> > xformsFireEvents(new Array(xformsCreateEventArray(control, >> > "xxforms-value-change-with-focus-change", String(newValue), null)), >> > false); >> > Line 15 of inline#1 script in http://orion.lib.virginia.edu:8080/ >> > ops/shd/detail/geo/geochange.html? >> > state=Pennsylvania&year=1820&county=POTTER&fips=42105 >> > opener.ORBEON.xforms.Document.setValue("state", getQ("state")); >> > JavaScript - http://orion.lib.virginia.edu:8080/ops/shd/detail/geo/ >> > geochange.html? >> state=Pennsylvania&year=1820&county=POTTER&fips=42105 >> > Inline script thread >> > Error: >> > name: TypeError >> > message: Statement on line 362: Could not convert undefined or null >> > to object >> > Backtrace: >> > Line 362 of linked script http://orion.lib.virginia.edu:8080/ops/ >> > ops/javascript/xforms.js >> > if (typeof control.form == "undefined") >> > else >> > Line 1421 of linked script http://orion.lib.virginia.edu: >> 8080/ >> > ops/ops/javascript/xforms.js >> > ORBEON.xforms.Globals.requestForm = >> > ORBEON.xforms.Controls.getForm(ORBEON.xforms.Globals.eventQueue >> > [0].form); >> > Line 1379 of linked script http://orion.lib.virginia.edu:8080/ >> ops/ >> > ops/javascript/xforms.js >> > ORBEON.xforms.Server.executeNextRequest(true); >> > Line 1829 of linked script http://orion.lib.virginia.edu:8080/ >> ops/ >> > ops/javascript/xforms.js >> > ORBEON.xforms.Server.fireEvents(newEvents, incremental); >> > Line 349 of linked script http://orion.lib.virginia.edu:8080/ops/ >> > ops/javascript/xforms.js >> > xformsFireEvents(new Array(xformsCreateEventArray(control, >> > "xxforms-value-change-with-focus-change", String(newValue), null)), >> > false); >> > Line 15 of inline#1 script in http://orion.lib.virginia.edu:8080/ >> > ops/shd/detail/geo/geochange.html? >> > state=Pennsylvania&year=1820&county=POTTER&fips=42105 >> > opener.ORBEON.xforms.Document.setValue("state", getQ("state")); >> > >> > >> > Here's the script in 'geochange.html'. (It's the only thing going >> > on in that file.) state, year, county, and FIPS are all ids of >> > <xforms:inputs/> in the form. The values to which they are to be >> > changed are given to 'geochange.html' as the usual CGI-style query >> > string. >> > >> > <script type="text/javascript"> >> > function getQ(variable) { >> > var query = window.location.search.substring(1); >> > var vars = query.split("&"); >> > for (var i=0;i<vars.length;i++) { >> > var pair = vars[i].split("="); >> > if (pair[0] == variable) { >> > return pair[1]; >> > } >> > } >> > alert('Query Variable ' + variable + ' not found'); >> > } >> > >> > >> > opener.ORBEON.xforms.Document.setValue("state", getQ('state')) ; >> > opener.ORBEON.xforms.Document.setValue("year", getQ('year')) ; >> > opener.ORBEON.xforms.Document.setValue("county", getQ('county')) ; >> > opener.ORBEON.xforms.Document.setValue("FIPS", getQ('fips')) ; >> > >> > window.close() ; >> > </script> >> > >> > >> > >> > >> > On Oct 17, 2006, at 6:59 PM, Alessandro Vernet wrote: >> > >> >> On 10/17/06, ajs6f <[hidden email]> wrote: >> >>> Am I missing something here? No errors are thrown... there's no >> >>> cross- >> >>> domain issues or anything like that. Is there some new method >> that >> >>> needs to be applied to change element values from outside the >> form? >> >> >> >> Are you sure there are no JavaScript errors? Do you get the same >> >> result on both Firefox and IE? On Firefox, you might want to >> show the >> >> JavaScript console (menu Tools / JavaScript console). >> >> >> >> Alex >> >> -- >> >> Blog (XML, Web apps, Open Source): >> >> http://www.orbeon.com/blog/ >> >> >> >> >> >> -- >> >> You receive this message as a subscriber of the ops- >> >> [hidden email] mailing list. >> >> To unsubscribe: mailto:[hidden email] >> >> For general help: mailto:[hidden email]?subject=help >> >> ObjectWeb mailing lists service home page: http:// >> >> www.objectweb.org/wws >> > >> > >> > >> > -- >> > You receive this message as a subscriber of the ops- >> > [hidden email] mailing list. >> > To unsubscribe: mailto:[hidden email] >> > For general help: mailto:[hidden email]?subject=help >> > ObjectWeb mailing lists service home page: http:// >> www.objectweb.org/ >> > wws >> >> >> >> >> >> -- >> You receive this message as a subscriber of the ops- >> [hidden email] mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: http:// >> www.objectweb.org/wws >> >> >> > > > -- > Blog (XML, Web apps, Open Source): > http://www.orbeon.com/blog/ > > > -- > You receive this message as a subscriber of the ops- > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/ > wws -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
On 10/19/06, ajs6f <[hidden email]> wrote:
> Actually, I'm not sure you want to spend anytime with that, because I > can tell you what was happening there: > [...] Alright, I won't insist :). Thank for the explanation. Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |