I have a tabbed container and a button (not in the container) on a page. If the first tab is selected, I want the button enabled. If the second is selected, I want the button disabled. I have created this functionaliity, but I have encountered some odd behavior. Switching tabs is handled client-side, and therefore, when the tabs are switched, I use something like the following to enable/disable the button client-side based on which tab is selected:view plaincopy to clipboardprint?var saveButton = document.getElementById("<%= btnSave.ClientID %>") if (saveButton) { saveButton.disabled=false; if mytab=="Tab2") { saveButton.disabled=true; } } var saveButton = document.getElementById("<%= btnSave.ClientID %>") if (saveButton) { saveButton.disabled=false; if mytab=="Tab2") { saveButton.disabled=true; } }view plaincopy to clipboardprint? view plaincopy to clipboardprint?This works great but the first problem I run into is, if a control on the second tab (the button is disalbed when this tab is selected) causes a postback, then after the postback the button's state is returned to enabled. This sort of makes sense since the page lifecycle, at this point, knows nothing about what the button state should be. I decided the solution to this would be to check what the current tab is during page load, and if it is the second tab, set the button enabled property to false. In this way, when a postback occurs on the second tab, the button remains disabled. Well, this works to a charm, but I encountered a bizzare side-effect. This works great but the first problem I run into is, if a control on the second tab (the button is disalbed when this tab is selected) causes a postback, then after the postback the button's state is returned to enabled. This sort of makes sense since the page lifecycle, at this point, knows nothing about what the button state should be. I decided the solution to this would be to check what the current tab is during page load, and if it is the second tab, set the button enabled property to false. In this way, when a postback occurs on the second tab, the button remains disabled. Well, this works to a charm, but I encountered a bizzare side-effect.view plaincopy to clipboardprint? view plaincopy to clipboardprint?On the second tab, a postback is caused. The button remains disabled as it should be. I then swith tabs. The client-side code goes into effect and the button client-side disabled property is set to false. However the strange thing is, now the button doesn't work. Clicking on it does not cause a postback and doesn't really do anything. It seems that setting the button enabled property to false and then true server-side, somehow doesn't jive with setting it's disabled property to false on the client. On the second tab, a postback is caused. The button remains disabled as it should be. I then swith tabs. The client-side code goes into effect and the button client-side disabled property is set to false. However the strange thing is, now the button doesn't work. Clicking on it does not cause a postback and doesn't really do anything. It seems that setting the button enabled property to false and then true server-side, somehow doesn't jive with setting it's disabled property to false on the client.view plaincopy to clipboardprint? view plaincopy to clipboardprint?anyone have an idea what is going on?
Multiple if statements
Ok so seems basic but for some reason I'm not doing it right. What I want is to be able to have 2 separate if statements in the same php document. What I've done is this:Code: if ($p1=='on' AND
Big Problem!! Please help
Hi Guys,Im making a website for a friend have encountered a really annoying problem. When every i run the script below i get this error: "Parse error: syntax error, unexpected '}' in
Warning: Cannot modify header information - headers already sent by (output sta
Warning: Cannot modify header information - headers already sent by (output started at /home/praylife/public_html/index.php:29) in /home/praylife/public_html/index.php on line 188Warning: Cannot
Weird problem with SELECT command..Help!
Hi!It seems I'm having a really weird problem with SQL SELECT command....I have table into a mySQL DB wich as 4 entry in it. I created the select command to retrieve the data and only 3 of the 4 entry
Problem with variable declaration in switch statement
Hello, I am having some trouble assigning a value to a variable inside a switch statement. What I am trying to do here is trip an error if the user has already added an item in the shopping cart.
Sharing PHP Sessions Across Domains
I am in the process of writing a script to share a php session across various domains I have.The problem I have, is getting php to access the php session. It gives me a persmission error. It seems the
change text color with a jQuery code
Hihow can I change the text in a asp:TextBox to a different color when I start typing using jQuery?I have this htmlview plaincopy to clipboardprint?<ol> <li> <asp:TextBox
Help on query replacing the date
Hi Pals,
MYSQL gen help
This is my Mysql gen. can anyone tell me why this echosMID(networkset.networkid, 3, 3) AS "MNC" SELECT FROM scan JOIN gps ON scan.gpsid = gps.gpsid JOIN gsmscanset ON scan.scanid =
How to find OS bit version
How can I tell the person browsing my site is running 32, or 64 bit operating system?