This topic is locked

IE error when hiding fields on the search event

11/1/2009 4:26:33 PM
PHPRunner General questions
D
Dale author

Im hoping there may be something that can be done about this.
I have been using the before Search displayed event to hide some fields if the user is not an admin user.
using xt->assign works just fine in hiding the fields.

BUT

when I use IE8, opening the search page I get an error for each field I have hidden.

IE is barking at the point that when your functions kick in to hide or show the search fields, it barks because the javascript you use cannot find the hidden fields. Of course they are hidden.
I tracked down the code and it looks the phprunners show/hide function are not testing to see if the element is there.

Firefox and opera are fine. IE &*$&#( has the issue.
I hope I have explained this, but the issue can be duplicated very easily.
On the Search Page events, Before display, use

$xt ->assign("field_fieldblock",$_SESSION["GroupID"]=="Admin");
Build, login in IE as Admin and, open the Advanced Search page for appropriate record, no problem.

Login in IE as anything else and you will see IE start to bark at the hiding field.
Im thinking I will have to custom modify the phprunner ShowHide function to test for the field first.

Or maybe there is a better way that I can do this in the events section.

Here's hoping.

J
Jane 11/2/2009

Dale,
thank you for pointing me to this issue.

We'll fix it in the next version.
You can hide/show fields using CSS in current version.

http://www.w3schools.com/css/pr_class_display.asp