Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old March 14th, 2008, 12:40 PM   #1
New Member
 

Join Date: Mar 2008
Location: calgary
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 smithsf22 is on a distinguished road
New to JS dont get this

Hello,
I am new to javascript and have what i think is a really simple problem. I have a few drop downs that I want to disable via javascript.

Code:
 
var x = $get('currentEventInputSelect').value;
if (x == 4)
{
$get(name_dropDownListControl').disabled=true; 
$get(address_dropDownListControl').disabled=true; 
$get(age_dropDownListControl').disabled=true;
}
It will only work if I put this before the if:

Code:
 
alert(x)
can anyone please explain to me why this happens. I am using VS 2005 C# and the above code is being called in the

Code:
 
function pageLoad(sender, args)
{
...
{
Thanks
smithsf22 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 14th, 2008, 01:10 PM   #2
New Member
 

Join Date: Mar 2008
Location: calgary
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 smithsf22 is on a distinguished road
Re: New to JS dont get this

oops cut and paste error.... the code is not as shown above it does have the single quotes.... like this:

Code:
 
var x = $get('currentEventInputSelect').value;
if (x == 4)
{
$get('name_dropDownListControl').disabled=true; 
$get('address_dropDownListControl').disabled=true; 
$get('age_dropDownListControl').disabled=true;
}
smithsf22 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
My Pages Dont Work In I.E ???? Can Anyone Help I Look On HTML, XHTML and CSS 14 September 30th, 2007 11:33 AM
i dont know what its called but i can show you what i mean lol bruno89 HTML, XHTML and CSS 20 August 26th, 2006 12:13 PM
Pop up windows that dont get blocked cyberseed HTML, XHTML and CSS 5 May 23rd, 2006 12:31 PM
i dont know what to do next bats Other Languages 0 April 21st, 2006 05:10 PM


Search Engine Optimization by vBSEO 3.2.0 RC8