Recover lost identity password
I am using OE6. Instead of using the Main Identity, I'm using another one;
it helps cut down the spam. Somehow it switched back to the Main Identity
(I didn't fiddle with it) and the other is password protected. Either I
have forgotten that password or it isn't responding. How can I recover the
password, which is where all my legitmate email is found?
Thanks
Mike Tag: Version Control Tag: 323749
Am I likely to cause an error?
Hi all,
I have some code which compares values in a recordset to that in an array.
If it finds a match it needs to remove the item from the array.
My concern is that my method for removing the item from the array is by
iterating through it, if it doesn't match then I place the value into a
"temporary" array, after all comparisions are completed I then set the
original array to equal the temporary array.
Am I likely to generate an error if my internal looping of the same array
changes the array size, whilst still iterating through it..
eg..
For x = 0 to ....
if comparision is true then
for y = 0 to ....
if comparision is false then
' add value to temporary array here
end if
next
array = temporary array
end if
Next
My feeling is that this will go mammories up...
Regards
Rob Tag: Version Control Tag: 323737
How do I find smart quotes?
Hi all,
I'm wondering if there is a way to find (to strip or process) smart quotes
in text submitted via a form?
These don't work:
strOutput = Replace(strOutput, "â??", "â??") ' left smart quote char as
replace value
strOutput = Replace(strOutput, Chr(147), "â??") ' my best guess at where the
left smart quote char is in the charset
I guess the real question is if I submit the page as Unicode is there a way
to process it as cp-1252?
--
Sean. Tag: Version Control Tag: 323735
CDO.Message sent whenever page loads, though the form not submitte
The script below works fine if the form is filled out and submitted.
But a (blank) e-mail is sent whenever the page loads, even when the form is
not submitted. I would like to receive the e-mail only when the form is
submitted
<%@LANGUAGE="VBSCRIPT"%>
<%
Set MyMail=CreateObject("CDO.Message")
MyMail.TextBody=Request.Form("name") & vbCrLf & _
Request.Form("email")& vbCrLf & _
Request.Form("phone")& vbCrLf & _
Request.Form("palaver")
MyMail.From=" rate_al@yahoo.com"
MyMail.To="arte@gmail.com"
MyMail.Cc=""
MyMail.Bcc=""
MyMail.Subject="cosas de cuero"
MyMail.Send()
Set MyMail=Nothing
%>
Part two: The script below could be part of the problem. It is in the html
body below the closing form tag </form> and works when the form is submitted,
but I would prefer not to use it, but instead to have a redirect to a
confirmation page.
But if I use "response.redirect", the page with the form never opens. Only
the confirmation page opens.
So I have two questions, and am obviously a novice.
This forum has been a lifesaver in the past
Thanks
Alan Lipman
alegrate_al@yahoo.com
calipasofino@hotmail.com
<%
dim email
email=Request.Form("email")
If email<>"" Then
Response.Write("Hello " & email & "!<br />")
Response.Write("We have receved your submission")
End If
%> Tag: Version Control Tag: 323732
Second form validation problem
Hi
I have two forms on my page. Both use javascript to validate input before
submission. Problem is that first form does the validation fine but the
second form gets submitted without any validation taking place. Simplified
form of code is given below.
What am I doing wrong?
Thanks
Regards
<html>
<head>
<script type="text/javascript">
// <![CDATA[
function validate()
{
// validation code here, which works fine
}
function valid1()
{
f=document.getElementById("Form1");
if(f.StaffCode.value<>"HS01")
{
alert("Invalied code. Please re-enter.");
f.StaffCode.focus();
return false;
}
}
// ]]>
</script>
</head>
<body>
<!--This form validates fine using function validate-->
<form id="theform" method="post" action="abc.asp" onsubmit="return
validate();">
<input type="hidden" name="mode" value="1">
<input type="text" name="muser" id="muser" value="" size="20">
<input type="password" name="mpass" id="mpass" value="" size="20">
<input name="bu_submit" type="image"
src="images/box/bu_login_sm.gif" border="0"
class="noborder" style="height: 31px;">
</form>
<!--This form does not validate using function valid1-->
<form id="Form1" method="post" action="xyz.asp" onsubmit="return
valid1();">
<input type="text" name="StaffCode" id="StaffCode" value=""
size="30">
<input name="bu_submit" type="image" src="images/box/bu_login.gif"
border="0" class="noborder"
style="height: 31px;">
</form>
</body>
</html> Tag: Version Control Tag: 323728
how asp handle primary key violation and re-try insert statement?
The ASP application inserts transaction records in transaction table
with the system time as the primary key. However, it is possible to
have primary key violation because the records in transaction table
come from different sources. The application can show error message and
the user can file a transaction again manually, but I want the
application can have multiple re-tries to perform insert statement
until there is no primary key violation.
Here's the code, but I get stuck what code should i put to re-try the
insert statement, a for loop?and perhaps re-try 3 times before showing
the primary key violation error message to the user?
<%
set conn = CreateObject("ADODB.Connection")
conn.open "<connection string>"
sql = "insert into p_tran values (convert(varchar, GETDATE(), 109),
amount)"
conn.execute(sql)
if err.number <> 0 then
Response.Write err.description
end if
conn.close
set conn = nothing
%>
Errors
========
Microsoft OLE DB Provider for SQL Server error '80040e2f'
Cannot insert duplicate key row
Please advise. thanks!! Tag: Version Control Tag: 323719
Using cdate function to display data under criteria
Hello -
I'm new to the groups here, so bear with me :) I am trying to
change an existing function that currently only displays records that
fall under a criteria of
NOT(now>cdate(OTDate & ' 2:00 AM')
If I wanted to change this function to display entries that are before
6:00 pm the day before the OTDate, how could I modify this part of my
code? should is be something like this...
NOT(now>cdate((OTDate -1) & ' 6:00 PM')
Thanks
D Tag: Version Control Tag: 323716
Displaying image data from SQL...single/multipart tiff
An application is logging faxes sent in SQL2000 image column type. I have
found code on the net but what it is doing is prompting to save to local
which is fine for single page image. Not good for multiple page faxes. I
have not been able to locate an example to load in the browser or how to
handle multiple image in the one column.
1) Ideally it would be nice to display back in the browser since some may be
multiple images. I am not a programmer but any help is appreciated..
<%
Dim strAttachID
strAttachID = Request.QueryString("AttachID")
Dim objConn, objRS, strSQL
adoconnectstr = "Driver={SQL
Server};database=faxmakerarchive;Server=XXXX;uid=XXXX;pwd=XXX;CommandTimeout
= 180"
set objCon = server.CreateObject("ADODB.Connection")
set objRec = server.CreateObject("ADODB.Recordset")
objCon.Open adoconnectstr
strSQL = "SELECT attdata FROM fm_faxout_att WHERE ID ='" & strAttachID &
"'"
objrec.Open strSQL, objCon
Response.ContentType = "image/tiff"
'Response.ContentType = "application/pdf"
Response.BinaryWrite objrec("attdata")
objrec.Close
Set objrec = Nothing
objCon.Close
Set objCon = Nothing
%>
TIA!! Tag: Version Control Tag: 323715
Passing chinese characters
How do I Pass chinese characters, charset GB2312 and BIG5, from Form to
SQL using asp?
My field in SQL is already set to nvarchar.
Any help is much appreciated.
Thanks. Tag: Version Control Tag: 323714
XSl transformation not happening in asp page
Hi Gurus,
I have a problem with the way my output gets displayed in my asp page
I have the UI in ASP which asks for input from a user on the asp page
and then passes that data to a perl file which further processes it and
passes it back to the asp in an xml format
Finally the asp page has to open the output in html in the same page.
The created xml file has the details to the xsl stylesheet .
but presently the o/p gets diaplyed in an xml format in the asp and not
in a html format
<?xml version="1.0"?>
<?xml-stylesheet .......
<component>.....</component>
I do know that when this output file is opened in a browser it is a
neatly (xsl) transformed page
how do i make the output also appear the same way in my asp page
can i force the asp to understand it as a html?
I am presently doing this in my asp
Response.Write "receive: "&objXMLHTTP.status&"
"&objXMLHTTP.statusText&"<xmp>"&objXMLHTTP.ResponseText&"</xmp>"
Please advise
Thanks in advance
Nivi Tag: Version Control Tag: 323713
Recordset Grouping
I am stumped as to how to do what appears to be a very simple thing.
Want to display the results of a query containing fields ID and Item,
grouped by the ID. I only want 1 instance of the ID to appear on the
page as a header for each group. There are 10 IDs in the query
results. Thought I could use <% Response.Write (rsName("Item")) WHERE
ID=1 %>, but doesn't work. How else could I accomplish this? Thanks
for any help--I only have very basic ASP knowledge. Tag: Version Control Tag: 323707
How to pass a string between ASP pages
Hello All
Could anyone give me some suggestions on passing a long string between
ASP pages?
I have three asp pages - h_email content.asp, h_process_email.asp and
h_preview_email.asp
In the h_email_content.asp, user can enter their To, CC, From, email
content and other information. In this page, there are two buttons at
the bottom- "preview email" and "send email".
Inside the h_process_email.asp, there are some logics on controlling
email content and sending conditions as well as saving data into
database.
I put a condition in h_process_email.asp for redirecting to
h_preview_email.asp (response.redirect "h_preview_email.asp") if the
user clicks the "email preview" button.
If I want to transfer the email addresses and content from
h_process_email.asp page to h_email_preview page, how can I do it?
P.S I can't change the ASP structures i.e I have to keep them in three
pages.
Cheers
Bon Tag: Version Control Tag: 323697
Session Variables
Hi all,
Does a users browser need any specific settings turned on in order for these
to be stored? ie, is there something *I* could disable in my browser which
would prevent session variables being stored from my web site (ref: asp
shopping cart).
Regards
Rob Tag: Version Control Tag: 323693
Force a download
how would i for a browser to download a file (specifically mpgs)
i can get it to go for small 4mb files, but the larger ones if they do go,
take bout 15 mins to even begin the download.....
any help greatly apprecitated! Tag: Version Control Tag: 323690
Help with ASP on Win2K server
Our web server crashed and I had to move all web sites to backup server.
Installed Internet service and it appears to work OK on html files, but ASP
files are not functioning - what is wrong? I have lost so many brain cells
that I need a fresh mind to see the obvisous.
Did I miss installing something?
Thanks
Tom Tag: Version Control Tag: 323688
Forcing a reload?
Hi all,
I've got a little shopping cart app which when you use all of the links on
the pages, and buttons etc, things are good, the "shopping basket" on the
left navigation updates and shows a sum of items and cost.
However, if you arrive at the home page for example, proceed to the products
page, add an item and then click "back", you get a cached page.
I appreciate there are some lines of code I can use, both ASP and html to
prevent the cachine, but what I dont want to incur instead is that error IE
(and other browsers too I guess - how very Microsoft of me :o) ) - shows
when the page has expired, I think that would probably be worse than the
cart not showing any items (or not showing the update) until a link was
pressed...
Anyone got any ideas?
Regards
Rob Tag: Version Control Tag: 323685
Request.Form returns nothing
Hi all,
Iâ??m using IIS6 for our college Intranet and Iâ??m having trouble using
Request.Form. Here is my code:
<%
If Request.QueryString("action") = "show" Then
Response.Write "title: " & Request.Form("NewsTitle") & "<br />"
End If
%>
<form action="/_admin/blogs/test.asp?action=show" method="post">
<input type="text" name="NewsTitle" />
<input type="submit" value="Add" />
</form>
The page refreshes and generates the following HTML:
title: <br />
<form action="/_admin/blogs/test.asp?action=show" method="post">
<input type="text" name="NewsTitle" />
<input type="submit" value="Add" />
</form>
The Request.Form(â??NewsTitleâ??) is empty. Iâ??m sure my HTML and ASP/VBScript
is ok, Iâ??ve been writing for ages, but Iâ??ve never seen it do this before.
Request.QueryString works fine.
After some Google searches some have hinted at Integrated Windows
Authentication being involved. The page in question doesnâ??t have any
authentication.
Any ideas?
Thanks in advance â?? and if this is the wrong newsgroup could you point me in
the right direction.
Steve Tag: Version Control Tag: 323669
Mailing App Duplicate problem...
Guys,
I've written an email sending script to mass send to our database - some of
our subscribers are subscribed to multiple list, and so when selecting the
entire database, I want to ensure I don't have Duplicates.
To avoid this, I am selecting the recordset of all users, ordering by Email
address, sending the email, moving onto the next record and then starting a
loop to keep looping until the email address is different, but it doesn't
work... see example below...
-----------------------------------
Do While NOT RS_RecipientsForCampaign.EOF
SEND THE EMAIL HERE...
RS_RecipientsForCampaign.MoveNext
If NOT RS_RecipientsForCampaign.EOF Then
** Do While TheUsersEmailAddress =
RS_RecipientsForCampaign("Email") AND NOT RS_RecipientsForCampaign.EOF
RS_RecipientsForCampaign.MoveNext
Loop
End If
Loop
-----------------------------------
When running, the script works fine, BUT I get an Unspecified error (I HATE
that message) at the end of the script, pointing me to the line number
marked with ** above.
How can I cure this? I've tried everything but need a solution to amend this
section of code that works!!
Cheers, Ash Tag: Version Control Tag: 323661
AddHeader Content-Disposition Has no effect
I have a IIS web site that works fine on one server but not another. I
do not know if the problem is an IIS setting or something else so I
will try to include as much detail as I have figured out so far.
Several web pages allow the user to download PDF files to be viewed or
saved locally on the user's machine, not in the browser. Those web
pages all redirect to a single ASP page with QueryString parameters
identifying the relative path to the desired file on a remote server.
The redirect URL would be something like:
download.asp?Src=Statements\2006\01\123456789
My download.asp code looks something like this:
=================================================
Dim strSourceName
Dim objDocServer
' Retrieve the path to the desired document
strSourceName = Request.QueryString("Src")
' Call remote COM+ application and retrieve document as binary stream
Set objDocServer = Server.CreateObject("DocumentServer.Application")
Set objDocServer.Document = objDocServer.getDocument(strSourceName)
With Response
.Buffer = True
.Clear
.ContentType = "application/pdf"
.AddHeader "content-disposition", "attachment; filename=test.pdf;"
.BinaryWrite(objDocServer.Document)
End With
=================================================
When I try to download a file, the browser shows the File Download
dialog asking me to Open or Save the file but it shows the File name as
"123456789" rather than "test.pdf". It also shows a blank value for the
File type. Whether I choose Open or Save the same error appears:
Internet Explorer cannot download 123456789 from <server>.
Internet Explorer was not able to open this site. The requested site is
either unavailable or cannot be found. Please try again later.
If I comment out the AddHeader line, the File type shows correctly as
Adobe Acrobat Document.
If I change the AddHeader to inline rather than attachment, I see the
binary data in the browser.
This exact code works fine on another server and I have no idea why it
will not work on this new server. What I find interesting is that the
download wants to name the file as 123456789 which comes from a part of
a QueryString value and nowhere else. Could this have something to do
with the "\" characters in the QueryString being confused as path
delimiters by IIS/ASP?
Any ideas or help are appreciated!
Michael Tag: Version Control Tag: 323655
Page cannot be displayed in release mode
Hi,
I am pretty new to asp.net, and have recently taken over a project. I have
gotten to the point where I am about to release my changes, but for some
reason when i build the project in release mode and launch in in IE I always
get a "The Page cannot be displayed" page instead of my login form.
Anyone have any ideas? The applciation works fine in debug mode, its just in
release mode that this happens.
Regards,
Joel Tag: Version Control Tag: 323654
Regular expression problem
I want to search a string of HTML and insert a querystring into any url
where the url is an asp page and is either a local link /folder/page.asp or
of a specific domain http://www.somedomain.com/folder/page.asp. It needs to
be able to handle plain links and those with querystrings already in there.
I could do it with instr functions etc but I thought this might a good time
to brush up on regular expressions. Can anyone point me in the right
dirction? Regards. Tag: Version Control Tag: 323647
ServerXMLHTTP, session and cookies
I try to use ServerXMLHTTP object to get the session infomation from a
remote webpage, but it always returns nothing.
the follwoing is my code:
*local.asp*
url = "http://domain/remote.asp"
set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
Response.write xmlhttp.responseText
set xmlhttp = nothing
*remote.asp*
bLogin = Session("login")
sUserName = Request.Cookies("username")
Response.Write(nUserID & " " & sUserName)
although the session and cookie are not blank, but I cannot received any
info. please help me, thanks a lot. Tag: Version Control Tag: 323645
Displaying Progress on An ASP Page
Hi - I have an ASP page - that will be making about 7 calls to a
database.
What I want is to show progress to the users so that they can tell each
database call is in progress.
The asp calling page works fine, but it only displays when the entire
process has been completed.
What I want is to be able to show dynimically - step 1 done; step 2
done; etc.
Any thoughts? Tag: Version Control Tag: 323641
String Manipulation
I have a text string which comes from a form containing the article text in
a knowledgebase. Sometimes people enter http links in their text however
when they show on the webpage they do not show as hyperlinks, because
obviously they don't gave the link tags around them.
What I'd like is to manipulate this text string so that wherever there is
http in it it put's the link tags around it. So what I'm really asking is,
how can I convert this string:
And to get to the blah blah site please go to http://blah-blah.com and you
will find lots of blah blah there.
Into this:
And to get to the blah blah site please go to <a
href="http://blah-blah.com">http://blah-blah.com</a> and you will find lots
of blah blah there.
It needs to be versatile as they may enter more than one http link within
the text.
Any help appreciated!
Sergio. Tag: Version Control Tag: 323640
Get value on page refresh
I have a simple page that has a dropdown and I need to populate a
textbox with the onchange event. How can I do that? My page refreshes,
but I don't know how to 'get' the value of the dropdown. Here is some
of my code.
<form name="ClassForm" method="Post" action="ClassEdit.asp?m=c">
<td><div class="textB">Location:</td>
<td><select size="1" name="LocationID"
onchange="document.ClassForm.submit();">
' Generate choices for Location pull-down box. An inactive location
will be flagged with *.
query = "select ID as Result," _
& " case when City is not null and City <> '' then City + ': ' +
LocationName else LocationName end as Choice," _
& " case when IsInactive=1 then '*' else '' end as Flag" _
& " from LocationTop order by City, ListOrder"
GenerateOptions Conn, query, sLocationID
</select></div></td>
</tr>
<tr>
'Max Registration will be prepopulated with Location dropdown onchange
event
<td><div class="textB">Maximum Registrations:</td>
<td><input type="text" name="MaxRegistrations" size="3"
value="????"></div></td>
thanks in advance Tag: Version Control Tag: 323634
status of ASP .NET
I'm looking at C# and ASP .NET these days.
Visual Sudio 2005 looks like a neat dev. env.
But before committing, I would like to know more about the current
status of these tools.
I noticed, that my site hoster does not support ASP at all.
And more providers do not...
PHP however, IS supported a lot, but does not have anything like .NET
facilities, does it ?
What is the status of the language wars these days ?
ASP is still the way to go ?
What is the market doing ?
fr gr
Erik Tag: Version Control Tag: 323631
reading XML
Hi,
I'm currently trying to display a XML file within a ASP page, although
get the following error when trying to select one of the notes... the
node is called: <content:encoded>
This is the error
Reference to undeclared namespace prefix: 'content'.
This is my code
<%@ Language="VBScript" %>
<html lang="en">
<head>
<title>Some feeds</title>
<script runat="server" language="VBScript">
Sub OutputFeed (feedURL)
Dim XmlDocument
Set XmlDocument = Server.CreateObject("Msxml2.DOMDocument.4.0")
XmlDocument.setProperty "ServerHTTPRequest", true
XmlDocument.async = False
Dim Loaded
Loaded = XmlDocument.load(feedURL)
If Loaded Then
Dim Items, Item, Title, Link, Description, TitleText,
DescriptionText, LinkURL, Content2, Contenttext
Set Items = XmlDocument.selectNodes("//item")
Response.Write "<p>Feed from " & feedURL & " has currently " &
Items.Length & " items.</p>" & VbCrLf
Response.Write "<ul>" & VbCrLf
For Each Item in Items
Set Title = Item.selectSingleNode("title/text()")
If Title Is Nothing Then
TitleText = ""
Else
TitleText = Title.data
End If
Set Link = Item.selectSingleNode("link/text()")
If Link Is Nothing Then
LinkURL = ""
Else
LinkURL = Trim(Link.data)
End If
Set Content2 = Item.selectSingleNode("content:encoded")
If Content2 Is Nothing Then
Contenttext = ""
Else
Contenttext= Trim(Content2.data)
End If
Set Description = Item.selectSingleNode("description/text()")
If Description Is Nothing Then
DescriptionText = ""
Else
DescriptionText = Description.data
End If
Response.Write "<li><a href=""" & LinkURL & """>" & TitleText &
": " & DescriptionText & "</a></li>" & VbCrLf
response.Write contexttext
Next
Response.Write "</ul>" & VbCrLf
End If
End Sub
</script>
</head>
<body>
<h1>Some feeds</h1>
<%
OutputFeed("http://www.biblegateway.com/usage/votd/rss/votd.rdf?31")
OutputFeed("http://rss.news.yahoo.com/rss/elections")
OutputFeed("http://www.cbsnews.com/feeds/rss/main.rss")
OutputFeed("http://rss.cnn.com/rss/si_topstories.rss")
%>
</body>
</html>
Thank you for your help Tag: Version Control Tag: 323625
compare text document versions?
Can anyone point me to a tutorial or example code of how to write VBScript
(or VB6) code that could look at two versions of a document and mark all
differences between the two?
I am working on a project for a newspaper. the goal is to be able to store
each version of an article from rough draft to final copy, and look at any
two versions in the process and see what changes were made.
Thanks.
Paul Tag: Version Control Tag: 323624
Urgent Please help..
Hi all. Can anyone help me here. I have loads of .sql files and i need
a way to call these from my asp page so the user can run them from the
browser. Meaning i have a page with a list of all scripts. each when
clicked i am able to run the script. so HOW and what do i do to call
and run the .sql
Thanks Tag: Version Control Tag: 323599
Google Maps API
Anybody have any experience with plotting map points with Google Maps
API from an Access DB?
I have a database with about 90 locations that I would like positioned
in the Google Maps. I found a cool tool to get the long and latitudes
to complete the database, now just need to figure out how to get all
that data to appear on the maps.
All guidance appreicated. Tag: Version Control Tag: 323597
how to detect submit on input type=image if no image found
Normally I would do something like
if request.form("submitbutton.x") <> "" then
...
end if
But I found a problem when the browser uses the 'alt text' instead of
the image (when the image is not found, or if the browser is not
displaying graphics, etc. How do you detect that? or should I? Tag: Version Control Tag: 323594
IE, embedded WMP 9.0: double GET request
Hello,
I have the following problem.
The Windows MediaPlayer object is embedded in an ASP page:
--- test.asp ---------------------------
<%@ LANGUAGE=VBScript enablesessionstate=true LCID=1033 %>
<% option explicit %>
<html>
<body>
<h2>TEST</h2>
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
src="test2.asp?fn=test.wav"
width=320
height=69
name="MediaPlayer"
autostart="False"
ShowStatusBar=1
ShowDisplay=0
ShowControls=1>
</embed>
</body>
</html>
-------------------------------
The src parameter of the MediaPlayer object references to another ASP
script
which returns WAV file as a binary stream:
--- test2.asp ----------------------------
<%@ LANGUAGE=VBScript enablesessionstate=true LCID=1033 %>
<% option explicit %>
<%
Dim fn
fn = Request.QueryString("fn")
if not isNull(fn) and fn <> "" then
Dim vpath, path, strExt, strContentType
vpath = "logs"
path = Server.MapPath(vpath)
strExt = LCase(GetFileExtension(fn))
if strExt = "mp3" then
strContentType = "audio/mp3"
else
strContentType = "audio/wav"
end if
Dim strFilePath
strFilePath = path & "\" & fn 'This is the path to the file on disk.
Dim objStream
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
objStream.LoadFromFile strFilePath
Response.AddHeader "Content-Type", strContentType
Response.AddHeader "Content-Disposition", "inline; filename=" & fn
Response.AddHeader "Accept-Ranges", "bytes"
Response.AddHeader "Content-Length", CStr(objStream.Size)
Response.BinaryWrite objStream.Read
objStream.Close
Set objStream = Nothing
end if
Function GetFileExtension(fn)
Dim strExt, intExtPos
strExt = ""
intExtPos = InstrRev(fn, ".")
if (not IsNull(intExtPos)) and intExtPos > 0 then
strExt = Mid(fn, intExtPos + 1)
end if
GetFileExtension = strExt
End Function
%>
-------------------------------
For some strange reason the web site receives 2 get requests:
one from the MediaPlayer object and the other from the browser itself:
2006-07-03 08:44:32 192.168.X.X - 192.168.X.X 80 GET /test.asp - 200 0
1018
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322)
2006-07-03 08:44:32 192.168.X.X - 192.168.X.X 80 GET /test2.asp
fn=test.wav 200 0 119682 Windows-Media-Player/9.00.00.3250
2006-07-03 08:44:32 192.168.X.X - 192.168.X.X 80 GET /test2.asp
fn=test.wav 200 0 119682
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322)
However, if the src parameter references a direct link to
a static WAV file on the server (src="test.wav"), then the browser
sends one GET request (form the MediaPlayer):
2006-07-03 08:45:05 192.168.X.X - 192.168.X.X 80 GET /test.asp - 200 0
1005
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322)
2006-07-03 08:45:05 192.168.X.X - 192.168.X.X 80 GET /test.wav - 200 0
119635 Windows-Media-Player/9.00.00.3250
How can I eliminate the extra request? Tag: Version Control Tag: 323584
How to do email preview on ASP?
Hello All
In my ASP page, I use CDONT to send email to client. But, I need to
allow user preview and edit the email content before sending it out.
Any advices?
I have two ASP pages - h_email.asp and h_email_action.asp
Inside the h_email.asp, I create a form and allow user to input
information for the email.
In the h_email_action.asp, it contains asp code for extracting fields'
value in h_email.asp and store them into database as well as send
email. All fields' value will be created as a string for the email
content.
Could anyone give me some suggestions?
Best Regards,
Bon Tag: Version Control Tag: 323581
Upload the data into acess database from excel file
Hi,
I want to download and upload the data from acess database into excel
file or from excel to database. So how can i use "Excel.Application" to
do this type of job.
So please help me soon.
Thanks
Pk Tag: Version Control Tag: 323580
newbie: client and server
Hi
If I save the client form and all its component in html format in my
harddisk, and then open and fill out the form locally and submit, will the
server process it and return the information as usual?
Thanks Tag: Version Control Tag: 323574
Protecting ASP Applications: Need Opinions
Hello All,
I've finally written an asp app that is worthy of resale and would like to
hear from you who have done the same. What is the best way to protect my
application? I would like to stay away from anything that has to be
registered on the server as most of my target audience will not have
physical access to their web servers. They will just upload the code to
their server and set directory permissions for the database.
I 've purchased asp scripts myself in the past and had to provide a domain
name where it would be running. It would not run on any other domain but the
one I provided. Is this a practical approach or is there a better way? How
is it done? I've also seen posts about putting some of the vb code into an
activeX dll. Is this a solid solution? Again, How is this done?
I appreciate anyone sharing their experience...
Thanks in advance,
-Bill- Tag: Version Control Tag: 323573
Execute .sql scripts from ASP
Hi all. Can anyone help me here. I have loads of .sql files and i need
a way to call these from my asp page so the user can run them from the
browser. Meaning i have a page with a list of all scripts. each when
clicked i am able to run the script. so HOW and what do i do to call
and run the .sql
Thanks Tag: Version Control Tag: 323572
Time in combobox
Hi,
I need to display the time in combo box like the one we have it in
Windows 2000.
we can change the time using the arrow.. it looks like this:
4:40:54 PM
in a text box .
i need to do it like this in my page.
waiting for ur response.
Ciao,
jay Tag: Version Control Tag: 323569
Save value in the database
Hi Everyone,
I have a main window which has a form in it. Inside the main window
there is a button, which when clicked opens a pop window
(showModaldialog window). Inside that pop window I have a checkboxes,
which user can check. When he is done selecting them, He clicks on
"Done", which is of type button. My problem is when user clicks on
Done, I am not able to retreive the values of the check box group. I
could have used request object to retrieve the values, but that is
functional only when the event is submit.
Kindly advice me in this situation. Tag: Version Control Tag: 323566
OT: Memorial/remembrance site application
Hi
Sorry to be off topic. Can anyone recommend a memorial site application that
can be downloaded or purchase? I need to allow people to leave their
comments on the person concerned and pictures.
Thanks
Regards Tag: Version Control Tag: 323564
403 on ASP page
I am having a great deal of trouble with this, hopefully someone can
help me out!
I have a JNI Java applet that accesses an ASP page. The page looks like
this:
Dim myObj
Set myObj=Server.CreateObject("myDLL.myClass")
myObj.Execute()
Set mObj = Nothing
This is accessed numerous times throughout the run of the applet. For
the first x number of accesses, this works fine. However, after an
indeterminate number of accesses, the page returns a 403 and I am no
longer able to call myDLL. Does anyone know what could be the cause of
this?
Thanks,
Erica Tag: Version Control Tag: 323558
page wont work in firefox
i was informed that one of out pages wasnt working. the user was on
firefox and said our page wasnt functioning but whenever i use IE it
works fine. is there any reason or something in the code that wouldnt
allow a page to work with FF
thanks
gabriel Tag: Version Control Tag: 323554
File download size limit
I have a site that allows a person to log in and get a list of files to
download for them. If the file size is under 65MB then everything is fine,
they click the download button and the save box pops up. But if the file is
larger than 65MB the page sits and processes until it times out. I can't
figure it out becaus a 64MB file loads immediately for download while one
slightly larger hangs up.
Any assistance on this will be greatly appreciated. Tim Tag: Version Control Tag: 323553
Possible to store javascript document.forms[0].value to ASP session?
Hello all
Would it be possible to store javascript document.forms[0].value to ASP
session as global variable? If it is not possible, how can I pass the
javascript document.forms[0].value to ASP/vbscript function?
I need to pass the javascript value to ASP/vbscript function because I
have to store the javascript value into database.
I can't use Request.Form for getting field value. Because there is a
submit button in the same form for calling email function in another
ASP page.
Thanks
Bon Tag: Version Control Tag: 323552
Select Case
I'm getting a syntax error with a Select Case statement:
Select Case CSng(rs.fields("Field1"))
Case 0
Response.Write "Test1"
Case Is < 0 <<< Syntax Error
Response.Write "Test2"
Case Is > 0 <<< Syntax Error
Response.Write "Test3"
End Select
As far as I can tell the syntax *is* correct. What am I missing?
Thanks
Chris Tag: Version Control Tag: 323542
Save dynamic page to text file
Can anyone recommend how to do a screen scrape from a dynamic page and save
it to a text file? Regards, Chris. Tag: Version Control Tag: 323530
URL Rewriting
I want to rewrite URL's from asp type ones with querystrings to more search
engine friendly ones. I was looking at two options:
isapirewrite or a bit of a hack which replaces the 404 page with a custom,
which examines the url and then does a server transfer to the querystring
page.
The hack works quite well with one problem, only the 404 page is written to
the IIS log. Does Isapi rewrite have the same problem.
Can anyone recommend any pointers to combining URL rewriting and web
statistics. Tag: Version Control Tag: 323529
Somebody Please Help Me Convert this ASP to VBS
Hi Gang
I'm not sure what needs to be changed when converting an asp to vbs.
I'm not sure if I can with my code below. Can someone PLEASE convert
the text below to vbs?
Thanks a million.
Andy
<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->
<%
' Create a connection to the Notification database and open it.
Set NotificationDatabaseConn = Server.CreateObject("ADODB.Connection")
NotificationDatabaseConn.Open "Data Source=" &
Server.Mappath("../cadim/data/notifications.mdb") &
";Provider=Microsoft.Jet.OLEDB.4.0;"
lcSQL = "SELECT CADIMUser, CADIMUserPassword, SMTPServer, eMailAdmin
FROM SystemConfig"
Set RSSystemDefaults = NotificationDatabaseConn.Execute(lcSQL)
lcCADIMUser = RSSystemDefaults ("CADIMUser")
lcCADIMUserPassword = RSSystemDefaults ("CADIMUserPassword")
lcSMTPServer = RSSystemDefaults ("SMTPServer")
lceMailAdmin = RSSystemDefaults ("eMailAdmin")
' Create a connection to the CADIM database and open it.
Set CADIMDatabaseConn = Server.CreateObject("ADODB.Connection")
CADIMDatabaseConn.Open "dsn=CADIMProductionDB;uid=" & lcCADIMUser &
";pwd=" & lcCADIMUserPassword & ";"
' Delete all the previous notifications
lcSQL = "DELETE * FROM Notifications"
Set RSDeleteNotifications = NotificationDatabaseConn.Execute(lcSQL)
' Create a simple SQL Select statement for testing.
lcSQL = "SELECT C_ID, ELEM_ID, S010000_AEND_ART_ENG FROM
PLMAD_PROD.T_EWO_DAT WHERE S010000_ORG_EINH='013060' AND (LEV_IND =
'605' OR LEV_IND = '610') AND S010000_AEND_ART_ENG <> 'Normal change A
doc'"
Set RSECOList = CADIMDatabaseConn.Execute(lcSQL)
Do While Not RSECOList.EOF
lcECOType = RSECOList("S010000_AEND_ART_ENG")
lcECOID = RSECOList("C_ID")
lcECONum = RSECOList("ELEM_ID")
lcSQL = "SELECT BEARB_PRS_ID, FUNKTION, BEREICH, MAIL_AUSG, OK_KZ
FROM PLMAD_PROD.T_S010000EWOM WHERE C_ID_1 = '" & lcECOID & "' AND
OK_KZ = '_'"
Set RSECODetails = CADIMDatabaseConn.Execute(lcSQL)
lcApplicantSentRequestForApproval = "False"
Do While Not RSECODetails.EOF
If Not IsNull(RSECODetails("MAIL_AUSG")) Or
Len(RSECODetails("MAIL_AUSG")) <> 0 Then
lcApplicantSentRequestForApproval = "True"
End If
RSECODetails.MoveNext
Loop
' Loop through the details again now we know someone has been
' notified once to approve the change and build the notification
table
If lcApplicantSentRequestForApproval = "True" Then
RSECODetails.MoveFirst
Do While Not RSECODetails.EOF
lcDeptFunction = RSECODetails("BEREICH")
lcJobRole = RSECODetails("FUNKTION")
If lcJobRole <> "Applicant" Then
lcSQL = "SELECT COUNT(ecotype) AS ecocount FROM
notificationconfig " & _
"WHERE ecotype = '" & lcECOType & "' AND jobrole =
'" & lcJobRole & "' AND deptfunction = '" & lcDeptFunction & "'"
Set RSECOCount =
NotificationDatabaseConn.Execute(lcSQL)
If RSECOCount("ecocount") > 0 Then
lcSQL = "SELECT sequence, changestage, ecotype FROM
notificationconfig " & _
"WHERE ecotype = '" & lcECOType & "' AND jobrole =
'" & lcJobRole & "' AND deptfunction = '" & lcDeptFunction & "'"
Set RSECOConfigDetails =
NotificationDatabaseConn.Execute(lcSQL)
lcSequence = RSECOConfigDetails("sequence")
lcChangeStage = RSECOConfigDetails("changestage")
lcECOType = RSECOConfigDetails("ecotype")
lcECOPersonId = RSECODetails("BEARB_PRS_ID")
lcSQL = "SELECT S_USER, S_FIRST_NAME, S_EMAIL FROM
PLMAD_PROD.T_PRS_DAT WHERE EDB_ID = '" & lcECOPersonId & "'"
Set RSPersonDetails = CADIMDatabaseConn.Execute(lcSQL)
lcFirstName = RSPersonDetails("S_FIRST_NAME")
lcLastName = RSPersonDetails("S_USER")
lceMailAddress = RSPersonDetails("S_EMAIL")
'Insert the new notification into the notification
table
lcSQL = "INSERT INTO notifications " &_
"(econum, changestage, sequence, firstname, lastname,
emailaddress, jobrole, deptfunction, ecotype) " &_
"VALUES ('" & lcECONum & "', '" & lcChangeStage & "', " &
lcSequence & ", '" & lcFirstName & "', '" & lcLastName & "', '" &
lceMailAddress & "', '" & lcJobRole & "', '" & lcDeptFunction & "', '"
& lcECOType & "')"
Set RSInsert = NotificationDatabaseConn.Execute(lcSQL)
Else
' There was a dept function and/or job role that was not
recognized by
' the notificationconfig table.
lcBodyError = "<html><head><meta http-equiv='Content-Language'
content='en-us'><meta http-equiv='Content-Type' content='text/html;
charset=windows-1252'><title>CADIM EC Action
Requirements</title></head><body><font face='Arial' style='FONT-SIZE:
9pt'>"
lcBodyError = lcBodyError & "The following signature is not a
default signature. The user will not be sent a notification and this
needs to be corrected.<br><br>"
lcBodyError = lcBodyError & "<b>ECO Number: </b>" & lcECONum &
"<br>"
lcBodyError = lcBodyError & "<b>Department Function: </b>" &
lcDeptFunction & "<br>"
lcBodyError = lcBodyError & "<b>Job Role: </b>" & lcJobRole &
"<br>"
lcBodyError = lcBodyError & "</font></body></html>"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = lcSMTPServer
.Update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = lceMailAdmin
.To = "andy@mycompany.com"
.Subject = "CADIM Comm List Member Can't Be Notified"
.HTMLBody = lcBodyError
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
End If
End If
RSECODetails.MoveNext
Loop
End If
RSECOList.MoveNext
Loop
' Setup the send status for each notification. We only want to send
' an email to a user once with all the action.
lcSQL = "SELECT * FROM notifications ORDER BY econum, sequence"
Set RSNotifications = NotificationDatabaseConn.Execute(lcSQL)
lcOldSequence = ""
lcOldECONum = ""
Do While Not RSNotifications.EOF
lcBodyTableRecs = ""
lcECONum = ""
lcChangeStage = ""
lcECOType = ""
lcAction = ""
If lcOldECONum <> RSNotifications("econum") Then
lcOldSequence = RSNotifications("sequence")
End If
If lcOldSequence = RSNotifications("sequence") Then
lcECONum = RSNotifications("econum")
lcChangeStage = RSNotifications("changestage")
lcECOType = RSNotifications("ecotype")
lcJobRole = RSNotifications("jobrole")
lcDeptFunction = RSNotifications("deptfunction")
lcSequence = RSNotifications("sequence")
lcFirstName = RSNotifications("firstname")
lcLastName = RSNotifications("lastname")
lceMailAddress = RSNotifications("emailaddress")
lcSQL = "UPDATE notifications SET sendstatus = 'Y' " &_
"WHERE econum = '" & lcECONum & "' And " & _
"changestage = '" & lcChangeStage & "' And " & _
"sequence = " & lcSequence & " And " & _
"jobrole = '" & lcJobRole & "' And " & _
"deptfunction = '" & lcDeptFunction & "' And " & _
"firstname = '" & lcFirstName & "' And " & _
"lastname = '" & lcLastName & "' And " & _
"emailaddress = '" & lceMailAddress & "'"
Set RSUpdate = NotificationDatabaseConn.Execute(lcSQL)
End If
lcOldECONum = RSNotifications("econum")
' lcOldSequence = RSNotifications("sequence")
RSNotifications.MoveNext
Loop
'Send out the notifications.
lcSQL = "SELECT header, body, bodytable, footer FROM eMailConfig"
Set RSeMailDefaults = NotificationDatabaseConn.Execute(lcSQL)
lcHeader = RSeMailDefaults("header")
lcBody = RSeMailDefaults("body")
lcBodyTable = RSeMailDefaults("bodytable")
lcFooter = RSeMailDefaults("footer")
lcSQL = "SELECT * FROM notifications WHERE sendstatus = 'Y' ORDER BY
emailaddress, sequence DESC"
Set RSNotifications = NotificationDatabaseConn.Execute(lcSQL)
lcOldeMail = ""
lceMailBody = ""
lcBodyTableRecs = ""
lcFirst = "True"
Do While Not RSNotifications.EOF
If lcOldeMail <> RSNotifications("emailaddress") And lcFirst <> "True"
Then
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = lcSMTPServer
.Update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = lceMailAdmin
.To = "andy@mycompany.com"
.Cc = "andy@mycompany.com"
.Subject = lceMailSubject
.HTMLBody = lceMailBody
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
lceMailBody = ""
lcBodyTableRecs = ""
lceMailSubject = ""
End If
lcFirst = "False"
lceMailSubject = "Required CADIM EC Actions For " &
RSNotifications("firstname") & " " & RSNotifications("lastname")
lcECONum = RSNotifications("econum")
lcChangeStage = RSNotifications("changestage")
lcECOType = RSNotifications("ecotype")
lcAction = "Review as the " & RSNotifications("jobrole") & " - " &
RSNotifications("deptfunction") & " representative."
lcBodyTableRecs = lcBodyTableRecs & "<tr>"
lcBodyTableRecs = lcBodyTableRecs & "<td><font face='Arial'
style='FONT-SIZE: 9pt'>" & lcECONum & "</font></td>"
lcBodyTableRecs = lcBodyTableRecs & "<td><font face='Arial'
style='FONT-SIZE: 9pt'>" & lcAction & "</font></td>"
lcBodyTableRecs = lcBodyTableRecs & "<td><font face='Arial'
style='FONT-SIZE: 9pt'>" & lcECOType & "</font></td>"
lcBodyTableRecs = lcBodyTableRecs & "<td><font face='Arial'
style='FONT-SIZE: 9pt'>" & lcChangeStage & "</font></td>"
lcBodyTableRecs = lcBodyTableRecs & "</tr>"
lceMailBody = lcHeader
lceMailBody = lceMailBody & RSNotifications("firstname")
lceMailBody = lceMailBody & lcBody
lceMailBody = lceMailBody & lcBodyTable
lceMailBody = lceMailBody & lcBodyTableRecs
lceMailBody = lceMailBody & lcFooter
lcOldeMail = RSNotifications("emailaddress")
RSNotifications.MoveNext
Loop
'Get the last user to send the email to
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = lcSMTPServer
.Update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = lceMailAdmin
.To = "andy@mycompany.com"
.Cc = "andy@mycompany.com"
.Subject = lceMailSubject
.HTMLBody = lceMailBody
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
' Close the connection to the databases
CADIMDatabaseConn.Close
NotificationDatabaseConn.Close
%> Tag: Version Control Tag: 323523
Dynamic CSS
Hi
I need to create a bunch of sites with slightly dynamic CSS. Basically,
all the image paths in the CSS need to be dynamic, depending on the
values of certain ASP variables.
I can think of 3 ways to do this:
1. Write a script to create a semi-dynamic CSS file, which will be run
whenever we need to make changes to the ASP variables controlling the
image paths.
2. Have an ASP script generate the CSS on the fly:
<link href="dynamiccss.asp" rel="stylesheet" type="text/css">
3. Put all static CSS in a normal CSS file, and have a special dynamic
style sheet for only those rules that require variability. We could
either use method 2 above to generate a second style sheet, or place
dynamic rules directly in the actual asp pages.
I'm not sure what to do. (1) has the disadvantage that the CSS is not
truly dynamic. (2)... well, I'm not sure if (a) this is legal by W3C
standards and whether there's a performance hit involved. (3) has the
disadvantage that it places rules for the same elements in different
locations, which could lead to confusion.
Is there a generally accepted way to solve this problem? Tag: Version Control Tag: 323522
IIS logs and server.transfer
I am thinking of creating a custom 404 page which does a server.transfer to
a variety of different pages. My question is what shows up in the log, which
the web statistics are based on?
1. The non existent page, which is requested?
2. The custom 404 page?
3. The page it gets transfered to? Tag: Version Control Tag: 323519
Which version control system would you recommend. Need to use it with
ASP and .SQL files.
Source Safe works for me and the company I work for.
Ray at work
"Katie" <DnkyCartRcr@gmail.com> wrote in message
news:1152559234.156542.261650@h48g2000cwc.googlegroups.com...
> Which version control system would you recommend. Need to use it with
> ASP and .SQL files.
>
> :)
>