Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a button visible after recordset onchange

Status
Not open for further replies.

david7777777777

Programmer
Sep 26, 2001
417
US
I have a page that contains:
1. Recordset (rsLastNames)to populate the list of employee last names for the drop down box. The onchange event of this passes a variable to the other recordset.

2. Drop down box to list the last names

3. Recordset (rsEmployees) to return the employee's information based on the last name selected in the drop down box. Parameter is passed via script.

4. Go button to press after the last name is selected

Now here's my problem: Once the user selects a last name from the drop down box, it's taking about 5 to 7 seconds before the server roundtrip is completed and it's ok to hit the Go button. I'd like to simply keep the Go button out of sight until it's ok to hit it. I cannot figure out how to hide the Go button until the server round trip (that is generated by the onchange event in the drop down box) has completed. As you can guess, if they hit the Go button before the server roundtrip has completed you get an error because the variable has not yet been passed to the other recordset. Thanks.
 
Hi,

if I understand correctly you want to hide your button just between server round trip. I don't think this is possible in server side code, did you try hiding or disabling it in client side code in onbeforeserver event.

Or why don't you make a disabled/hidden button and enable/show it in the onchange event, so nobody will be able to click on it before they make a choice?

"Defeat is not the worst of failures. Not to have tried is the true failure."
-George E. Woodberry
 
I've been messing around with every event and hidden/visible combination I can think of and I still cannot get it to show up when I need it to. I can hide it no problem, but apparently I'm not using the correct event and/or method or property combination to make it show up again after I've hidden it. I've turned trace on so I can see all events too. What does the isvisible method do?
 
Hi,

for making DTC's visible you have to use

button1.show()

to hide them use

button1.hide().

isVisible() method tells you if an object is visible or hidden.
"Defeat is not the worst of failures. Not to have tried is the true failure."
-George E. Woodberry
 
Trap the combo's onchange event in the client-side onbeforeserverevent(obj, event) event. You would be able to do some javascript to hide the button - probably be overlaying it with a GIF that displays an animated clock/hourglass/%complete bar graphic. A collegue here does this with great success. (Content Management)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top