•
•
•
•
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 427,158 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 1,891 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
Views: 4304 | Replies: 10
![]() |
•
•
Join Date: Jul 2005
Posts: 10
Reputation:
Rep Power: 4
Solved Threads: 1
I think I am very close. Below code is working. I am passing the value of selectedindex in dd as onchange event from the drop down. setDropdown is my onload event. If I hard code it, it works, but if I use
document.getElementById('ParmMonth').options.selectedIndex = cookiedValue, it doesnt.
Any ideas.
Thanks,
Dhruv
function setDropDown()
{
document.getElementById('ParmMonth').options.selectedIndex = 2
alert("set" & cookiedValue)
}
function changeDropDown(dd)
{
cookiedValue = dd
alert("dD");
alert(dd);
alert("value");
alert(cookiedValue);
}
document.getElementById('ParmMonth').options.selectedIndex = cookiedValue, it doesnt.
Any ideas.
Thanks,
Dhruv
function setDropDown()
{
document.getElementById('ParmMonth').options.selectedIndex = 2
alert("set" & cookiedValue)
}
function changeDropDown(dd)
{
cookiedValue = dd
alert("dD");
alert(dd);
alert("value");
alert(cookiedValue);
}
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- onLoad commands (HTML and CSS)
- Page Opening - Cache Problem? (JavaScript / DHTML / AJAX)
- How can fix the problem? (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Forcing a script to load in Safari -- help needed
- Next Thread: setting value is not sticking


Linear Mode