Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unexpected page changes with button click
#1
I am currently using Delphi 10.1 Berlin with IntraWeb 14.2.3...

I am trying to "update" an ancient application (written in IntraWeb 4) and have hit a problem. 

When the page with tabs initially renders, it looks perfect.  If a button is pressed (or something that actually causes the page to post), then the "tab section" of the page becomes "garbled".  Looking at the HTML/CSS source BEFORE and AFTER the button click shows portions of the CSS missing (such as width information).

Is there something I can do (besides upgrade, which is not an option) to resolve this?

Thanx,
Chuck
Reply
#2
14.2.3 ?

At first I don't see anything related to this specific version that could cause this. Is there any reason to be forced to use this specific build?

Also, you could possibly try to use the OnAsyncClick event of the button instead of the OnClick, maybe (on this version it really depends of what you are doing)...
Reply
#3
Hi.  Me again....

I tried compiling my code with IntraWeb 15.2.27 (Delphi 10.1 Berlin).....still same issue.

This time, I'm attaching screenshots so you can see what I'm talking about.  But one more thing I should mention (that I forgot to mention earlier), the tabs are built dynamically.  The attachments are 1) the actual screen in the IDE (ide.png); 2) screenshot of how the page (tab) looks after rendering (validRender.png); and 3) screenshot of how the page (tab) looks after button press (badRender.png).

Any ideas why the page loses info when posting?

Thanx,
Chuck


Attached Files Thumbnail(s)
           
Reply
#4
How are these components (labels, edits, etc) positioned in the page? Are they also created dynamically?

Ancient versions of IW used to render using Quirks mode which doesn't exist anymore. If you have any specific CSS used for these controls it probably takes Quirks mode into account and it should be adjusted. Other than that I'd need an working example or access to the real app to tell you more about the possible causes.
Reply
#5
(07-16-2022, 02:07 AM)Alexandre Machado Wrote: How are these components (labels, edits, etc) positioned in the page? Are they also created dynamically?

Ancient versions of IW used to render using Quirks mode which doesn't exist anymore. If you have any specific CSS used for these controls it probably takes Quirks mode into account and it should be adjusted. Other than that I'd need an working example or access to the real app to tell you more about the possible causes.

Yes sir, everything is created dynamically.  The screen components are read from a database (component type, position, size, color, etc.) and dynamically created and added to the dynamically created tab.  Weird thing is the upper portion of the screen (above the tabs) is created dynamically the same way and it's fine.  Only the tabs are affected with this "mangling" problem.

This is the first I'm hearing of this Quirks mode.  Can you elaborate a little on it, please?

By the way, I removed the CSS from the form, rebuilt and the problem persists.  The CSS that is created by IntraWeb during rendering is the only CSS on the page...and it is altered when posting.  Is there some memory trick I'm missing?

Thanx for your time.
Chuck
Reply
#6
Quirks mode... hum... Quirks is sooooo painful that it's better to leave it in the past (at least for now). But basically, if your page doesn't start with the proper HTML 5 tag (<!DOCTYPE html>) it will consider the document to be an HTML 4 and will compute the sizes and coordinates of controls differently. This rendering "mode" is called Quirks.

Is it possible for you to temporarily grant me access to this application (it can be a test environment, or even running in your dev machine)??
I'd just need to understand how the response is messing with the layout. If so, feel free to send me the details via e-mail (alexandre at atozed dot com)
Reply
#7
(07-21-2022, 05:30 AM)Alexandre Machado Wrote: Quirks mode... hum... Quirks is sooooo painful that it's better to leave it in the past (at least for now). But basically, if your page doesn't start with the proper HTML 5 tag (<!DOCTYPE html>) it will consider the document to be an HTML 4 and will compute the sizes and coordinates of controls differently. This rendering "mode" is called Quirks.

Is it possible for you to temporarily grant me access to this application (it can be a test environment, or even running in your dev machine)??
I'd just need to understand how the response is messing with the layout. If so, feel free to send me the details via e-mail (alexandre at atozed dot com)

I sent an email...but it's probably encrypted (my company encrypts all out-going mail).

I'm in the US Eastern time zone...I understand you're in New Zealand, so if you specify when you'd like to meet (NZ time), I'll try to get a Teams session set up for then.
Reply
#8
We last spoke on July 29...

Was wondering if you'd had a chance to really look into this anomaly, any, since then? If not, are you able to provide some timeline for when you are able look into it? Really looking for some kind of status -- any status will do :-) -- as my management keeps asking for an update.

Thanx!!
Reply
#9
>>By the way, I removed the CSS from the form, rebuilt and the problem persists.  The CSS that is created by IntraWeb during 
>>rendering is the only CSS on the page...and it is altered when posting.  Is there some memory trick I'm missing?

As a workaround (or solution) you could create an html template for the offending page instead of using IW's built-in rendering/css.  Templates can be created and applied dynamically just like you are doing with the components so no big change in logic.  I've used IW since version 6 and found the built-in rendering can be quirky at times whereas templates always display as intended.

Regards,
Mark
Reply
#10
Hi Chuck, please check your email.

Cheers
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)