Solved

javascript/asp.net - textbox has a character count ...

Posted on 2011-02-18
2
388 Views
Last Modified: 2012-08-13
need to build a jquery/ajax solution that when the user types in a textbox...it will countup to 100 for each character they type in the textbox....once it hits 100..it will spill over into a second textbox until the user types in 100 chars..then it will spill into a third...each of these textboxes become visable as the user hits the 100 mark...
0
Comment
Question by:GlobaLevel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 34927175
this is loosely what you are looking for

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<script>
			function runScript(e) 
			{
				if (e.keyCode == 13) 
				{
					var tb = document.getElementById("scriptBox");
					eval(tb.value);
					return false;
				}
			}



			function checkAndNext(thisObj)
			{
				var id = thisObj.getAttribute("id");
				var count = parseInt(id.split("_")[1]);
				if ( count < 3 )
				{
					if ( thisObj.value.length == 100 )
					{
						id = "text_"+(count+1);
						document.getElementById(id).style.display = "block";
						document.getElementById(id).focus();
					}
					
				}
			}
		</script>
	</HEAD>

	<BODY>
		<input id="text_1" type="text" onkeypress="checkAndNext(this)" style="width:900px"/>

		<input id="text_2" type="text" onkeypress="checkAndNext(this)" style="display:none;width:900px"/>

		<input id="text_3" type="text" style="display:none;width:900px"/>
	</BODY>
</HTML>

Open in new window

0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 34929238
Why not create new ones as he types?
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question