New to JS dont get this

This is a discussion on "New to JS dont get this" within the JavaScript Forum section. This forum, and the thread "New to JS dont get this are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Mar 14th, 2008, 15:40
New Member
Join Date: Mar 2008
Location: calgary
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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: Select all
 
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: Select all
 
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: Select all
 
function pageLoad(sender, args)
{
...
{
Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Mar 14th, 2008, 16:10
New Member
Join Date: Mar 2008
Location: calgary
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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: Select all
 
var x = $get('currentEventInputSelect').value;
if (x == 4)
{
$get('name_dropDownListControl').disabled=true; 
$get('address_dropDownListControl').disabled=true; 
$get('age_dropDownListControl').disabled=true;
}
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

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 Web Page Design 14 Sep 30th, 2007 15:33
i dont know what its called but i can show you what i mean lol bruno89 Web Page Design 20 Aug 26th, 2006 16:13
Pop up windows that dont get blocked cyberseed Web Page Design 5 May 23rd, 2006 16:31
i dont know what to do next bats Other Programming Languages 0 Apr 21st, 2006 21:10


All times are GMT. The time now is 21:12.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42