Separate Two Words
I have data where first and last name are in one field. I need help
how to i separate first and last name in ASP.
I have data where first and last name are in one field. I need help
how to i separate first and last name in ASP.
i have a search form that will only search the whole string when
searching a query. i would like to have the search string split into
separate words so that each word could be used as part of a single
query. is there a simple solution to my question ?
a source code regarding a search code like what the big G and Y did on their search box?
say searching two keyword separating with a comma?
using this doesn't help much
Quote: "SELECTfield_1, field_2 FROM table where field_1='" & keyword & "'" & " order by field_2"
I have a single asp page (index.asp) with an include file (include.asp). I would like to query the database with index.asp as well as query it with include.asp.
I searched online, in my "SAMS Teach yourself active server pages 3.0 in 21 days" and it makes no mention of two queries on a single page. Is this even possible?
Ive some records with the same ID on my DB, for example:
ID Name
1 John
1 Paul
1 Anna
2 Susan
2 George
What I'd like to know is how can I list them separated by ID. For example:
REGISTRIES WITH ID 1
-John
-Paul
-Anna
REGISTRIES WITH ID 2
-Susan
-George
i have this css file.
default.css
Code:
#navcontainer ul
{
margin: 0;
padding: 0;
list-style-type: none;
}
when i put both codes at 1 file, everything are ok, but when i separeted them into different files, nothing happened. what's wrong with the code?
I am developping a web-based file browser. Everything so far so good right now.
To make the userinterface more conveniant, I want to split my file list in
pages. with
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder(CurrentPATH)
Set oFolderContents = oFolder.Files
For Each oFileItem in oFolder.Files
(...)
Next
I get a list of all my files in oFolderContents. Is there a easy way to
-split the whole list up in pages of i.e. 20 files
-show general info (i.e. xxx files in folder, listing 20 files on page y/z)
-let the user have the possibility to call the page with index i, where i
stands for the i-th file on the list
any good links out there?
I was wondering is there is a way to neaten up or rather seperate the main layout and the asp codes? For example, to have a main.asp(which is solely the design and layout) and include other .asp files that retrives and records the records.
View Replies View Relatedi need to convert some existing templates into ASP, and have come across a stumbling block (which is probably only due to my complete lack of knowledge of all things ASP related ):
is it possible to include files held on a completely separate domain ? the standards include statement only seems to have file and virtual capabilities, and nothing comparable to php's capability of doing something like Code:
include('http://www.someotherdomain.com/includes/somefile.html');
could anybody enlighten me with some workable code ?
How can I correct an address if the user forgets a space between the number and street name? For example, "1600Main Street" would be corrected to "1600 Main Street".
Is there a way to go step by step from the left and enter a space if I hit a letter or stop if I hit a space?
I have a table with a number of 'advertisements', and each ad specifies a page display location (#1 - #9). I would like to query for all ads, but display them only where they have their location (see image above). I currently have 9 different SQL queries, one for each location:
"SELECT * FROM tb_ads WHERE f_adlocation = 1
I would like to have one query, and at location 1, simply say: "If f_adlocation = 1, then display here. If there is more than one, then repeat as necessary". Here is what my database looks like: I have attached sample data as a .txt file.
I have two sites on my computer. I am using a same page in the two sites.
I set my IE to Korean (testing purpose) encoding for testing
internationalization.
When I hit the same page in two separate sites, one shows the foreign
characters in Korean, but the other shows garbage-looking characters.
I am using the exactly the same page.
I need to get data from a string that is like:
2_1
34_1
126_3
I need the numbers on the left in one string and then the numbers on the right that needs to be in a separate string.
if there's a better way to seperate my asp code from the main layout? like to have an index.asp(solely the layout and design) and just include other .asp files to display the records.
View Replies View Relatedlet's say that I want to highlight some words or even a square of a table in yellow...how would i go about doing that? What code would work to do what I need?
View Replies View RelatedI'm having a problem in displaying a selected option from the drop down list in words. But after I selected an option, nothing is being displayed, I think the value can't be passed at all. Please let me know how to fix it.
<td align=center width=20%>Fruit:
<select name=""FruitName">
<%
" If not myRS.eof Then
while not myRS.eof
%>
<option value="<%=myRS.fields("ID")%>"<%If FId = myRS.fields("ID") Then response.write "selected"%>><%=myRS.fields("FName")%></option>
<%
myRS.MoveNext
wend
%>
</select>
<p>The fruit you have selected is <%=FruitName%></p>
I have a database field that is a memo type. I would like to be able to only display the first 50 words from the database. I would like for it to show ..... after about 50 words.
I am using <%=Content %>. How do I trim this field to show only 50 words and then ....?
I tried the following code:
Function LengthTrim(input, length)
If Len(input) > length Then
Return Left(input, length) + "..."
Else
Return input
End If
End Function
then <%= LengthTrim(Content, 50) %>
But it would not work. I got the following error message:
Microsoft VBScript runtime error '800a01f4'Variable is undefined: 'Return' .
the spaces between the words (in a textbox for example) are removed when i try to pass the value to another page for saving.
View Replies View RelatedI want to take a string like this:Code:
string = "THE RED GIGANTIC AND HUMONGOUS"
and retrieve only the words over a certain length or longer (let's say 5 characters), maintaining spaces between them- result:Code:
string = "GIGANTIC HUMONGOUS"
i am having trouble getting my REPLACE fn. to replace whole words only. basically, i'm running a 'spelling checker' fn. that uses the REPLACE fn. to find incorrect spellings and replace them. problem is, the fn. seems to replace all instances of a string, and not a whole word only as I intend it to be:
Code as follows:
StrInput = Request.Form("BKM_Search")
StrInput = LCase(StrInput) 'convert all to lowercase
StrInput = Trim(StrInput)'trim all empty space b4 & after string
StrCorrect = Replace(a_StrWrong, a_StrRight,1,1,1)
Let's say I want to replace the word "sea" with "ZZZ" only:
Example input: "Sean has some neat sea shells"
Example output: "ZZZn has some neat ZZZ shells"
I have to develop a spell checker from scratch using asp language. as i'm a newbie with asp, there are still a lot of things that i don't understand. How can I add new words to my list of dictionary sorted alpabetically?
Do i need to use the database for this function? Can anyone show me? or if anyone knows of any websites that i can refer to.
Let's say I have the following var:
Code:
strTemp="Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed"
and I am searching the string for another string 'amet', for example. How would I go about getting my page to output the word I search for and say 10 chars to the left and 10 to the right? So, in this case, I'd like to be be able to search the string with any
other string ['amet' for example] and have it output this:
Code:
...dolor sit amet, consecte...
wondering if its possible to have some kind of searched word highlight! IE. every thing it throws up in return of search it will highlight why it has brought it up! so if search "a" all "a" in return results would be highlighted.
View Replies View Relatedis it possible (i heard u can replace) to filter out bad words using regexp? I'm using Replace() but it sucks without ALOT of extra code... but using regexp it seems better, with ignorecase, etc.
How would I do it? O, here's the way it is now:
<%= Decode(ChkBadWrds("Comment")))%>
How would I do something similar using regexp?
how can i count how many words have i written in a text
area?Like taking an example ... i am writing in this textarea
of microsoft usergroup. and say in total i have written 50
words .. how can find out this information?
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"
<TD><INPUT TYPE=TEXT Name=requestor size=12 Value=<%=Name%>></TD>
In the text box, it only show "Sam".
how to capitalise all words in a string that are seperated by spaces. The string is variable and not the same every time hence I cant use the Ucase function as I wont know the exact position of the start of each word.
View Replies View RelatedI would like to have a text box where people can type a word they want and then click on a button to get the description of that word.The way I see it working is if the word they entered in the box is in my database a page will display the meaning corresponding to the word in the database. However if it is not then it will display a message telling them that.
View Replies View RelatedThis code highlights words entirely. I look for the word nation it highlights words like abomination. So I only want the function to highlight whatever I'm looking for. Code:
View Replies View Relatedi have a form where the user keys in words to be searched from the itemDescription column in the database. My search works fine, but how to i bold that particular searched word?
View Replies View RelatedI'd like to add to my search function of my asp site the possibility to highlight in the result pages all the words searched.
View Replies View RelatedI have a small form which searches a SQL DB on several fields - ie.
WHERE Field1 = xxx AND Field2 = xxx AND Field3 = xxx
How can I do this so that if one search criteria is left blank, it ignores it instead of trying to match it in the DB?
how can i transform say 12,000 to "twelve thousand" with asp?
View Replies View Related