Click here to Skip to main content
15,896,348 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: second drop down menu depends on the first drop down menu Pin
nahelna31-Jul-08 1:51
nahelna31-Jul-08 1:51 
Questionremote script please help....... Pin
mohd faiz30-Jul-08 2:10
mohd faiz30-Jul-08 2:10 
AnswerRe: remote script please help....... Pin
Shog930-Jul-08 4:07
sitebuilderShog930-Jul-08 4:07 
QuestionJquery Pin
prnkrish29-Jul-08 12:26
prnkrish29-Jul-08 12:26 
AnswerRe: Jquery Pin
Shog929-Jul-08 13:01
sitebuilderShog929-Jul-08 13:01 
GeneralRe: Jquery Pin
prnkrish30-Jul-08 7:54
prnkrish30-Jul-08 7:54 
GeneralRe: Jquery Pin
Shog930-Jul-08 8:18
sitebuilderShog930-Jul-08 8:18 
GeneralRe: Jquery Pin
prnkrish30-Jul-08 9:00
prnkrish30-Jul-08 9:00 
Hi :rose: Shog! :rose:


  As per ur reply, I tried in a small html like this

<pre>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>textbox to accept only numbers (digits)</title>
<script type="text/javascript" src="C:\Documents and Settings\Administrator\Desktop\jquery.js"></script>
<script type="text/javascript">
<!--/-+
//  Developed by Roshan Bhattarai 
//  Visit http://roshanbh.com.np for this script and more.
//  This notice MUST stay intact for legal use
//- -->
z`
// 
// adds new method to jQuery, only operates on select lists, adds option with specified text, optional value
//

$.fn.addOption = function(optText, optVal)
{
   this.filter("select").each(function()
   {
     var opt = new Option(optText, optVal);
     this.options.add(opt);
   });
}

var mapIdToName = 
{
   1 : "name1",
   2 : "name2",
   3 : "name3",
   4 : "George",
   5 : "name5"
};

//
// attaches to blur event of input field with id of textentry, 
// causes it to add text to select list with id of dropdown (if text is non-empty / non-whitespace)
//
$(function()
{
   $("#textentry").blur(function() 
   {
      var optionVal = $.trim(this.value);
      var optionText = mapIdToName[optionVal];
      this.value = '';
      if ( optionText )
         $("#dropdown").addOption(optionText, optionVal);
   });
});
</script>

</head>

<form>
<body>

<input type="text" name="name" id="textentry" />

 <select id="dropdown">
            <option> </option>
        </select>
    
</body>
</form>
</html>



But its not working, please find what is the error?
or else do u think I don't know how to make use of it?
Please explain!!

Cry | :(( Thank You Cry | :((
GeneralRe: Jquery Pin
Shog930-Jul-08 9:23
sitebuilderShog930-Jul-08 9:23 
AnswerWeb development using FineReport Pin
zxn622829-Jul-08 8:56
zxn622829-Jul-08 8:56 
GeneralRe: Web development using FineReport Pin
Paul Conrad29-Jul-08 10:05
professionalPaul Conrad29-Jul-08 10:05 
GeneralRe: Web development using FineReport Pin
Shog929-Jul-08 10:13
sitebuilderShog929-Jul-08 10:13 
GeneralRe: Web development using FineReport Pin
led mike29-Jul-08 10:24
led mike29-Jul-08 10:24 
GeneralRe: Web development using FineReport Pin
zxn622830-Jul-08 9:45
zxn622830-Jul-08 9:45 
GeneralRe: Web development using FineReport Pin
zxn622830-Jul-08 9:50
zxn622830-Jul-08 9:50 
GeneralRe: Web development using FineReport Pin
Shog930-Jul-08 9:56
sitebuilderShog930-Jul-08 9:56 
GeneralCSS Layout for Input Controls Pin
Brady Kelly28-Jul-08 22:36
Brady Kelly28-Jul-08 22:36 
GeneralRe: CSS Layout for Input Controls Pin
Shog929-Jul-08 4:43
sitebuilderShog929-Jul-08 4:43 
GeneralRe: CSS Layout for Input Controls Pin
Brady Kelly29-Jul-08 5:16
Brady Kelly29-Jul-08 5:16 
GeneralRe: CSS Layout for Input Controls Pin
Shog929-Jul-08 10:10
sitebuilderShog929-Jul-08 10:10 
Questiongetting customers Pin
K Manisha28-Jul-08 17:59
K Manisha28-Jul-08 17:59 
AnswerRe: getting customers Pin
Vasudevan Deepak Kumar28-Jul-08 18:30
Vasudevan Deepak Kumar28-Jul-08 18:30 
Questionsuggession needed Pin
Harikrk28-Jul-08 16:30
Harikrk28-Jul-08 16:30 
AnswerRe: suggession needed Pin
Paul Conrad28-Jul-08 18:43
professionalPaul Conrad28-Jul-08 18:43 
GeneralInput Width Problem in IE Pin
Brady Kelly28-Jul-08 9:10
Brady Kelly28-Jul-08 9:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.