User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,192 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,578 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Pull down menue using getElemntById --Help Please

Join Date: Apr 2008
Posts: 17
Reputation: vanessia_1999 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
vanessia_1999 vanessia_1999 is offline Offline
Newbie Poster

Re: Pull down menue using getElemntById --Help Please

  #9  
May 16th, 2008
Originally Posted by Luckychap View Post
The function should be like this :


function CheckForCreditCard()
if document.getElementById("divCreditCardInfo").options3.selected == true)
{ 
var CreditCardInfo = document.getElementById("CreditCardInfo");
CreditCardInfo.style.visibility = "visible";
}


You should first get a refrence for any document element before setting any properties. I.E done by:


var CreditCardInfo = document.getElementById("CreditCardInfo");



Thank you very much Luckychap. You have really gave me a greater understanding of dealing with getElementById. My book, "The book of Javascript 2nd Edition", only touch on it and did not explain it in detail to understanding as you did. I will take this to the grave with me. I Thank you very much for your time and your patience. Have a wonderful weekend!
Reply With Quote  
All times are GMT -4. The time now is 8:30 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC