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 427,428 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 3,560 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: 944 | Replies: 3
Reply
Join Date: May 2006
Posts: 5
Reputation: arnar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
arnar arnar is offline Offline
Newbie Poster

HTML newbie problem!!

  #1  
May 29th, 2006
Hi everybody

I have one question. I´m quite new to HTML programming, but have been dabbling with it.
I have a website that has two dropdownlists (ASP.NET controls).
One ddl is filled on Page_Load with the months available. The other I have filled with every week of the corresponding month with JavaScript.

This has worked fine. I however get into trouble when continuing on. When I press my ASP.NET button and want to get the values in the dropdownbuttons I get the value for the one filled by ASP.NET but not the one filled by JavaScript. That one always reports 0 items, even though the items are shown on the webpage.

How can I get the HTML values of the dropdown server side?

with regards
Arnar Gudnason
Iceland
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2006
Posts: 5
Reputation: arnar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
arnar arnar is offline Offline
Newbie Poster

Re: HTML newbie problem!!

  #2  
May 29th, 2006
Hi

Sorry, didn´t see the forrest for the trees. The easiest way was of course to simply place the value of the HTML dropdown in a hidden textbox and then take that value (in the sever )

thanks
Reply With Quote  
Join Date: Dec 2004
Location: UAE
Posts: 406
Reputation: Sulley's Boo will become famous soon enough Sulley's Boo will become famous soon enough 
Rep Power: 5
Solved Threads: 9
Sulley's Boo's Avatar
Sulley's Boo Sulley's Boo is offline Offline
Posting Pro in Training

Re: HTML newbie problem!!

  #3  
May 29th, 2006
=) .. all the best ..
Reply With Quote  
Join Date: Dec 2004
Posts: 1,590
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: HTML newbie problem!!

  #4  
May 29th, 2006
HTML is not ASP.NET. To get the values of HTML elements server-side, post them in a form and iterate through the Request object; or don't use an HTML element in the first place, use an ASP.NET server control instead.

You don't need to place them in a hidden element, as the Request object contains all the posted form values.

If you have additional ASP.NET questions, it's best to ask them in the ASP.NET forum.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 5:23 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC