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.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
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
Reply With Quote

  #2 (permalink)  
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;
}
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 think i ever did this.. jimmy Introduce Yourself 4 Jan 15th, 2007 17:25
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 19:29.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs 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 43