I am constantly in need of help, I am back again. I am slowly, slowly getting my page to work. Here is the latest of my queries. I want to automatically make a username by trimming the first character of the first name and taking the entire last name, and putting it in strUserName, I am a little iffy about TRIM (what else is new) rofl. Anyway the user name I want to take the first 3 characters from postal/zip code and the first three numbers from phone number and make the password. Here is what I am thinking of course it doesn't work. BIG SURPRISE!!!
I'm creating a website that will have a page that lists current news items. The news items will be stored in a SQL Server database and will have basically two fields, the date and the news blurb . . . On the main page of the site, I want to have a box that shows "Current News" and only pulls the first 7 or so words from the news blurb followed by a ... [more] where [more] is a link to the current news page.
For example, the database entry may be something like this: Code:
How do i cut the last 4 characters in a string? I know how to cut the 4 first, but i need to cut the last! I have a image name like testimage.gif and I want to cut away .
I have a textarea, that when you insert your cursor into it anywhere except for in the very first line, the cursor falls into the second line. When the form is submitted there is a carriage return at the beginning of the text that I'm having trouble getting rid of.
I tried to Trim() the string both before inserting it into the database and when writing it to the page, but apparently that doesn't strip off carriage returns (even though I've read it does.)
how to use ltrim, rtrim to trim the beginning and end of text entries for extra spaces. I was wondering if there is a way to trim extra spaces from WITHIN a text entry.
does anyone know if it's possible to crop whitespace regions from around the edges of an image using Imagemagick?
I have a whole bunch of signature images (as in, people's handwritten signatures) and I'd like to crop them so that there's no whitespace margin around them. I can do the cropping fine, it's just detecting the color regions.
If I replace "a" with "b", and then I replace "b" with "a", shouldn't I get the same result? That is what I am trying to encode and decode with Replace() function, but it is giving me different things when I replace and replace again. Here is what I am talking about: Code:
I need to do is remove ALL characters after and inc the characters "." found in a variable. i have a variable which holds device with DNS name such as E096064-FWSM2.netdevice.companyname.com
i want the variable to just hold the name E096064-FWSM2 the extension after the first "." can very greatly so i can not specify all possible options as i just do not know what they are going to be.
I make a csv file with values from data base fields . If my value contains a carriage return caracter at the end, a new line is created in my csv file. I tried to replace chr(13) caracter by an empty caracter but it doesn't work, my code is:
I cannot figure out why this won't work, but I cannot get the trim() function to work for me. I tried this test code just to see if I could get anything:Code:
<% String = "This is a string" response.write String & "<br>" Trimmed = Trim(String) response.write Trimmed
And the results are both the same.This is a string. Can anyone think of any good reason the Trim statement wouldn't be working I cannot think of any other common ASP function that isn't working for me.
For i = startCt To endCt ' Get the document title. If it's blank, set it to "Untitled". Dim docTitle,path,desc Dim tObj Set tObj = results1(i) docTitle = tObj("title") path = tObj("vpath") desc = tObj("desc") .......
Now, results1 comes from the ms indexing server.
Problem with some of the results is the title is an empty string, so no link.
If I query the catalog in comp mgnmt, no problems.
So, indexing problem or something else.
I can use the path and get the doc name there if empty.
some text is coming out of the DB with different urls in it, i want to delink it (like href="#" or something), how do i do that when i don't know what url is coming out?
I've got a function that I use to replace ' marks so the page will insert properly into a database - typically I use .Code:
whatever= request.form("whatever") whatever = replace(whatever,"'", "''") However, I've got some code that I unfortunately inherited from someone else that I can't get the replace to work:Code:
call buildquery (colq,valq,retq,"whatever") colq = "(" & colq & ")" valq = "(" & valq & ")" ssql = "insert into table_name " & colq & " values " & valq I was trying to do something in the call buildquery line to add a replace, but that doesn't seem to work.
How do I take out double quotes before writing to database? As doing ,""",""e;" created an error.Is it something like ,chr(34),""e;" which I sort of stumbled accross when I did soem google searching... But what and where do these chr(34) etc coem from?
I have lots of textbox that needs to have data entry. Is it possible for me to replace the tab key to return key that transfers the focus from one textbox to another? And also, how to submit the form after all textbox have values?
Even though I ask customers to enter there phone number like xxx-xxx-xxxx they some times don't. go figure:
I create a text file thats used by the factories EDI system and the number needs to be xxxxxxxxxx. I'm using the code below but what if they enter their number xxx.xxx.xxxx OR (xxx) xxx-xxxx etc. You get the idea.
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've tried EVERY way i can think of to do this replace function, basically when i go to insert "Do's and Dont's into the database it cuts it off at "Do" because of the ' now ill show you my section of code that i have it in currently:
i use the URLencode function and it changes my form text to: this+is+it%21
ok, this is good, but when I use it in a URL, it includes "this" but then the link dies and the rest is just text, the user must then copy and paste the whole address in the browser. Anyway to get around this?
I am not sure if this is a question for this forum or the IIS forum but here goes. I have a dedicated server on which I am hosting about 80 websites at the moment, all of which have been created by copying a template site. All of these sites have an identical structure and are located in the same directory on the server, C:Inetpubvhosts. Several times when I have needed to make an adjustment to the sites I have to go into the remote desktop connection to the server and go site by site, copying and pasting files. For example, as each site has the same pages, ie., map.asp, sometimes I make a change to that page and have to copy it to every site. Could I write some sort of script using the FSO and execute it from one site and have it loop through each site on the server making the neccessary change(s)?
Can someone help with an error? It's a StoreFront store. right after the credit card screen is gives me the error. I get the following:
Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'replace' /ssl/SFLib/incGeneral.asp, line 85
-------------------------------------------- 84 Function makeInputSafe(str) 85 makeInputSafe=replace(str, "'", "''") 86 End Function -------------------------------------------
I'm trying to use the replace function to change a variable ie like this:- replace folder_old, txtOldFoldername,folder_rename
folder_old = c:DocumentsRoot_Testob txtOldFoldername = bob folder_rename = newfoldername
all i want to do is to beable to change the name bob to the new folder, is there a easier way to do this or am I on the right track. if i do the replace like this replace(folder_old, " & txtOldFoldername & "," & folder_rename & ") i get this error:- Cannot use parentheses when calling a Sub