473,395 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Displaying the value in combobox

hi,

I want to change the combobox displaying value depending up on the action value. This is the example code,
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. </head>
  4. <script Language="JavaScript">
  5. function check(action)
  6. {
  7. if(action=="hourly")
  8. {
  9. //code insert here
  10. //this action equals hourly i have to display the Hourly in the combobox.
  11. }
  12. }
  13. </script>
  14. <body onLoad="check('hourly')">
  15. <SELECT name=NavBox id="NavCo">
  16. <OPTION>Default
  17. <OPTION>Hourly
  18. <OPTION>Daily
  19. <OPTION>Monthly</OPTION>
  20. </SELECT>
  21. </body>
  22. </html>
  23.  

How can i do this.

Thanks in advance.
Dec 14 '07 #1
1 1149
Dasty
101 Expert 100+
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. </head>
  4. <script Language="JavaScript">
  5. function check(action)
  6. {
  7.   document.getElementById('NavCo').value = action;
  8. }
  9. </script>
  10. <body onLoad="check('hourly')">
  11.   <SELECT name=NavBox id="NavCo">
  12.     <OPTION value="default">Default</OPTION>
  13.     <OPTION value="hourly">Hourly</OPTION>
  14.     <OPTION value="daily">Daily</OPTION>
  15.     <OPTION value="monthly">Monthly</OPTION>
  16.   </SELECT>
  17. </body>
  18. </html>
Maybe setting value for each option is not looking good, but it works in all browsers. :)
Dec 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Laphan | last post by:
Hi All Sorry for the confusing subject, but I'm hoping that you will be able to help. In very basic terms I want to emulate a <SELECT> HTML box in VB. All I want to do is display a title...
2
by: Susan Bricker | last post by:
Greetings! Still the same application (as previous posts). I worked on the app while at work (don't tell my boss ... cause this is just for fun and not work related) and the form was working,...
0
by: Johann Blake | last post by:
I have a dataset that I bind to two different datagrids. The dataset contains 2 tables. One is the main table used to store what I call session data which includes a Country field where the ID of a...
15
by: Bo Diddly | last post by:
Hi everyone, I am relatively new to VB.Net, and database programming. I have a database with four tables, set up as follows: tblBook BookID... key Book... All the book titles of the Bible...
4
by: John Suru | last post by:
I am loading up a combobox with data from an access database. The field I am loading is a date/time datatype. The data in the field is a short date(ex. 01/22/2004). When I load the combobox with the...
2
by: max | last post by:
Hello, I have a VS2005 framework and ado.net. I have an access db with two tables: 1) Patients; 2) Doctors. The 'Patients table is already filled by a long list of records (coming from an old...
3
by: sharperrr | last post by:
Access2000 Hi I have a combobox which displays a list of values dependent on another field. On the fields onchange event the rowsource of the combobox changes according to the value in the...
33
by: buss123 | last post by:
Hi all, combo box script code was working in IE perfectly with all modes but OnChange event was not working in FireFox(editable mode, if we select valuese that combo box values r...
5
by: sejal17 | last post by:
hello everyone, I have a problem with displaying records between two dates.Below is my designing page: start date: combobox of month(smonth) & combobox of year(syear) end date :...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.