Form Field Chars
I have a form where the user enters a customer name, then clicks the submit
button which then adds it to a database. This works absolutely fine untill
the name has an apostrophe in it.
eg when the name entered is O'Hanlon and its submitted, I get this
error.....
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression ''O'Hanlon'
View Replies
ADVERTISEMENT
This will be used for a comments system, comments will be displayed on the front page, and I want the field (Comment) to only display the first 300 or so chars
View Replies
View Related
I have an application that let's the user enter text into a textbox and this
data is collected on the server and stored in a database.
The page is multilingual and sets Response.Charset to the appropiate for the
language, for example gb2312 for chinese etc. This made all texts on the page
show up alright.
However, I did not change the codepage of the page so ASP encoded the post
data sent to the server and I have got really ugly texts for certain
languages.
I have had applications before doing the same thing where the page has been
able to decode the posted characters again when redisplaying them, but in
this case I haven't been able to get anything meaningful from them.
It seems to me that the encoded text depends on the charset used when
entering the text, entering chinese characters when using iso-8859-1 gives me
character codes like Ó’ which probably would be alright to convert but chinese
text that has been entered in the gb2312 charset look like this Code:
View Replies
View Related
I am trying to pass a hidden field value on a form into another field on the
form so that it can then be inserted in the database, to enable me then to
reference that number at a later date.
(The hidden value (1 for example) would then automatically get passed to the
other input field.)
The code for the text field that allows users to type an number into it for
submission to the db is below, but what code do i need within the hidden
field to populate this text field below so that users do not have to type the
number in? Code:
View Replies
View Related
I have a form that has approximately 7 text fields and 1 checkbox.
Generally when this form is submitted(to itself BTW) it works fine,
however, when the checkbox is only field that has been
modified/clicked the form doesn't always submit. When it does work, a
Stored procedure is passed form variables and updates to the db are
made. When it doesn't, its as if the form wasn't submitted, it
reloads and resets the page, but the stored procedure isn't triggered.
View Replies
View Related
My database (.mdb) has a 255 lenght text field, I need to insert the content of a request.form of not a text field, but a TEXTAREA:
---code---
<textarea name="comentario" rows="10" cols="50" wrap="PHYSICAL">
--end-code-
how can I limit the textarea to a max number of characters, like 255?
I think I should use any ASP code and a "there is an error" page, but I dont wonder how to made the sintaxis.
View Replies
View Related
I know we have this thread somewhere, but I can't seem
to find it now
I want to show the first 100 chars of a string, but
I don't want a word to be cut in half at the end, it must
show the whole word then and go a bit beyond 100 chars.
View Replies
View Related
I am having a probem with asp, xml, com while using chinese chars. The chinese letters come out of com fine and they are also fine when i use asp to write to a text file.
When i load the chinese chars into an xml dom they become invalid Chinese chars show as this æˆ'çš,,模æ?¿. but when i doa xsl translation then some of the chinese chars are displayed and some are shown as garbage chars. My ASP Page has the following headers
<%@Language=VBScript CodePage="65001"%>
<%
Response.CharSet = "UTF-8"
Response.ContentType = "text/html"
%>
My XSL has the following header <?xml version="1.0" encoding="UTF-8"?> ..
View Replies
View Related
Part of the content of one of our web pages uses wingdings and Chr(239)
through Chr(242) (which are little arrow outlines, though that's not really
important.)
It worked just fine in Windows 2000 Server, but now under Server 2003 it
seems that characters above 127 get converted somehow, and our code no
longer produces the desired effect.
Does anyone know how to make it send our content without modification, or
how to encode it in a way that it makes it out to the browser with the
intended character value (as opposed to some thoroughly useless conversion
to a 7 bit value)?
View Replies
View Related
I have an ASP function in place to strip invalid chars out of a data store
before I create an XML file of this data, but my function doesn't work on a
certain set of chars.
As far as I can see these are the following:
a) trademark char
b) long hyphen/dash char
c) smart/curly quotes (both left and right)
Even though my function is set up as follows: Code:
View Replies
View Related
I have a string
ASP Code:
Dim address
address = "C:Documents and Settingsob"
How do i delete the first 26 chars of so when i display this on screen it will only display bob and not C:Documents and Settingsob
View Replies
View Related
We try to insert some illegal chars such as "I don't know how to do it" from notes textarea to the DB.
When I insert, it said that "Microsoft OLE DB Provider for SQL Server (0x80040E14) Line 1: Incorrect syntax near 't'." which is "Don't" .
I have tried this: notes= replace(replace(Request.Form("notes"),chr(13)," "),chr(10),"<BR>") But, NO LUCK. How can we make it works?
View Replies
View Related
How do you make a form field's value be determined based on the page URL?I've seen sites that you can change the URL like this (given "UserName" is the name of the field):
Code:
http://www.yoursite.com/page.asp?UserName=baseballdude_
Then when I clicked to visit this page, when it loaded, the value of the UserName field would be preset to baseballdude_.I've tried doing this for one of my sites, but it doesn't work. Is there some way of enabling this?
View Replies
View Related
Ive got a session("name") and the following form in my website:
<form action="updateName.asp" method="post" name="myform">
<label>Name</label><br />
<input type="text" name="Name" size="25" maxlength="60" style="width: 50%"><br />
<br />
<input type="submit" name="submit" value="Update Password">
</form>
How can I equal the value of the form field name with the value of the session so the name will be displayed on the text field?
View Replies
View Related
I'd like to have a counter that tracks # of chars typed... so I don't risk having my message box truncated. Gonna be JS-based huh?
View Replies
View Related
i want to split a string containing unicode chars. If i use Split() funtion of ASP the unicode characters in string it gives wrong results..
Is there any other funtion or anyway through which i can split my unicode string to array?
HERE IS THE EXAMPLE FOR MY PROBLEM ------
i hav string in given form(sepated by a semi colon[;] )
ROOMS = Cap-Haitien;Gonaives;Jeremie;L’Artibonite;Grand-Gouave;
When i split this string using
Split(ROOMS, ";")
it gives me following results
Cap-Haitien
Gonaives
Jeremie
L’
Artibonite
Grand-Gouave
However it shud give me
Cap-Haitien
Gonaives
Jeremie
L’Artibonite
Grand-Gouave
Is there any solution to my problem?
View Replies
View Related
I have a form that users fill in, thefirst field is a username, which
must be unique.Currently only when I attempt the Insert into the DB does the restaint
inform the user that it already exists.Is there any way i can check , let say onblur, if that username exists, so that they dont have to complete the whole form before being
informed?
View Replies
View Related
I have an asp page that has a form and only 1 field which is know as the ID field.
I only want users to enter an Integer value in the field. If they enter anything else it should come up with a pop up box error and not allow them to process the page.
View Replies
View Related
I'm trying to make a simple Feedback Form using that CDONTS thing I read about (in that "How to use CDONTS" thread). Every works like it should until I try to step it up a little and get the information from a Form... Code:
View Replies
View Related
I am trying to create an upload form field in asp. Below is my code. When I try and access the form I get the following error. Does any one know whats wrong with my code
the error I get is
Microsoft VBScript runtime error '800a0009'
Subscript out of range: '[number: 0]'
/cwm/admin/reportrequest.asp, line 105
Code:
View Replies
View Related
We have a shared hosting plan (Windows-based) with GoDaddy.com. GD.com has a
"generic" form mailer script (gdform.asp) that allows us to set up a
"Contact Us" page, which, when the user clicks "Submit" sends an email to
us.
I am a complete newbie re asp, but looking at the code, it looks to me as if
a error is generated if any of the fields are left blank--which is good. I
don't want to be getting emails that don't contain messages, or that don't
contain a return email address.
However, submitting a completely blank form results in me getting an email
with blank response fields.
Can you take a look at this code and tell me if it should be allowing blank
fields to be submitted? Are there any changes that can be made? Code:
View Replies
View Related
I would like to make two field in a for required fields. Do you all know a simple way to accomplish this? I can post form and any asp if needed( page is getting really huge).
View Replies
View Related
I have a form field on an ASP page and was wondering if I can require the number that is entered to begin with a 0 or a 2.If the number starts with anything else,the user is notified to update the number correctly(Your [FormField] must begin with a 0 or a 2, Please update your entry).
View Replies
View Related
Is there an ASP equivalent to Javascript's '...focus.();' that returns focus to a form field? I want to accept input from a user on a form.This input is to be databased and also unique. I want to check the user's input against what already exists in the database. If the input already exists.
I want to generate a pop up dialog box ala javascript and then when it's acknowledged, return focus to the form field.
View Replies
View Related
I'm using MS database editor.When the db is updated ("submit") I want to send an email to an addrss in one of the fields.The db update function works well.
View Replies
View Related
I'm trying to figure out if it's possible to use an email-processing page for different forms.For example, having a feedback as well as a contact form page.When the user fills out the form I would like it to be processed on the next page,which will display all the completed fields as well as email them to the recipient.
I can do this with just one form,but what if I'd like to use the same form-processing script with a different page and then another without having to specify particular form fields.
This is done in CGI.I looked at Matt Wright's formmail script but I don't know if the same carries over to ASP.
View Replies
View Related
I know that the order of from fields from a form post are somewhat random. But, what about fields that have the same name -
<input type="text" name="something" value=""> First Choice
<input type="text" name="something" value=""> Second Choice
<input type="text" name="something" value=""> Third Choice
<input type="text" name="something" value=""> Fourth Choice
First = "bananna"
Second = "orange"
Third = ""
Fourth = "apple"
Will the values, in the delimited list contained in Request.Form("something"), always be in the order they are in the form? That is - bananna, orange, , apple
View Replies
View Related
I have a form F1, once submitted it goes into another form F2, I want the fields in F2 to be filled with the values the user filled out in F1. in php I would use the $_POST[] to get it, but I dont know nothing of asp
and from what I could find on the web, would this work?
Code:
<asp:textbox id="txtLastName" runat="server" MaxLength="30" Width="140px" Height="21px" value="Request.Form('lname')">
and what if they accessed the page directly, rather than through a previous form, would it field appear blank? or do I have to have an if statement. also what if based on the F1 value I want to select (check) a checkbox/radiobutton or drop down menu in F2?
View Replies
View Related
I have a asp form that has a dynamic drop-down box that a user selects a value from. Once the user makes a selection I use the onChange event to capture the selection and pass this value to a vbscript sub.
The sub then makes a adsi query using this value to retrieve additional information. This all works. I used a msgbox to display the retrieved value and it is correct. My problem is how do I update a field on the form with this retrieved value?
View Replies
View Related
I am trying to do some form validation. Is there a way with vb script to change the value of a field on a form prior to submit.
View Replies
View Related
I'm trying to verify a request.form("blah") with a field (value) in a recordset taken from an Access Database. Basically what I'm trying to do is once this NUMBER is entered into the form object (textfield), check a database to see if this number has been used (i.e. in the database) and if so redirect them to an error page.
I thought this would be rtight, but doesn't seem to work
If rsTeddyCheck = Request.Form("PersonalID") then
response.redirect ("Error.asp")
Else
process.asp
End If
View Replies
View Related
I have an ASP page that loops through a SQL Server 2000 table, then
downloads an Excel sheet the users can save, etc. Works fine, except, I see
that in one particular "comments" field the Excel sheet returns a #VALUE!
error in the cell when there is a large amount of text. I've looked through
the MSKB, MSDN and many ng posts to see if there is a workaround or solution
to this, inclduing looking at the xlWorksheet properties (I've tried
'xlWorksheet.Cells(iRow, 11).WrapText = True), played with Orientation, etc.
But to no avail.
View Replies
View Related
my problem is that i load an xml file (which displayed well in iexplorer standalone) with an asp file, and the page displays o instead of ő, u instead of ű, so my central european characters are changed. the xml well formed, and well encoded. i hope ;)
<?xml version="1.0" encoding="ISO-8859-2"?>
<tests>
<test>o</test>
<test>Å‘</test>
</tests>
View Replies
View Related