NetTalk Central

Author Topic: More Hide/Unhide Woes  (Read 3691 times)

spot1701

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
More Hide/Unhide Woes
« on: November 16, 2009, 03:03:29 AM »
Nettalk : 4.37
Clarion 6.3.9059

Eg. (1)
NetWebForm
CheckBox (True = 1, False = 0)
TextField. Set the Hide Condition to p_web.GSV('CheckBox') <> 1

So when you run and check the CheckBox, the Text Field will unhide.

This works fine unless you check the box "Allow XHTML" on the TextField. Then when you run and check the CheckBox the TextField does apopear but you get the error:


(unrecognized AjaxReponse type: text/javascript)

---
Eg. (2)
Now change TextField Type from "Text" to "Display"

Again this will work fine unless you check "Allow XHTML" on the TextField properties.

This time when you run and check the CheckBox you don't get an error, the TextField simply does not appear.

Thanks

Bryan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: More Hide/Unhide Woes
« Reply #1 on: November 16, 2009, 11:51:55 PM »
Hi Bryan,

Good news and bad news.

First the good news.
I think the display field is only an issue if the xHtml you are displaying is not, um, xHtml. In other words if it is invalid then the field will not appear.

I was also able to duplicate the error with the hiding/unhiding of the text box, and I've solved it so the error goes away.
I'll release this change as 4.39, and of course it'll be in ver 5.

Now for the bad news. The error might be gone, but there's still a real problem, and one not easily solved. The TinyMCE editor relies on the control to be "initalised", and worse, it expects the initalised control not to disappear. In the case where you hide, and unhide you get combinations of both errors.

One of the things jQuery offers is the ability to "run" JavaScript sent asynchronously to the browser. So that will take care of the first error. TinyMCE will need to be tweaked a bit to take care of the second error. (In the medium term NT5 will also probably change editor away form TinyMCE, although that decision is not final.)

So some relief - but not much I'm afraid. Hiding and unhiding html enabled text fields may only be possible in NT5, and then only after some work under the covers.

Cheers
Bruce



Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: More Hide/Unhide Woes
« Reply #2 on: November 17, 2009, 03:09:40 AM »
I've tweaked TinyMCE, so if the control is hidden the Save & Cancel buttons work.

The issue of initializing the control, when it is "unhidden" remains though.

Bruce