Click here to Skip to main content
15,921,212 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Disable back button. Pin
Vikram.....2-Aug-07 2:35
Vikram.....2-Aug-07 2:35 
AnswerRe: Disable back button. Pin
Shog94-Aug-07 11:06
sitebuilderShog94-Aug-07 11:06 
QuestionHi need Reg Ex help Pin
Vikram.....1-Aug-07 18:12
Vikram.....1-Aug-07 18:12 
AnswerRe: Filename RegEx pattern Pin
andyharman2-Aug-07 3:45
professionalandyharman2-Aug-07 3:45 
QuestionRegular Expression Help Needed Pin
Brendan Vogt1-Aug-07 3:14
Brendan Vogt1-Aug-07 3:14 
AnswerRe: Regular Expression Help Needed (ISBN) Pin
andyharman1-Aug-07 6:38
professionalandyharman1-Aug-07 6:38 
QuestionJavascript attachEvent Problem [modified] Pin
Pranav Kaushik1-Aug-07 0:03
Pranav Kaushik1-Aug-07 0:03 
AnswerRe: Javascript attachEvent Problem Pin
Michael Sync1-Aug-07 15:44
Michael Sync1-Aug-07 15:44 
Pranav Kaushik wrote:


TextBoxId="Age"+i;
document.getElementById(TextBoxId).onkeypress=function(){
LimitChars(document.getElementById(TextBoxId),"3","Numbers");
}



You need to change as below.

TextBoxId="Age"+i;<br />
document.getElementById(TextBoxId).onkeypress=function(){  LimitChars(document.getElementById(<big>this.id</big>),"3","Numbers");}<br />


Here is my test script for you..

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
    <html xmlns="http://www.w3.org/1999/xhtml" ><br />
    <head> <title>Untitled Page</title><br />
    <script language="javascript"><br />
    function CreateTextBoxes(NumOfBoxes, ContainerID) {<br />
    document.getElementById(ContainerID).innerHTML="";<br />
    for (i=0;i<parseInt(NumOfBoxes) ; i++) {<br />
    var oTextBox="";<br />
    oTextBox=document.createElement("input");<br />
    oTextBox.id="Age"+i;<br />
    oTextBox.size="9";<br />
    oTextBox.value = "Value Age" + i;<br />
    document.getElementById('DependentsContainerID').appendChild(oTextBox);<br />
    document.getElementById(ContainerID).innerHTML+=" ";<br />
    }<br />
    var TextBoxId="";<br />
    for(i=0;i<parseInt(NumOfBoxes) ; i++) {<br />
        TextBoxId="Age"+i;<br />
        document.getElementById(TextBoxId).onkeypress=function(){ alert(document.getElementById(this.id).value);<br />
    }<br />
    //console.log(document.getElementById(TextBoxId).value);<br />
    }<br />
    }<br />
    </script><br />
    </head><br />
    <body><br />
    <div id="DependentsContainerID"></div><br />
    <div id="ContainerID"></div><br />
    <input type="button" value="Create Textboxes" onclick="CreateTextBoxes(10,'ContainerID');"<br />
    /><br />
    </body><br />
    </html>


Hope it helps.







Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)

If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. Smile | :)

QuestionIIS Configuration? Pin
ali_reza_zareian31-Jul-07 19:03
ali_reza_zareian31-Jul-07 19:03 
AnswerRe: IIS Configuration? Pin
kubben1-Aug-07 2:08
kubben1-Aug-07 2:08 
GeneralRe: IIS Configuration? Pin
ali_reza_zareian1-Aug-07 2:29
ali_reza_zareian1-Aug-07 2:29 
GeneralRe: IIS Configuration? Pin
kubben1-Aug-07 2:31
kubben1-Aug-07 2:31 
GeneralRe: IIS Configuration? Pin
ali_reza_zareian1-Aug-07 2:42
ali_reza_zareian1-Aug-07 2:42 
GeneralRe: IIS Configuration? Pin
kubben1-Aug-07 2:49
kubben1-Aug-07 2:49 
GeneralRe: IIS Configuration? Pin
ali_reza_zareian1-Aug-07 2:54
ali_reza_zareian1-Aug-07 2:54 
QuestionAccessing SQL Database from Webservice Pin
alias4731-Jul-07 17:50
alias4731-Jul-07 17:50 
AnswerRe: Accessing SQL Database from Webservice Pin
kubben1-Aug-07 2:10
kubben1-Aug-07 2:10 
GeneralRe: Accessing SQL Database from Webservice Pin
alias471-Aug-07 3:46
alias471-Aug-07 3:46 
GeneralRe: Accessing SQL Database from Webservice Pin
kubben1-Aug-07 3:50
kubben1-Aug-07 3:50 
GeneralRe: Accessing SQL Database from Webservice Pin
alias471-Aug-07 4:30
alias471-Aug-07 4:30 
GeneralRe: Accessing SQL Database from Webservice Pin
kubben1-Aug-07 4:39
kubben1-Aug-07 4:39 
QuestionClassic ASP question Pin
Vodstok31-Jul-07 8:09
Vodstok31-Jul-07 8:09 
AnswerRe: Classic ASP question Pin
Vasudevan Deepak Kumar6-Aug-07 2:15
Vasudevan Deepak Kumar6-Aug-07 2:15 
QuestionBest Javascript compressor / obfuscator Pin
Chris Maunder31-Jul-07 4:05
cofounderChris Maunder31-Jul-07 4:05 
AnswerRe: Best Javascript compressor / obfuscator Pin
Pete O'Hanlon31-Jul-07 10:36
mvePete O'Hanlon31-Jul-07 10:36 

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.