Focal Point
[SOLVED]Retrieve dynamic drop down text....once it has loaded

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9717037316

December 01, 2011, 10:57 AM
mark66
[SOLVED]Retrieve dynamic drop down text....once it has loaded
Hi,

I have a dynamic drop down box on my HTML selection screen that is populated on load from a procedure and will always return one row. I want to be able to access this data in JS as soon as the box / screen has loaded.

I placed my JS function to retrieve this data afer the “UpdateData()” call in the “window_onload()” function, but it appears to runs before the drop down box has completed its load – which usually takes 2-3 seconds where we have the message ‘Retrieving Data’.

I therefore want to code a delay or a loop that will keep checking my drop down box until it has loaded.

I have tried to create such a loop, that is called after the UpdateData call, but it locks the screen. I suspect that the loop is too intensive and causes the load to not happen.

Any suggestions on how to retrieve this data asap after the load has completed?

Many thanks

Mark

This message has been edited. Last edited by: mark66,


WebFocus 765. iSeries v5r4
December 01, 2011, 11:06 AM
mark66
Just had a DOH moment and remembered the combo boxes events such as onChange....

But alas none of these appear to be triggered when the combo is populated Frowner


WebFocus 765. iSeries v5r4
December 01, 2011, 11:17 AM
Wep5622
You need to place your function call in the onInitialUpdate() function. That function isn't created by default, but if it's there WF (ibirls3.js) will call it once all the asynchronous stuff is done loading.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
December 01, 2011, 11:23 AM
mark66
Ok, perhaps I should have investigated a little further before asking for help Music

If I back track a little...what I ultimately want to do is to retrieve and report in some text on the screen, the environment and territory that our user is currently pointing to on the server. It is this information that my procedure returns. I thought the only way to do this would be to load a combo, hide it and then place the data into a text field on the screen.

However I have just found out that it is not just Combo boxes can be dynamically loaded! Text outputs can't, but Text Boxes can. And with a little styling, I can make my Text Box look just like a standard Text output string.

So I am done, my screen tells the user what dataset they will be retreiving from and I don't need any custom JavaScript.

I'll get my coat on the way out Smiler


WebFocus 765. iSeries v5r4
December 01, 2011, 11:29 AM
mark66
quote:
Originally posted by Wep5622:
You need to place your function call in the onInitialUpdate() function. That function isn't created by default, but if it's there WF (ibirls3.js) will call it once all the asynchronous stuff is done loading.
Thanks, that is useful to know!


WebFocus 765. iSeries v5r4