i have a form where a user will enter their information.... i know how to check if the user didn't enter a value so that they are not redirected to the next page but how to check if the user pressed space and not allow that space character to be a valid character?
I have a webpage with some hyperlink within a button. The problem is that some of my hyperlink is shorter that others and therefore the user must navigate to the hyperlink to click on the link
The thing I want is to make the button more user-friendly user can click anywhere on the button and not only on the hyperlink within the button
In an ASP Page is there a way to have a link that calls another page whose name includes a space? For example, I'd like to be able to call "My Page.asp" by building a href type link the user can click on. The equivalent of:
I’m reading a list of values from a database table a creating a dropdown list on a web page. These are used as search criteria to search on a second table. The user selects and item from a list and then clicks a button to submit the search. All of that works.
Most search words in the list are a single word with no spaces. Some are two words. When that is passed, anything passed second space gets lopped off. Here is the line of code that creates the dropdown box
I tried this, but it didn’t work response.write "<OPTION selected value=" & Replace(sDataSet, “ “, “%20”) & ">" & sDataSet
It replaced the space with %20, and the entire search phrase was passed, but the search failed because the %20 was not converted to a space on the other end. So now I doing the conversion myself after I do the Request.Form. Is there a better way though, to deal with spaces.
My form gets populated from an access database. Now in the database there are fields containg <br>. While in a normal page everything works as it's supposed to, in my listbox the <br> shows as it is. What I would like to do is replace it with a space so I've used this:
i need to combine 2 vriables that are retrieved from a form. idate and itime.i want to put these into the t_date field in my sql db. but for it to work properly, there needs to be a space between the idate and itime. how do i do this? i know i should know this, and i have used it before. but it has been so long, that i can't remember for the life of me.
1. dopage.asp?<% =SessionID=value_here%> is different tha 2. dopage.asp?<%=SessionID=value_here%> ??
Please note that there is a space between the asp tags and the = sign in the first item. I thought ASP will treat #1 and #2 as the same. However it seems that is not the case.
I want to check the disk drive space on a small intranet. Like 30 computers. All have been partitioned and have a D: drive that is shared and is the drive I'm trying to check. This is basically what I have tried:
Code: Dim fs, pcdrive, cdrive, n
Set fs=Server.CreateObject("Scripting.FileSystemObject") Set pcdrive = fs.GetDrive("xx.xx.xx.xxshare01-d")
Response.Write("Share01 Free Drive Space is: " & pcdrive & "<br>")
set pcdrive = nothing set fs = nothing
Is there something wrong with the code or would it possibly have to do with permissions? When this script runs,I get a page cannot be displayed.
I'd like to know how can I make the first letter of every word on a textbox field, uppercase, automatically. I'd like to use this for the Name and Surname field, but I don't know how?
Now that my website is compleate(ish), I am looking for server space(for free) to host it on. A lot of the ones I have seen, for some reason, do not support classic ASP.
Sometimes I am getting the errormessage "Out of string space ". The error occurs on this code:
sBrf = sBrf & sBodyTmp & "par page par "
When this occurs len(sBrf)<100.000 and len(sBodyTmp)<10.000. Also there is about 1,5gb fysical memory free. I am using Windows 2000 IIS5. I tried isolating the proces in IIS to make sure no other scripts are involved, but it doesn't help.
We have a regular ASP page that loads data from a database. It looks "normal" in IE or any other browser. When I print it on legal paper, there is an enormous gap between the header graphics and the first section where data is presented.
If I print on standard "letter" paper, this gap doesn't exist. Is this an issue with ASP or is there something really bizarre going on with my printer or IE? No other applications seem to have problems printing on legal paper.
I have a page that writes a hyperlink to files in a folder, but the hyperlink fails with the space in the filename. How can I strip out that space or replace with ? Code:
I am trying to open Exel file and Csv file from the website. =if sFile name contains white space (test file.xls), the file openining with some error. Error contains some session variable.
my code is as follows.
Response.Buffer = TRUE Response.Clear 'Response.AddHeader "Content-Disposition","inline;filename=" & sFile Response.AddHeader "Content-Disposition","inline;filename=" & sFile If Not GetReportOutputType.EOF And Not GetReportOutputType.BOF Then Response.ContentType = GetReportOutputType.Fields.Item("MimeType").Value End If Response.BinaryWrite( Data ) Response.End Set FileReader = Nothing else Response.Redirect("ReportViewErrorMsg.asp?Mode=FileNotFound") End If filetxt.Close
please see the variable in red, this variable is basically a search string, this works perfect if there is no space in search string, but if there is space like "air condition" then it only takes the first word "air" and leaves the "condition", is there a way i can keep both words together Code:
I have a script that allows you to edit an html page (the html being stored in a database). The problem is that any characters in the html disappear when viewing the page for editing. Is there some way to escape them?
I retrieved some data from the database and put it in a textbox but the words after the blank sapace cannot be shown, why is that? Name = rs("requestor") 'where the name is "Sam Siew"
Does anyone have an example of how to replace all whitespace at the end of a string?
I'm trying something like: do while right(str,1) = " " str = replace(right(str,1)," ","") loop response.write("str:" & str) .... but it is killing off the entire string ...
Could anyone recommend a server provider that can handle asp for a site that will contain roughly 500 pages that won't cost me the earth. The site will be UK based mainly for UK customers. I have found so many but it's tough to tell who is and isn't worth the money.
How would I make this take the first 100 characters (as it is now) but also take the next few letters until the next space. (so that I don't cut a word in the middle.)
how to check got how many commas in this string? how to check beside the commas is space or not space? if the words beside the commas is space, i wan to remove the space? if the words got commas, i have to remove the space.
how i can have a fixed 2 decimal space for price of an item.i have the code shown below but the result shows more than 2 decimal space or even 1 space. Code:
All of a sudden this morning my ASP files started generating the error:
Out of String Space: 'Replace'
These script files have been running just fine for several weeks with no problems. I did review the code and yes the script is calling the Replace function at the line specified in the error information.
I'm puzzled as to why the code would all of a sudden start generating this error ?