473,379 Members | 1,283 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Problem related to Master Pages

navneetkaur
hello every1...
i want to add a counter on the textbox which is having highest limit 250..'d on every enter of letter it should be decreased by 1...
i have added 1 javascript function which is doing that...but arguments that i am passing is like this.form.textbox1.text but because of master page control hierarchy changes it does not able to find control....
tell me solution....
any idea is appreciated....
thanx
Oct 4 '07 #1
4 996
shweta123
692 Expert 512MB
Hi,

Can you please mention any error you are getting in javascript function?
From the post it is not clear where are you stcuk up.
Are you calling your javasript function OnTextChanged event of textbox?


hello every1...
i want to add a counter on the textbox which is having highest limit 250..'d on every enter of letter it should be decreased by 1...
i have added 1 javascript function which is doing that...but arguments that i am passing is like this.form.textbox1.text but because of master page control hierarchy changes it does not able to find control....
tell me solution....
any idea is appreciated....
thanx
Oct 4 '07 #2
Hi,

Can you please mention any error you are getting in javascript function?
From the post it is not clear where are you stcuk up.
Are you calling your javasript function OnTextChanged event of textbox?
hello

no m not getting any error function is like that
Expand|Select|Wrap|Line Numbers
  1. function limitText(limitField, limitCount, limitNum) 
  2. {
  3.     if (limitField.value.length > limitNum) 
  4.                {
  5.         limitField.value = limitField.value.substring(0, limitNum);
  6.                } 
  7.                else {
  8.         limitCount.value = limitNum - limitField.value.length;
  9.           }
  10. }
  11.  
'd m calling this function

Expand|Select|Wrap|Line Numbers
  1. <textarea id="project_title1" runat="server" name="project_title1"
  2.                         style="height: 40px; width: 337px;" onkeydown=
  3. "limitText(this.Form.project_title1,this.Form.countdown3,150);" 
  4.                            onkeyup="limitText(this.Form.project_title1,this.Form.countdown3,150);" ></textarea><br />
  5.  
it is just when i enter in this textarea there is a counter which initial value is 150 but when we enter something it should be decreased by 1.....no 1 can enter more than 150 characters...
Oct 5 '07 #3
Shashi Sadasivan
1,435 Expert 1GB
I belive you can set the property of the text box control to set its maximum length.
not sure if it is a text area or text box.

If your query is javascript related please post your query in the javascript forums so that more javascript proficient people can help you.

Firefox and now IE too show you javascript errors.

cheers.
Oct 5 '07 #4
I belive you can set the property of the text box control to set its maximum length.
not sure if it is a text area or text box.

If your query is javascript related please post your query in the javascript forums so that more javascript proficient people can help you.

Firefox and now IE too show you javascript errors.

cheers.

sir
i have seen textarea doesnot have this property maximum length.....'d if i implement this same code in simple web form without master pages it works fine but i suppose problem with this because of master pages....as it changes control hierarchy....'d in IE it shows error
Expand|Select|Wrap|Line Numbers
  1. this.form.project_title1 value is null or not an object
  2.  
so please help me....
m waiting if u hv knowledge of master pages...1 thing is sure this is because master pages...so i can not able to tranform this problem in javascript forum....

thanx......
Oct 5 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: AlessanBar | last post by:
Hello Friends !! I have a strange problem, and I need to know what would be the source of this. I have a laptop computer with the following configuration: Pentium III Brand : Toshiba Speed :...
1
by: Sasha | last post by:
Hi all asp.net proffesionals out there, How do you implement master pages in your applications? What libraries do you use and what have been your experience? Sasha
1
by: Wernfried Schwenkner | last post by:
I have compiled the portal sample comming whit whidby. While running it ftom the IDE it works, all buttons on the start page are shown. When I deploy the portal with the Menu "WebSite/Publish",...
4
by: reezaali | last post by:
Hi All, I wanted to set up my websites like this c:\websites\intranettemplate c:\websites\app1 c:\websites\app2 Basically I wanted to have the master pages defined in the template folder...
7
by: Martijn Saly | last post by:
Hi there, I've created a master page with some controls on it, a Calendar control among others. Now depending on the date(s) selected, the content page needs to be updated. In the masterpage...
20
by: Alan Silver | last post by:
Hello, In classic ASP, I used to use two include files on each page, one before and one after the main content, to provide a consistent layout across a web site. That way I could just change the...
17
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
8
by: JT | last post by:
Hi, I have done a fair amount of style editing inline in ASP. I'm now using VS 2005 with a standard web project (not Web Application Project). This is my first foray into CSS in a style sheet...
2
by: Samuel Shulman | last post by:
In the MasterPage an images is mapped as follows: ../Images/XYZ.gif and that works fine as long as the forms using this master file are related to the image file in the same way But I have...
0
by: james.mcdonagh | last post by:
Hi I am a newbie using nAnt for .net 2.0. As such I have not come across this bug before, and I would be happy of any help that you may be able to provide. In order to help I have included the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.