User Has Left The Building
How do I register that a user has left the website or page? I'd like to show "users online" and "users on this page" counters.
View RepliesHow do I register that a user has left the website or page? I'd like to show "users online" and "users on this page" counters.
View RepliesI need to be able to execute some code or display a popup when a user leaves the site. Does anyone know if it is possible to detect this? Is there an event that is called before the user leaves where I could put some code?
View Replies View RelatedI'm doing some text manipulation and I'm getting a strange error. My code is:
[vbs]
modT = trim(left(CommandArray(x), inStr(CommandArray(x), "-") - 1))
[/vbs]
CommandArray is an array created by a split() statement (so it contains strings). It's content at the time if execution (if I response.write it) is "Policies -name:Board -public:yes". What I the line above to do is return "Policies". All the math should work out, but I get this error:
Code:
Error Type:
Microsoft VBScript runtime (0x800A0005)
Invalid procedure call or argument: 'left'
buildLinks.inc, line 10
Line 10 is the line pasted above.
Would search for this but forgot what its called? I wanna remove everything from the left of the camma in a variable:
43,7-3-05
to 7-3-05
i got two tables (sDetail and newTable).i'm using a left join to find the dif from the two tables using the pk tutor on both tables . then i need to display the table dif on my browser but where am i suppose to take the result from?
View Replies View RelatedI want to use the two first numbers of a user-input as a flag, but don't know how to get them in ASP... How can I use a function like 'variable = left(user_input, 2)' in ASP?
View Replies View RelatedI am having a problem with the following code:
<%
If Len(TestRS.Fields.Item("Testimonial").value) > 150 Then
Response.Write(Left(TestRS.Fields.Item("Testimonial").Value,150)&""... <br><font size=1><a href=""/Testimonials.asp"">Read More</a></font>")
Else
Response.Write(TestRS.Fields.Item("Testimonial").Value)
End If
%>
I am getting a null response from TestRS.Fields.Item("Tesimonial").Value after it is processed by the Len function.
I am getting the following result: Quote: "... Read More This tells me that the len function is analysing the string to be greater than 150 charachters yet the string is not being expressed.
I am working with two databases. One is dockets which holds all kinds of information about upcoming legal hearings. The second one is additional parties which holds additional records related to the dockets data table.
Not all dockets have additional parties so when I need to display information about a case I may or may not need records from there so I am using a left outer join.
It works perfectly EXCEPT for one small matter. The field that I am joining on (petitionCaseNumber) is turning up empty after the join.
Below is the join.
varSQL = "SELECT * FROM Dockets LEFT OUTER JOIN additionalParties ON Dockets.petitionCaseNumber = additionalParties.petitionCaseNumber WHERE dockets.petitionCaseNumber = '" & numberIn &"'"
When I say something like response.write rst("petitionCaseNumber") I get nothing if I say response.write rst("dockets.petitionCaseNumber") I get an error.
How do I refer to this field or how do I get this field to contain the case number?
I have several checkboxes named in the following format:
chktable_city~20
chktable_state~WI
chktable_zipcode~12312
I need to be able to pull the table names and values from each checkbox name (for example, I would need to pull the "table_city" and "20" from the checkbox above).
In short, how do I pull out the table_city and 20 from the first example. Since the table names and values vary in size, I can't just do a regular mid, left, right function.
I'm trying to pull a value onto my web page from a joining table and all I keep getting is the id instead of the actual value. table_status has has sid and status. for some reason I'm getting the id number instead of the value of the status. this is my error message when I try to join tables. Code:
View Replies View RelatedMany a page has ADO Connection objects that were opened but never closed. The Connection object allocates its own resources when it is opened. When the object goes out of scope without being explicitly closed, the resources ASP allocated for it are freed, but the resources it allocated on its own are not. These eventually clutter up the server and slow it down to a crawl.
My question is, is there a way to track down these orphaned resources and forcibly free them from ASP, without restarting IIS or the server? Or does one have to wait for the unused Connections to time out and release themselves? I know that good coding practice is best, but is there a temporary fix to tidy up these connections left open?
am using an XML feature to web crawl on my provider's site to get a response of an sms message sent. Am using code:
ehioze = left(sResult,3)
However, i only want the results of ehioze only if its numeric characters. and if there are any alphabets, it shoudl exlude it. How woudl this be done ?
I have used thecode which is below to get x characters on to display
<%= LEFT(rsName.Fields.Item("columnname").Value,50)%>
It works fine but when I use this same code to get x characters plus display it using VBCRLF, with the <br> with writing the code :
<%=Replace LEFT
(Recordset1.Fields.Item("Detail").Value,VbCrLf,"<br><br>",50)%>
it gives me error so please can you tell me how can i trim the characaters and at the same time use VBCRLF. why does this above code with LEFT + vbCrLF doesn't work.
When a student taking a quiz having a duration of 2 hrs, a timer will start and keep track the time.
So if he logout or close the window, the remaining time should be recorded into the database. And when he take the same quiz again, the timer will not restart but continue from the previous time.
E.g i take a quiz having a duration of 60mins, and when i logout the time duration remain is 30mins. And when i logon and take the quiz again, the timer countdown from there 30mins but not begining of 60mins.
I am currently having a problem with one of my ASP pages; Currently, in the SELECT, I am using JOIN LEFT functions which work fine (see the code below). However, I have now created a new table which I have successfully linked to the other tables.
However, I am not sure how I would word the JOIN LEFT statement for the new table.
The new table is located at Report.Report I have tried to have a go, but am I missing something? I always get an error message saying, Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error in JOIN operation. Code:
I have a dynamic driven web page which get's a select value from the menu choice.
I querry the database recordset and pull back the correct values.
I want to display them in a grid fashion. I want to limit how many items per page are show in each grid and then I'll use the standard DW behaviors to move to next page, etc.
The challenge I have is making the repeat region go left to right instead of repeating down.
My work has decided to give me the job of building them an intranet. Being pretty new to .NET and ASP in general I was wondering if anyone knew of books or sites I should take a look at that might help me get started.
View Replies View RelatedI built an ASP Form and I'm using CDONTS to e-mail the results to me.
After the user clicks on the "Submit Form" I use ASP to send a ConfirmMsg
back to the user.
At the same time I would like to send back a Hyperlink .
The Hyperlink will take the user back to some other part of the site, For
Exampe I want to send a hyperlin to
http://www.mydomain.com/index.html
I want the link to appear after the Server processes the ASP Form.
Can anyone help me with the ASP code fot a hyperlink.
When assembling an HTML string from a database before sending it to the
client (ie keeping the connection as short as possible), adding to an
existing string (strOut=strOut & strNextLine) takes time and can defeat the
object.
Is putting each line into an array, and re-dimming the array by +1 each time
quicker? Is there a better way?
When i make a menu box i forms(where you can select multiple options) the result from the form will be something like :
value1, value2, value5, value7
How do i easily build a sqlstring like "select * from tablename where record="value1" or record="value2" or record="value5" or record="value7"
Here is a line of code I have:
matchmakerdetails=fullname & " (<a href='javascript:void(0)' onclick='clearmatchmaker();'>Remove</a>)</p>
This works just fine. BUt what I need is to add code to the onclick such that
document.GetElementById("matchmakername")=""
THe darn quotes/syntax are messing me up and I can not get to work. The challenge for me is that this is part of an asp string assignment to a variable called matchmaker details.
<input name="Name" type="text" value="<%= Server.HTMLEncode(Name) %>" size="50" maxlength="50" onchange="GetName(this.name,this.value)"/>
Email Address:
<input name="Address" type="text" value="<%= Server.HTMLEncode(Address) %>" size="50" maxlength="50" onchange="GetAddress(this.name,this.value)"/>
<a href="javascript: UPDATE(<%=rs("Id")%>)"><img src="SomeImage File" border="0"></a>
Code:
I have a database of quotes on my website that uses an Access 97
database (I'm cheap...I have an old copy of MS Office). I have one page
that builds a form <select> from a SQL statement that looks like this:
SELECT DISTINCT last, first FROM quotes ORDER BY last, first;
The results are 1,250 records from a 3,700 record table.
I loop through the records, using each to build an <option> for the
<select>. When loading the page, it gets to the <select> and then it's
like someone issued a response.end, because it just dies after about 3
seconds. and I get an incomplete page; looking in view source it is
literally truncated right before the form <select>.
Of course it works at home, but not on my "production" site.
I've tried all kinds of things like executing a stored Access query as
adCmdStoredProc, but it didn't help. I'm not even sure if that method
was even any faster when I ran it at home.
Is there anything else that you folks know of that I could try, or am I
just going to have to bite the bullet and come up with an alternative
way to let my users select the source of the quote?
I have an old web app that ues an Access database and ASP 3.0. I need to build an INSERT statement based on the contents of a form. What is the best way to handle blank text boxes that are submitted with the form?
For example, I collect all my name/value pairs that are submitted with the form like this... Code:
I am building an application via ASP that uses an MS Access database to hold inventory for large truck dealerships. I have two columns in the database, one for thumbnails and one for regular (about 450 pixels wide) sized images. The columns in the database hold the URL's to the images in the folders.
I need to create a photo upload that accomplishes the following things:
1. Will re-size and rename the photograph regardless of what the user has it named and sized as. I would like to be able to have the code create the thumbnail and the larger image if that is possible.
2. I need to be able to have that photograph attached to the inventory information that goes with it.
I have a very basic page built, but of course, it does not do any of the "fluffy" stuff I mentioned above. I am not very good with VB and most of what I have seen out there is really contingent upon knowing VB. I tried using a 3rd party application, but to be quite honest, it sucked. Having said that, can any of you point me in the right direction toward having the above features?
http://www.mydomain.com/customer.as...st=il&zip=12345
I build the above link dynamically from the customer's input. It works fine
until they put inthe '#' symbol. The result is the string works up to that
point, then breaks. The trailing information is lost. I use the above to
fill-in form boxes. What can I replace '#' with that will allow the string
to continue? ... and of course, be placed in the form box correctly.
I am working on this for someone: the user sees a list of chocolates which they can click on to add to a virtual chocolate box.
Each choc. is represented as an image of the choc - clicking on the image adds that choc. into a db. storing the product id of the selected choc. The user can select 8 chocolates. When the box is full, they can select no more chocolates.
I loop through the db. to display the number of chocs in the cart, like this: Code:
i recently started learning ASP and now i am trying to do some on my home computer.
After doing a few things in my ASP.Net application, i click Build -> Build Solution and then it says this in the output window:
Preparing resources....
Updating references....
Performing main complation....
and then it stays bugged at that section. Then i can go back in build and cancel the building process...
Anyone know what might cause this, my computer is fairly recent and i did re-install Visual Studio .NET to try and fix this problem without any success... I also tried making other applications and it does the same thing...
I have a lot of information to fill out on this form. So I'd prefer not to do the submit to itself everytime to rebuild it. I've seen many java script examples on how to dynamically populate a checkbox, combo box etc. but is it possible just to not have the box there at all?
I've seen a .visible=false on spans in aspx, but can you do something similar to this with plain old asp?
Example, i have a combo box, and let's say i select a few options and write a "on change"..... i call a function that makes an attribute .visible false. Is this possible to make a text box disappear off the page without resubmitting the from? If not, any other bright ideas on how to do this one?
Does anyone have any experience building bar graphs or charts in asp? Or has anyone used a dynamic bar chart generator that is easy to use and easy to integrate into a webpage?
View Replies View Relatedi want to generate the an include file such as
<!--#include file="nav/nav_1.asp"-->
but by calling the number from strNav
<!--#include file="nav/nav_<%=strNav%>.asp"-->
i have several combinations of quotes etc but cant get it to work . is there a way?
I just got a new offer of a company to build them an application framework with a supporting IDE front-end, now the problem is i come from the PHP boards and already checked what Java could do for me but now i find they want it all done in ASP/.net.
Now i know some c# and already read some part's of the books i had at home but i know nothing about ASP, so i bought some books but they cover programming basics which im already familiar with.
Are there any pages that cover patterns done in ASP, schema's or anything i tried the microsoft MSDN page but that's just tooo much information if your not sure of what information you need to contain. Anyway, are there ppl who can send me into the right direction so i can start learning about framework development in ASP or do i need to look further then my nose is long ?
I wish to build a select statement with the "WHERE" part is a variable. I know how to do
Select * FROM table WHERE colum = '" &variable& "' But what if I want the whole part after WHERE to be a variable? with acutal other variables in it.. for instance....
Dim rs, var1, var2, QryString
Set var1 = 1
Set var2 = 2
set QryString = colum1 = '" &var1& "' AND colum2 = '" &var2& "'
rs = Conn.Execute("SELECT * FROM table WHERE QryString")
I am looking for the correct syntax in this case... assume my database connections and such are correct.