I have several old desktop applications using xDialog that I am updating to incorporate Bootstrap 5.3 as a replacement to the standard xDialog user interface. So far the aesthetics and performance using Bootstrap are amazing. Unfortunately, tying the UI and custom javascript functions back to the older dialog buttons and functions has been a challenge. Enough so that I am questioning whether or not the cp helper functions really work in a more complex HTML environment. Specifically the cp.ExecuteJavascriptResult(jstorun) function. I have spent approx 20 hours trying to debug the possible source of my conflict with this function to no avail. My questions for the community and everything I have done to troubleshoot are listed below.
Specific problem (one of many):
Questions for the Community:
Specific problem (one of many):
Code:
jstorun = "document.getElementById('myCheckboxId').checked;" resultA = cp.ExecuteJavascriptResult(jstorun) '===> hangs then fails in my app. Works in test environment jstorun = "document.getElementById(myCheckboxId').hasAttribute('checked');" resultB = cp.ExecuteJavascriptResult(jstorun) '===> hangs then fails in my app. Works in test environment 'Alt Code resultA = cp.GetAttribute('myCheckboxId', "checked") '===> hangs then fails in my app. Fails in test environment so anyone can reproduce resultB = cp.HasAttribute('myCheckboxId', "checked") '===> hangs then fails in my app. Fails in test environment so anyone can reproduce
- Has anyone used the Chrome Control within an xDialog within the last 2 years to build an application? If so, did you run into any problems using the cp.ExecuteJavascriptResult(jstorun) function or anything else using the cp pointer? I am interested in any insight or knowledge gained from your issues.
- From a logic standpoint, is there anything else that I should try to identify the issue? I listed the primary methods performed below. If I included them all I would have to publish a book.
- Is it even possible for the HTML code itself to cause a problem with the CP functions?
- In a test environment where the function was successful, I included all of the css and javascript files that are in my application. Test environment still successful less all of the HTML from my application.
- In my application, removed all of the css and javascript files but it still did not work.
- Inspected my HTML code using WebStorm application and no issues were found.
- Tried every alt method available under CP to no avail.
- Did not use HTML_Page_Prepare() function so I do not need to worry about any jQuery or Alpha Anywhere javascript conflicts.
- I can not imagine that any of my xBasic code is causing an issue.
Comment