Click here to Skip to main content
15,920,632 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Ok I read the above but the Asp.net forum didn't help Pin
JimBob SquarePants30-Jul-08 15:32
JimBob SquarePants30-Jul-08 15:32 
AnswerRe: Ok I read the above but the Asp.net forum didn't help Pin
Rama Krishna Vavilala30-Jul-08 15:10
Rama Krishna Vavilala30-Jul-08 15:10 
GeneralRe: Ok I read the above but the Asp.net forum didn't help Pin
JimBob SquarePants30-Jul-08 15:29
JimBob SquarePants30-Jul-08 15:29 
GeneralRe: Ok I read the above but the Asp.net forum didn't help Pin
_Damian S_30-Jul-08 15:40
professional_Damian S_30-Jul-08 15:40 
GeneralRe: Ok I read the above but the Asp.net forum didn't help Pin
JimBob SquarePants30-Jul-08 15:46
JimBob SquarePants30-Jul-08 15:46 
AnswerRe: Ok I read the above but the Asp.net forum didn't help Pin
Guffa2-Aug-08 23:42
Guffa2-Aug-08 23:42 
Questiondocument.createElement() or .innerHTML in Javascript? Pin
Perspx30-Jul-08 10:16
Perspx30-Jul-08 10:16 
AnswerWhat's the difference between an apple and an orange? Pin
Shog930-Jul-08 12:17
sitebuilderShog930-Jul-08 12:17 
GeneralRe: What's the difference between an apple and an orange? Pin
Perspx30-Jul-08 23:15
Perspx30-Jul-08 23:15 
GeneralRe: What's the difference between an apple and an orange? Pin
Shog91-Aug-08 6:22
sitebuilderShog91-Aug-08 6:22 
GeneralRe: What's the difference between an apple and an orange? Pin
Perspx1-Aug-08 8:15
Perspx1-Aug-08 8:15 
QuestionSoftware Documentation?? Pin
tadhg8830-Jul-08 4:33
tadhg8830-Jul-08 4:33 
AnswerRe: Software Documentation?? Pin
led mike30-Jul-08 8:02
led mike30-Jul-08 8:02 
Questioninserting the id of data in the second dropdown menu(this second drop down menu depends on the first drop down menu) in to my database 2.please can anyone teach me how to mantain the userid of some one who logs in so that i can use it later Pin
nahelna30-Jul-08 3:33
nahelna30-Jul-08 3:33 
AnswerRe: inserting the id of data in the second dropdown menu(this second drop down menu depends on the first drop down menu) in to my database 2.please can anyone teach me how to mantain the userid of some one who logs in so that i can use it later Pin
Johnny ²30-Jul-08 4:27
Johnny ²30-Jul-08 4:27 
GeneralRe: inserting the id of data in the second dropdown menu(this second drop down menu depends on the first drop down menu) Pin
nahelna31-Jul-08 1:37
nahelna31-Jul-08 1:37 
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 

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.