I have setup a simple site in which users input data to an access database, and then the database results are shown on another page in a table. One of the fields in the databse is Date Added, using the date/time data type.
I would like the table to show new results with a different background colour for a period of time, say one week? Code:
I've created a little search engine that works fine, but I want to highlight the keywords in an article. Using the replace function is OK, but its not very good when covering different cases. Its fine on single word searches but no good with multiple words. eg. if I search for "dog", I can do a replacement on "dog", "DOG" and "Dog" using the replace function. If I was to search for "black dog", I need to cover all possible variants. ("Black Dog", "BLACK DOG", "black dog", "Black dog", "black Dog") Is there any way of getting this to work?
Ive created a web page that queries a db and i have that all working fine. What i dont have though and would like to be able to do is get the page to highlight rows according to one colums value, ie
Colum1 Colum2 Row 1 50 Test <-- would like to the be highlihted lite blue for instance Row 2 90 Test2 <-- would like this to be highlighted red for instance
I have a SQL query that produces a table which displays account numbers and the amount owed on those accounts.
the page that displays that table is written with ASP. Does anyone know how can I highlight the rows in the table where account numbers have more than 7500 dollars in amount owed? Code:
i am working on an application...where i have to search for a string in the database field or text files.when the search finds the string i want it to be highlighted when it showas the result on the asp page.
eg: iam searching for a skill in the resumes...take JAVA...i want the resulting resume on the asp page with the JAVA string highlighted
I am doing search application in ASP. I want to highlight the matched text in the search result, for that operation I am using the following function Code:
Does anyone use a funtion to highlight search terms (if they have a search facility on their site). Basically, I would be sending the search terms from a form field into a results page.
If there are results I would like the search terms to be highlighted. One problem that I could think while using "replace" is that capitalisation would not be maintained.
I have a simple script which boiled down to highlighting search terms... Code:
if Trim(Request.QueryString("search"))<>"" then cont = Replace(cont,Request.QueryString("search"),"<span style=""background-color:#ff0"">"&Request.QueryString("search")&"</span>",1,-1,1) end if
this worked fine, however if the string I was searching was within an <a> tag, the inevitable would happen and an error would come up. I was wondering if anyone knows a way or if there is a script readily available to tackle this issue?
The very same page has 2 iFrames opening another page called tripledemoduo.asp. So there are 2 tripledemoduo.asp's opening within the 2 iFrames. Within a tripledemoduo.asp page there are the textboxes for inserting the keywords. See the picture.
is it possible to move out the 6 textboxes from the iFrames and make 1 set of 6 instead of 2 sets of 6? That would make my life easier because I use this to compare two texts side by side by searching keywords. For example I put one keyword in red in both iFrames.
i am developing a search engine(ASP with SQL SERVER) for my project . My objective is to search for a data and it should display the result and highlighting the search text in different color. But when i use the search text with more than one word, the result is highlighting only the last word of the search text.
Example - If i search for "Opal" , the search result highlighting all the words with "opal", But when is search "Opal Service", the search result is highlighting only the "service".
Here the "Opal" and "service" are different identities, i will search these two words with AND condition . Code:
I have a problem with Insert statement. Though My SQL Statement executed once only, there are 2 records entered in DB. I am using ASP and SQL Server. Does anybody know the solution?
I want to validate client entries into textbox,checkbox controls etc. can u do this with asp. Like, is there onchange and onclick and so on for these controls?
A different question though. Is it possible to delete duplicate entries, where the email address is the same, and only keep one? i.e.. I got say 4 DB entries, all with the same email address, and I want to delete 3. How do I do this?
Does anyone know what sort of command I need to use so that if someone posts an entry to my database with a primary key that's already been used, the old entry is overwritten by the new one
Is there a way of checking whether two entries in a form are the same? Like when you have to enter your password in twice. I'm not actually sure whether it's asp. Sorry if I've posted in the wrong place.
I have a database for projects. Some managers are responsible for multiple projects. I want to dynamically populate a list of project managers, choose a manager, and display a complete list of his/her projects. I have a few problems 1) I cannot figure out how to list a project manager's name only once in and 2) I don't have a clue how to compile all the projects for each manager so that when his/her name is chosen it will display all the records.
There are a lot of references on the net on how to delete multiple entries in a database by using a checkbox. What I would like to do is add a checkbox to the output of a query (ie. bunch of names).
Then be able to select some of the names by clicking on a checkbox and when submitted, add those checked names to another database (insert). Similar to a shopping cart selecting multiple products but when submitted, it does not add them to the checkout, it adds them to a database as new inserts.
I have made a forum script and I know this is very basic stuff but how do you go about updating a number with an increment of +1.
Access Database - Two Tables - Topic and Replies.
In Topic there is a column called replies. When a user views a topic there is a reply form at the bottom which is processed by reply.asp which add the information entered to the database in the replies field. Also added is subjectid to each reply so I can link the two together.
Either I want to be able to update the reply number in the topic table by +1 in the appropriate subject row (the id is passed on to the reply page) or count the number of alike subjectid's in replies to the subject in topics. What is the best way and how do I update numbers by +1.
i have a registration form in my website. the requests are going to the database (windows 2003 small business server). I have an other page who the entries are displayied. how i can delete the each entry separately with a button?
I tried the following code to save in a variable, the quantity of entries in my recordset:
if rsEntries.Supports(adApproxPosition) = true then strCount = rsEntries.RecordCount end if
It didn't work for me. It's returning a value of -1 and I have close to 100 entries in my recordset. Is there an alternative to this? What code can I use to accomplish that?
I have an ASP app (developed with Interdev 6) which uses a DTC listbox (server-side) bound to a recordset to allow the user to make a selection. This works fine until the number of records in the record set seems to hit a limit (not determined the exact limit, but seems to be c. 400). If there are too many records, the app just hangs until it hits the scripttimeout limit.
I've tried increasing both the command timout (I'm using an ADO command object to generate the recordset) and the scripttimeout to no avail. Does anyone know whether there IS a defined limit on the number of entries in a listbox? Also, any better ideas on how to allow the user to select from a large number of records (> 1000)?
User clicks on a button [BUY NOW], item is added to cart. User can either continue shopping or view cart. The order here doesn't matter. When user views cart, two items are added, the one selected and the last one in the product file. The product file is a CSV file.
The last entry is called BAD-Product. It is a debug entry during site development so the developer knows the product name is entered wrong, i.e. misspelled. If the name was omitted an error would occur so there is a name.
This only happens with Firefox and Netscape. IE experiences no problems. The last entry is not added.
Accidental temporary solution:
In review of the code, a debug line was put in to make validate the product item being returned. After saving the page (.asp add item page), the error disappeared. The debug line was then commented out and the error still has no resurfaced. Code:
I need to loop the recordset and count the occurrences of each entry. The entries will always be numbers.
If entry = 1 then count(1)=count(1)+1 If entry = 2 then count(2)=count(2)+1 ... If entry = 100 then count(100)=count(100)+1
The problem is that there could be 1-100 (or more) different answers stored in the field so coding 100 IFs will work (as long as noone needs to enter 101) but seems silly. How do I create the array above to look something like:
I have a ASP page that returns and manipulates information from an access table. The information it returns is the figures for each month for certain products. Basically the page adds up the results returned from each month and then gives a total for the year so far for each product. So we can view the figues for every year back to 2000 to see how the product did. The problem is that when we choose 2006 it returns no values, and I can't see why. The only difference is that for the months that havnt been completed yet - May onwards, there are no entries, not even a '0'. Would this be a problem when adding using the asp page, adding a number to a returned object that contains nothing?
I have a dbase containing login details for 21,000 members. I also have a forum that I am about to implement.
When the user gets to the main site, he has to login (this is done by checking his credentials against DB1) When he is logged in, all his details are stored in session variables. Clicking on the forum link will take him to the forum where he has to log-in or register. Currently, the forum checks cookies to see if there is a valid name and password and then checks these against it's own DB (herein called DB2) or requires the user to login/register
I plan to modify the forum so that the login is bypassed and the forum accepts the current session name and password as the login. (This is so that all names on the site main site, chat, forum etc are uniform, i.e Dave47 in a chat room, is Dave47 in the forum, is Dave47 in the members area etc)
so...what I need to do (if you're still with me) is.
When a new user registers on the main site, his details are put into DB1 *and* DB2. , can I have two data sources open at once?
The reason I need two DBs is that the information in DB1 is a lot less than is needed by the forum in DB2.
Also how can I copy selected fields from DB1 (name, password for existing users) into DB2? like I said..there's 21,000 and to do it manually would take forever.
Does anybody have a nice method of forcing a user to enter a value into a form using asp?
I think the best is to have a popup when they hit submit that will stay on the same page and then just alert the user to enter something in so and so text box.
I have a database that is for E-Cards. I want it to delete all of the entries that are more than a month old. I have the date stored in a field called "dags" (without the quotes). Please help me on this!
******************************************* Also, I would also like to have an option for "Send the E-Card Later" and then have the options possible dates. What script(s) could I use to do the actual sending on a later date? ********************************************
I have aproblem to transfer a data from table x to table y based on id. Its mean when 2 table have same id all data table x must move to table y. I don't know which command need to use is it insert into or update?
<% Dim conn Dim rs Dim MYSQL,MYSQL2
Set conn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") Set cmd = Server.CreateObject("ADODB.Recordset") conn.ConnectionString = "DSN=prmm;UID=administrator;pwd=sa" conn.Open