This topic is locked

Mysterious Out of alignment problem for some IE browsers

11/9/2011 6:59:37 AM
PHPRunner General questions
A
acpan author

Hi,
This problem happens to some IE (both ver 7 and 8) users but ok for Firefox and Crome users using sites generated by phpr 6.

Sites generated by php 5.3 are not affected.
This out of alignment problem happens in add or edit form with some I.E. users using both ver 7 and 8.
Problem:
Whenever there is echo of text of "certain length" at before process or before SQL event with add or edit form,

the alignment will appear out. Please refer to the pictures attached.
http://bit.ly/uSTecz (Problem when there is echo text)

http://bit.ly/tBK0h1 (No problem when no echoing text)
The lenght of text that causes this is quite random but usually larger text will cause this problem. (memory ??)
But when hosted at the demo account, this problem does not seems to happen.

When using phpr 5.3 to generate having even longer echo text, it will not have this problem.
Is there something i can do at my Apache server running on Windows ?
Many Thanks ...

C
cgphp 11/9/2011

Instead of echo the text directly to the page, try to assign the text to a template var (http://xlinesoft.com/phprunner/docs/smarty_templates.htm) in the "Before display" event.

A
acpan author 11/9/2011



Instead of echo the text directly to the page, try to assign the text to a template var (http://xlinesoft.com/phprunner/docs/smarty_templates.htm) in the "Before display" event.


Hi Christian,
Thanks for your pointer, could you give me a clearer example ? I am not familiar how to do this after reading.
P.S. I had installed the latest version of apache and php bundle still having the same problem.
Thanks again for quick response.
ACP

C
cgphp 11/9/2011

In the Visual editor of edit page, switch to HTML edit and where you want to see the text enter a new template var like:

{$my_demo_text}



In the "Before display" event of edit page enter the following code:

$text = "This is a demo text,This is a demo text,This is a demo text,This is a demo text,This is a demo text,This is a demo text,This is a demo text,This is a demo text";
$xt->assign("my_demo_text",$text);
A
acpan author 11/9/2011

Thanks Christian,
I tried that, it does not work. After clicking 5 or 6 times, it will show misalignment.

Is there something we can trace and see why it does not happen to php 5.3 ?

Rgds

acp

C
cgphp 11/9/2011

Where do you add the text (div, td, span) ? Do you get some info from firebug ? Could you post a demo link ?

A
acpan author 11/9/2011



Where do you add the text (div, td, span) ? Do you get some info from firebug ? Could you post a demo link ?


Hi,
I just echo it before process event of the add form.

echo "This is a test ............. ";
I notice runner_all.js is one file for phpr6 where in phpr 5.3, it seemed to be splitted into 3 files.

But it seems runner_all.js is very large file and may be it is not able to be fullly loaded by

some notebook running IE ?
So far i have kept phpr 5.3 version for those who can't use phpr ver 6 due to this problem

but new development will be focus on phpr v6. So it's important to find out what cause this.

At first i though it happen only to my notebook which may be blocking something in IE settings,

then some users now randomly reported the same.
I have posted to demo account at: http://bit.ly/swL82h

but it worked on the demo account so i think won't be useful.
How can i verify if runner_all.js contribute to the behavior ? Any log you want me to retrieve and also the steps?
Many Thanks ...

C
cgphp 11/9/2011

It's not a good practice echoing something before the HTML tag. Did you try to add the above template var in the body of the html page ?

A
acpan author 11/9/2011



It's not a good practice echoing something before the HTML tag. Did you try to add the above template var in the body of the html page ?


Thanks for your pointer. Here's the update for adding template var:

  1. Previously, at visual editor, i added on the first line, before the header tag. So i get the same problem.
  2. After seeing your post asking where i put the template var, i tried after the header tag and html open tag, it looks ok.
    i will do more test and feedback further.
    acp

A
acpan author 11/9/2011

Hi,
I managed to convert all the echo of text instructions to template variable and it fixed the problem.
However, there is one issue. For the Import event there is no where to do the same, no before display

event, thus not able to assign template variable.
The echo is necessary to print out what are the error of the data for each line during import.
Eg. in the excel file, if the phone number is shorter than 6 digits, during import, echo the number on screen with

an error message which is very useful for the users.
This worked fine in phpr 5.3, but due to the issue mentioned above, echo the error will cause the import form to misaligned.
Without before display event for import form, is there any other way to echo out text without cause the same problem ?
Many Thanks!

acp

Sergey Kornilov admin 11/9/2011

Good point, we have to add BeforeDisplay event to import page as well.
Right now yo have to sacrifice the Import page alignment in case of import errors. The good thing it happens in IE only.

A
acpan author 11/9/2011



Good point, we have to add BeforeDisplay event to import page as well.
Right now yo have to sacrifice the Import page alignment in case of import errors. The good thing it happens in IE only.


Hi,
Thanks for your info. Just that some users are not allowed to install firefox and chrome, so it becomes a headache.

Meanwhile, i found a workaround:
Store all the customer message to a session variable $_SESSION["import_log"];
Edit the XXX_import.php file and append the customer import messages to the system $error_message .= $_SESSION["import_log"];
ACP