Click here to Skip to main content
15,886,919 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Javascript validation Pin
Mohibur Rashid2-Oct-11 19:11
professionalMohibur Rashid2-Oct-11 19:11 
QuestionRetry Cancel Pin
berba29-Sep-11 0:59
berba29-Sep-11 0:59 
AnswerRe: Retry Cancel Pin
twseitex29-Sep-11 9:15
twseitex29-Sep-11 9:15 
AnswerRe: Retry Cancel Pin
Mohibur Rashid2-Oct-11 19:06
professionalMohibur Rashid2-Oct-11 19:06 
GeneralRe: Retry Cancel Pin
berba3-Oct-11 5:14
berba3-Oct-11 5:14 
QuestionHow can i change regex to work in javascript Pin
AditSheth27-Sep-11 20:54
AditSheth27-Sep-11 20:54 
AnswerRe: How can i change regex to work in javascript Pin
Matt Meyer28-Sep-11 4:29
Matt Meyer28-Sep-11 4:29 
QuestionHow to use Jquery on a Dynamical created Textbox Pin
Vimalsoft(Pty) Ltd27-Sep-11 2:59
professionalVimalsoft(Pty) Ltd27-Sep-11 2:59 
Good Day All

i am creating Textboxes at Runtime with something like this

VB
Dim cnt As New TextBox

      cnt.ID = "cont_" & x

      If multiline Then
          cnt.TextMode = TextBoxMode.MultiLine


      End If


These are dynamically created fields. so what i want to do is to use this following JQuery on this textbox

C#
$(document).ready(function()
{
        $("#contentbox").keyup(function()
        {
        var box=$(this).val();
        var main = box.length *100;
        var value= (main / 145);
        var count= 145 - box.length;

        if(box.length <= 145)
        {
        $('#count').html(count);
        $('#bar').animate({"width": value+'%',}, 1);
        }
        return false;
        });

});


and what this function does it count the number of Characters that have been typed in a Textbox. so i am displaying the remaining characters. So that is working fine on my example because the Element is known at Early Binding. Now my question is what if the textbox is created dynamically ?

contentbox


this is the name of the Textbox in my example.

hOW do we use a J Query in Dynamically created Textbox.


Thanks
Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@dotnetfunda.com
http://www.Dotnetfunda.com

AnswerRe: How to use Jquery on a Dynamical created Textbox Pin
AspDotNetDev27-Sep-11 7:42
protectorAspDotNetDev27-Sep-11 7:42 
AnswerRe: How to use Jquery on a Dynamical created Textbox Pin
AditSheth27-Sep-11 20:24
AditSheth27-Sep-11 20:24 
GeneralRe: How to use Jquery on a Dynamical created Textbox Pin
Vimalsoft(Pty) Ltd27-Sep-11 22:27
professionalVimalsoft(Pty) Ltd27-Sep-11 22:27 
GeneralRe: How to use Jquery on a Dynamical created Textbox Pin
AditSheth28-Sep-11 0:40
AditSheth28-Sep-11 0:40 
Questionhow to timer set image Pin
pravin thatar26-Sep-11 22:49
pravin thatar26-Sep-11 22:49 
QuestionWhat this code is doing? Pin
treuveni23-Sep-11 22:31
treuveni23-Sep-11 22:31 
AnswerRe: What this code is doing? Pin
André Kraak23-Sep-11 22:48
André Kraak23-Sep-11 22:48 
QuestionGoogle API v2 is Free? Pin
MaulikDusara23-Sep-11 19:58
MaulikDusara23-Sep-11 19:58 
AnswerRe: Google API v2 is Free? Pin
Richard MacCutchan23-Sep-11 22:57
mveRichard MacCutchan23-Sep-11 22:57 
QuestionJava script -Print Pin
kathyani21-Sep-11 2:13
kathyani21-Sep-11 2:13 
AnswerRe: Java script -Print Pin
Pete O'Hanlon21-Sep-11 2:46
mvePete O'Hanlon21-Sep-11 2:46 
GeneralRe: Java script -Print Pin
kathyani21-Sep-11 2:54
kathyani21-Sep-11 2:54 
GeneralRe: Java script -Print Pin
Pete O'Hanlon21-Sep-11 3:05
mvePete O'Hanlon21-Sep-11 3:05 
JokeRe: Java script -Print PinPopular
Manfred Rudolf Bihy21-Sep-11 3:43
professionalManfred Rudolf Bihy21-Sep-11 3:43 
GeneralRe: Java script -Print Pin
Pete O'Hanlon21-Sep-11 4:47
mvePete O'Hanlon21-Sep-11 4:47 
QuestionProblem Displaying Data Island [modified] Pin
ASPnoob20-Sep-11 19:34
ASPnoob20-Sep-11 19:34 
AnswerRe: Problem Displaying Data Island Pin
Graham Breach20-Sep-11 21:54
Graham Breach20-Sep-11 21:54 

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.