-
Feb 8th, 2012, 08:49 AM
#1
Thread Starter
Hyperactive Member
Statement seems to be ignored unless something exec before it.
Hi,
Got 3 cascading dropdowns (Clients -> Departments -> Teams) and loading their data using jquery ajax calls. (there are a lot to the rest of the form though, though not related to this problem )
Since I am clearing dropdowns and hiding elements all over, I wanted to created a function that can be called any time that will do that in one place). however I soon got stuck.
The following code works perfectly, until I one uncomment the alert. From then, the next line seems to just get ignored.
Code:
function SetControlsVisibility() {
var clientId = $("select#ClientId > option:selected").attr("value");
if (clientId == '' || clientId == undefined) {
alert("abc");
$('#DepartmentId').empty().prev().text(""); // ain't do it if no alert....
.....
got a strong feeling of devaju here, but just cannot remember where I ran into this issue before though.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|