Function rbf_showOrHideField(fieldName, showField) do not wo

Posted by Rollbase User on 25-Apr-2012 03:17

Hello, In the last version, the function rbf_showOrHideField(fieldName, showField) dot not work anymore when showField is equal to true. Found on Internet Explorer 6 and 8 and Google Chrome too. It is possible that on Google Chrome, it was not working before. Thank you for your help. Regards, Matthieu Baudin

All Replies

Posted by Admin on 25-Apr-2012 10:16

Hi Matthieu,



This function was recently updated, I will take a look thanks for letting us know.



Regards,

Matt

Posted by Admin on 25-Apr-2012 11:19

It has no effect for showField=true unless called first with showField=false.



This API has strange visual effects otherwise.

Posted by Admin on 25-Apr-2012 11:30

Hello Pavel,



I agree with you. showField=true has no effect unless called first with showField=false



So if I use the function with showField=false, the field disappears. It is ok.

An then, if I use the function with showField=true, the field do not appear.



In the previous versions, it worked well. We did not get this problem.

Now, it does not work anymore.



We use this functionnality a lot on many screens. We can not make any business presentations anymore. If you could fix this issue as soon as possible, that would be great !



Thank you for you help.

Posted by Admin on 25-Apr-2012 11:51

OK, I'll try to run updates tonight.

Posted by Admin on 27-Apr-2012 20:15

This issue has been addressed in this week's update (April 27th, 2012)

Posted by Admin on 30-Apr-2012 01:32

Hello,



On my ISV Partner account, it is now written : Version 3.6 Release Date 27/04/2012.

But I still get the issue as before.

Nothing has changed.

I'm on Internet Explorer 8.



Thank you.



Posted by Admin on 30-Apr-2012 12:57

Try refresh your browser's cache.

Posted by Admin on 30-Apr-2012 16:42

Hello Pavel,



The issue is still here.

The issue is easy to reproduce. I have made tests on internet Explorer 6, 8, Firefox 3 and Google chrome 18.



I am afraid we are now in a hurry. Our applications can not be used anymore !

Thank you for your quickly help.



Matthieu

Posted by Admin on 30-Apr-2012 17:05

I can try to restore old version of this API in next release.



But this API is deprecated and we do not recommend using it. HTML structure prevents fields from being easily shown/hidden.

Posted by Admin on 30-Apr-2012 21:49

Hi,



While you are waiting for the rollback, you may use this for the meantime.

This is my custom showorhide which we use and tested on ie chrome and ff



var d=document;

function c__showHide(field,flag) {

//M.PISCOSO - Custom Show Hide (overrides field show hide)

//Created - 02-11-2011



var mode, label;

if (String(navigator.appVersion).indexOf('MSIE 7.0') == -1) { mode = 'table-cell'; } else { mode = 'block'; }



try {

field = new String(field); label = "rbi_L_" + field; field = "rbi_F_" + field;

if (flag == true) {

d.getElementById(field).style.display = mode;

d.getElementById(label).style.display= mode;

} else {

d.getElementById(field).style.display = "none";

d.getElementById(label).style.display= "none";

}

} catch(e) { throw e.message + " " + field; }

}



Same usage with the standard, just change function name to c__showHide.



Hope this helps.

Piscoso, Martin

Rollbase

Posted by Admin on 01-May-2012 04:36

Pavel, Martin,



I think it is a good idea to restore the old version of this API in next release. Thank you. When do you plan to set up the next release ?



Martin, thank you for your code. Actually, it does not work for all field types in all navigator versions especially for IE. Indeed, HTML structure prevents fields from being easily shown/hidden. I have seen many discussions on this topic on forums especially with IE.



Pavel, can you send to me the code of the old version you are going to restore. I'll try to write a version of this function which will work on all navigators on most field types.



We use this function a lot.



Thank you for your help.



Matthieu

Posted by Admin on 01-May-2012 09:22

hello,



what specific fields are not working? we've actually tested this until Ie5 and havent had troubles with this yet, ofcourse this includes chrome and ff. we in turn use this custom code on most if not all of our deployments. :-)



Thank you,

Piscoso, Martin

Rollbase

Posted by Admin on 01-May-2012 13:17

Hello,



There is probably something I don't understand or my code is simply wrong.

I have created an simple example in Pavel environnement.

Application Test 1.

Tab HideOrShow

Menu "New hideOrShow".

It does not work on at least IE8 and FF3.

Thank you for your patience.



Matthieu

Posted by Admin on 01-May-2012 19:54

Hi,



In this new environment, which showorhide did you use? The standard or custom one? as mentioned by Pavel, have you tried clearing your cache and cookies so that you'll be able to download the updated files from Rollbase?



Kindly give more info if you may please.



Piscoso, Martin

Rollbase

Posted by Admin on 02-May-2012 02:17

Hello Martin,



I mean "Pavel work environment", his test environment. He gave to me an access a few months ago so that I can reproduce issues in this environment. The name of this environment is "Pavel Test".



If you don't have an access to Pavel Test environnement, please, ask him one so that you can execute this example and see what is going on. Or I can reproduce the issue in another environment, as you want. Just tell me.



Sorry for my broken English ...



Matthieu

Posted by Admin on 02-May-2012 11:27

Got it !



If you use rbf_showOrHideField(fieldName, true), then c__showHide(field,true) do not work anymore ! I used both functions at the same time to make tests. I should not have done that.



So rbf_showOrHideField(fieldName, showField) code should be replaced by c__showHide(field,flag) code. You are right.



Sorry for the inconvenience Martin.



Matthieu

This thread is closed