I have an array of lets say 10 items, I now want to remove an item, lets say
from somewhere in the middle, based on one of the element values equalling a
value I specify - is there a "clever" and "quick" way of doing this or, will
I need to iterate through it looking for a match, and build another array
where I dont find the match etc...
i have a SQL text field that has linebreaks in it, when i try to display the field in my java/asp script it doesn't work. so i'm thinking i need to replace my linebreaks with <Br>? is that what i need to do? Code:
I have set up a page specifically for printing, however, I would like to be able to choose certain items on the page that are to be ignored by the printer. For example, the web version of the page may have instructions on how to print, although the version that is printed off does not.
I have successfully taken over a number of variables from a .csv file and put them into an .asp page. Unfortunately the .csv file has all these variables enclosed in double quotes i.e "Hello" and appear this way on the .asp page. Is there anyway of removing the double quotes (") from the beginning and end of the variables? I have tried splitting the individual variables on the " with this sSeg2 = Split( var1, """ )
ive checked the text file for it to validate it for removal, if it returns true i need to remove the line and clear that line so new lines can be added in the future. how can i remove a spcified line from the file?
ive got a string where i woulld like to remove the last character it probably seems simple 2 u but i cant work it out can anyone tell me how to remove it.
How do I remove any ASP code from a variable? I've got a variable returning a value with loads of ASP coding inside it and I want to remove that ASP code from the variable (any <% %> tags and anything between it).
Does anyone know of a way where I can remove an attribute from a querystring? For example, say my URL is thispage.asp?view=all&filter=col1 is there a way I can request the querystring but remove the filter=col1 attribute?
I have a database which currently stores a series of urls that are displayed in a page. The title field contains the url and the title text. I use the code below to display the information.
I was wondering if there was a way of putting the url in a script instead of manually having to enter the html for each url for each record. The only field that needs to change is the "id" field.
I have a form that seems to add a comma to the end of the email address, ive looked all over the form for this random comma which i cannot find, the comma is definately there before i perform any sort of email error checks, however ive pretty much given up trying to find where its added, but i was wondering, is there something you can add which removes the last character of a field, before it gets entered into the database, something like a comma?
I'm running IIS on Win2K Advanced Server. My backend database on unix gets suspended each night for backup purposes. This causes problems for the middleware if users try to access the database during this time.
So I thought I'd redirect all requests for pages in my app to a page saying the site is offline temporarily (ten minutes) I'm trying to do this using VBScript, exposing the IIS architecture using
set iisobj = GetObject("IIS://localhost/W3svc/1/ROOT/apps")
where "apps" is the name of the virtual directory where my app resides. I redirect using
I need to remove a period from a string of data. I have a whole column of numbers that have a period distributed randomly in them, and I need a way to pull the period out. Unfortunatly, the period is not at a fixed interval from the start or from the end. Sometimes it's like this: 08307.33214
and sometimes it's like this: 66543354.2213
At any rate, I have a whole column of these in SQL Server 7.0 and need to use the number as is for some issues, but without the period for others.
Can someone please show me how to write a function that will remove the period no matter where it is located in the string?
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:
I have a permission tracking app that I am working on, and I have made the insert page for it. I am having issues on how to prevent duplicates from getting entered.
Currently the interface for the app has a mixture of select boxes, list boxes and checkboxes. The form submits the page to processAIMR.asp and then does the inserting. I am using a loop to insert a new record for each checkbox checked or listbox entry selected. Code:
I have this form that collects text values and I use VBCrLf as delimiters to tell one element from another. Sometimes, I get several empty elements. Is there a way to remove those elements?
I am creating a recordset paging script, however I am having a few issues. I need to remove a certain part of the querystring for it to work properly. i.e i need to remove
mydomain.asp?oParameter=124&oParameter2=87
I can't just do a Replace, because the value of the parameter will change for each page. Is ther an easy way to remove this from the full querystring?
Suppose I have a string of word which I have pulled from my MSSQL database - "Super Fine Quality"
But I don't want to show the entire sentence "Super Fine Quality" in my page. I just want to show the word "Super" only, ie I want to display only the first word of the sentence regardless of it's length.
Without manipulating or doing anything in the MSSQL database, is it possible to remove the words "Fine Quality" and show the first word of the sentence "Super" only with the help of asp code? If yes please let me know how.
I am trying to create a Public function to use throughout my site to remove special characters specifically the single quote my code is below
Public Function RemoveSpecChar(inputString) Dim input input = inputString input =Replace(input,"'"," ") 'response.write(input) RemoveSpecChar = input End Function
I then want to be able to call the function with Call RemoveSpecChar(variable) in my page.
Apparently you can do a window (for want of a better word) without having the vertical scroll bar to the right there, which you get regardless of the height of the window.We are working on pop up message boxes (JS, calling standard ASP), and can't work out how to get rid of the scroll bar. Some one in the office is claiming it can be done, but am at a complete loss how to do it.
I have a form with a <textarea></textarea> to receive user input. This input is then stored in a database and sent by fax... I need to be able to remove the carriage returns (enter key... vbcrlf...) from the input so that somebody doesn't do something like fill the textarea with 100s of keypresses of the enter key and end up spitting out tonnes of blank pages on the fax machine.
I'm having trouble showing images stored in a SQl server database in asp3.0. The images are inserted into SQL server using a access front-end. Access adds ole headers to the image field. These headers prevent images to show in asp. Is there a way to remove these headers using asp?
I have a text box that a user is allowed to enter what ever text they wish. I then take the text store it in a Database, and at a later time print it in a document. All that part I have done. The problem I'm having is I have a client that hits return at the end of their last sentance. When this prints on the document, it sometimes causes an extra blank page to be produced to account for the last carriage return, depending on how much text they have entered. What I'm looking to do is take out any whitespace or un-needed carriage returns at the end of the string.
having problems removing commas from my form input. Have a form that is bringing back text strings from users. when it gets put into CSV file, any commas the user has entered get moved onto new rows.
How would I strip all <a href=""></a> tags from a block of text using ASP?I assume you would need to find "<" and ">" tags, but I am not sure how you would actually remove it from the text.
If I want to remove x-amount of trailing carriage returns from a string in ASP (ie, someone has entered text into a text area and left a few carriage returns) - what's the easiest way to do this?
Trim() only removes white space
Also, I don't want to remove carriage returns within the main body of submitted text.
I have this asp search engine that displays the urls for the files found, only the display shows %20. I need to remove the %20 and display a space instead; is there some way I can mask or remove that for displaying results for users?