|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
hi
it would help us to know what language you are working in, the platform and also to see some lines of code christo
__________________
. Spiration channels: Free scripts, programming tutorials and articles Dotcut alerts: Online Press cuttings / news alerts Clearprop: UK microlight school, wiltshire Uk dating: UK safe dating with Topdates About Christo . . |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > allow input of the # and % characters in a textbox |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|