Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 13th, 2003, 10:33 AM
diane diane is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Virginia
Posts: 6 diane User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question allow input of the # and % characters in a textbox

I have a form which performs several database look-ups based on input from users. As a result, the page has to reload several times before users can submit their data. The problem I am having is when a user inputs either # or % into the textbox. The text is truncated from the #or % to the end of line on the next page reload. For example, if testing to see what a # key will do is input into the textbox only testing to see what a would be displayed after the page reloads the next time.

Does anyone have any idea on how to allow the use of the # and % in a text box.

Thanks,
Diane

Reply With Quote
  #2  
Old January 18th, 2003, 01:56 PM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,297 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 1 h 10 m 50 sec
Reputation Power: 104
Send a message via ICQ to christo Send a message via Yahoo to christo
hi

it would help us to know what language you are working in, the platform and also to see some lines of code

christo

Reply With Quote
  #3  
Old January 19th, 2003, 12:28 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 42 m 50 sec
Reputation Power: 184
there is nothing special about "#" and "%" in html textareas. the problem must be your server side script.
mysql is special about the "%" only in SELECT statements.
is it a C program using the printf() function? (% is a special character there)
is it bash? (# and % are string-functions there)

Tell us a little more...
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #4  
Old January 20th, 2003, 01:31 PM
diane diane is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Virginia
Posts: 6 diane User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
more info

sorry, I wasn't sure what info was needed as the text box that is giving me the problem is a plain text box. No look-ups are performed on this particular field but there are database lookups on field just prior to and after this field. I am running on a windows 2000 server.

Here is the code for the text box.

<TR>
<TD width="76">
</TD>
<TD valign = top width="193"> <strong>
<font color="#000000">Condition Requiring Maintenance
Service</font></strong>
</TD>
<TD width="660">
<font color="#000000">
<textarea rows="2" name="txt_Problem_Description" cols="65" tabindex="3"><%=strProblem%></textarea>
</font>
</TD>
</TR>

This is the code that does the page reload

<SCRIPT LANGUAGE="VBScript">
<!--
'Build the URL string for the page to load Function cnonchange()
strEmpID = frm_Maintenance_Request.txtClockNum.value
strCstCntrID = frm_Maintenance_Request.txtCstCntr.value
strProblem = frm_Maintenance_Request.txt_Problem_Description.value
cboEquipNo=frm_Maintenance_Request.cboEquipNo.value
EquipNoSel=frm_Maintenance_Request.txt_EquipNoSel.value
cboPriority=frm_Maintenance_Request.cboPriority.value
cboOrderClass=frm_Maintenance_Request.cboOrderClass.value
cboPlannerCode=frm_Maintenance_Request.cboPlannerCode.value



strURL = "http://server/Request_test.asp?ClockNum=" & strEmpID & "&CostCen=" & strCstCntrID & "&Problem=" & strProblem & "&EquipNo=" & cboEquipNo & "&EquipNoSel=" & EquipNoSel & "&Priority=" & cboPriority & "&OrderClass=" & cboOrderClass & "&PlannerCode=" & cboPlannerCode
'msgbox strURL
Navigate(strURL)
End Function
-->
</SCRIPT>


Please let me know if there is anything else you need.

Reply With Quote
  #5  
Old January 20th, 2003, 01:59 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 42 m 50 sec
Reputation Power: 184
tnx, this is ´nuff.

the variables are passed via URL get request.
the "%" is the special character for "ascii code follows" and the "#" stands for "display the page starting at the anchor named...."

why tf are you doing this? is this some WYSIWYG editor´s output?
as usual, it is crap....
you want to POST variables, not GET them here. and NO JS AT ALL!

if you really need to GET them (be aware that you can´t transfer more than 1kb and this size depends on the browser being used)...
have a look at http://devedge.netscape.com/library.../1.5/reference/ , somewhere they show a way to "escape" (remember this expression!) URLs.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > allow input of the # and % characters in a textbox


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT