| print page script - login problems |
|
 |
Index ‹ asp
|
- Previous
- 1
- How to aviod putting url-information in history-list. [Update]Better source
http://www.w3schools.com/asp/met_urlencode.asp
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Per-Olof Nilsson <email***@***.com> wrote in message
news:#email***@***.com...
> Hi
>
> We have two applications for one system. The first application is a vb-app
> and the second is a web-app.
>
> From the vb-app users have the possibility to enter right into the
web-app.
> The vb-app is creating an appropriate url and opens the web-browser with
> this. The url contains user-information like user name and password. We
> don't want this url-information to be stored in the history-list, because
> then advanced users can find passwords etc here and that's not so good.
>
> Anyone know how to solve this?
>
> Regards
> Per-Olof Nilsson
>
>
- 1
- IIS setting to run AspFolks,
I am trying just to run a simple asp commands in the
Internet Explorer. ( I have windows XP)
When I run this asp lines on ASP Matrix web server it is
ok.
But, when I run this on IIS it acts like the asp engine
is not working.
I created the virtual directory and started the default
server web page but still not working.
Please let me know what else I have to do to run asp
program at IIS?
Thanks.
- 3
- asp not running on iis6.0hi,
I've installed iis6.0 on win2003. All static content with
ssi etc rendered fine on the browser, but gives a 500
internal server error if i try access any asp page. The
log file says:
ASP_0134|Invalid_ProgID_attribute 80 - 127.0.0.1
Mozilla/4.0+
(compatible;+MSIE+6.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322)
500 0 0
All the dll files are in place and I have enabled asp
scripting. Can anybody give me a clue as to where am I
going wrong?
Thanx.
- 3
- Store Temporary Vale HelpNewbie ASP Question.
I hope this is the right place to ask.
I have an ASP Upload element that I need help with.
This is the problem
I have 2 fields Image and FileName (FileName isnt the name of Image in this
case)
From page 1 I sudmit the 2 fields of info to the Upload Page.
The info arrives ok at the upload page.
I browse and select the file and hit submit...
The info for the Image arrives at destination but the FileName field does
not.
Heres the code I have...
<%
Dim MyFile
MyFile = Request("Name")
if UCase(Request.ServerVariables("HTTP_METHOD"))="POST" Then
Set fu = Server.CreateObject("AspUtil.FileUpload")
fu.directory = Server.MapPath(".")
rc = fu.Upload
If rc = 0 then
For n=0 to fu.count-1
set item = fu.item(n)
Response.Write "FileName: " & item.filename & "<BR>"
Response.Write "Bytes written: " & item.Size & "<BR>"
item.Save
Next
Else
Response.Write "File upload failed. RC: " & rc & "<BR>"
End If
response.redirect "http://dmsproxy/adm/products/add_image.asp?NewImage=" &
item.filename & "&FileName=" & MyFile
Else
%>
<form method=post ENCTYPE="multipart/form-data" action="upload_image.asp">
<font size="2"> Image</font><input type=file name=Image size="20"
value="<%=Request("Image")%>"><br>
Name<input type="text" name="Name" size="20"
value="<%=Request("Name")%>"><br>
<br>
<input type=submit></form>
<%
end If
%>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.542 / Virus Database: 336 - Release Date: 11/18/2003
- 4
- How to encrypt an asp file source code?Hi,
we have an Enterprise Application on ASP and MS SQL 2000. Would like to know
if I can convert the asp app to an exe or encrypt / encode / hide the source
code so that no one accessing the server can touch / modify / copy the same!
Kind Regards,
Akshay Shah
Mumbai, INDIA.
- 4
- File Sytem Object versus MSXMLHello:
I need to dynamically include documents stored in my own website.
The website is coded in ASP.
As far as I know there are two common options: FSO and the MSXML Objects.
Which one of the two would be less of a resource hog for IIS ? Keep in mind
that the documetns I want to include are stored in the server where the
website resides, not on another webserver. Otherwise I'd have no choice but
to use msxml.
Thanks in advance.
Edward
- 5
- DSN to Reply-to addressHi,
can someone tell me if it's possible to send delivery status notifications
(or NDRs) to the Reply-To address (specified in CDOSYS script) rather than
the FROM address?
thanks.
- 5
- Wierd form postI've seen something on my logs that's not supposed to happen:
pagea.htm has a form with a Select list called country as below:
<select name='Country' size='1'>
<option value='USA'>USA</option>
<option value='Canada'>Canada</option>
'lots more countries...
</select>
Page B has code that references request.form("country"), and assumes
that this field is nonempty as it is coming from a select list. I saw
an error caused by an empty string in this country variable. The User
agent was IE6, and the pages appeared in the correct order in the IIS
logs. pagea.htm (the page with the form) was requested with a GET
method about a minute before the POST to pageb.asp, and no intervening
pages were requested by that IP. I would suspect AOL wierdness, but
it's not an AOL IP.
Any clues?
- 5
- using dropdown box to display db record & update recordHi Folks,
I have a web database written in asp and using access97. I have many
projects, but each project is being held responsible by a person. All
people and projects come from the database. Looks like this:
Responsible Person Project Name
Canter, Joe Project A
Williams, Bob Project B
Fowler, James Project C
Canter, Joe Project D
I can have these database displayed in a table using asp and it works
fine. What I really want to do is where you see the Responsible names
above which corresponds to a particular project, I want those names to
appear in a drop down box. The drop down box will still have the
Responsible names above displayed but at the same time pull all of the
other Responsible names in the database as a selection--this way a user
can view the above table and re-assign people to different project as
they want. After doing so, they can click submit and the database
containg Responsible Person and Project Name is updated. I have been
trying different ways but nothing seems to work. If you could give me
any help or advice, I GREATLY appreciate it.
Thank you in advance
Jim
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- 10
- 12
- how to manage frames by c# codeHi,
I am new user of Asp.net. I want to open a page in right frame when i click
a button from left frame. this must simple but i don.t know how to this?
regards
omer
- 13
- can an event be controled in classical ASP?Hi all,
I guess this probably a very silly question. I am not sure if this can be
done in classical asp. A button has to be clicked if a selection in drop
down list has been changed. If not, a pop up message pops and reminds the
user you need to click the button before continue. Can this be done in some
ways???
Thank you!
--
Betty
- 13
- Slow Intranet performance apparently due to CAB fileI've developed an Intranet app that among other things creates form letters
using a VB dll, via a cab file, to access Word functions. It works perfectly
and performs well when asked to create the Word documents.
However my problem is that it takes >30 seconds for the initial page to
display. If I comment out the "<OBJECT>" definition and as a consequence
all lines/function referencing that object, the page displays <3 seconds.
The object is defined as:
<OBJECT ID="docobject" CLASSID="CLSID:9735B64A-792C-8167-5912-18A4B729BBA36"
CODEBASE="DOCCAB.CAB#version=-1,-1,-1,-1" HEIGHT="0" WIDTH="0"></OBJECT>
All machines inc IIS are XP Pro, unfortunately, they are also SP2. I believe
the security settings are fine as it allows the download of the cab file
without pop up and the execution of the dll. The site is set up globally as
a trusted site. Should I move to Intranet site?
Any help is greatly appreciated.
Craig
- 14
- How to get date time to display like 01/01/2005 16:14:10?
How to get date time to display like 01/01/2005 16:14:10?
Here's something that I found works against an Oracle database.
However, I'm not getting the same results against a SQL 2000 database.
Can anyone point out the correction needed? With the following, the
time displays correctly, but no date at all.
<%d=formatdatetime(rs2("Begin_Time"), 2)
if mid(d,2,1)="/" then d="0" & d
if mid(d,5,1)="/" then d=left(d,3) & "0" & mid(d,4)
Response.Write (d) & " "
Response.Write formatdatetime(rs2("Begin_Time"), 4)
if second(rs2("Begin_Time")) < 10 then
Response.Write ":0" & second(rs2("Begin_Time"))
else
Response.Write ":" & second(rs2("Begin_Time"))
end if%>
TIA
- 16
- ASP / SQL QuestionQuick question for the NG.
I have the following on my ASP page. SchPN is actually grabbed from a text
box, but here is what I am entering
schPN = "PRT"
strsql = "select PrinterModel, UserName, PrinterName, PrinterType,
IP_Address from Printers where (PrinterName LIKE '%schPN%')"
I would assume that this would pull all printers from my Access DB that
contain the words PRT, but it doesn't.
Any ideas?
Thanks
|
| Author |
Message |
ll

|
Posted: 2007-11-1 4:05:22 |
Top |
asp, print page script - login problems
Hi,
I have inherited a site written in 'classic' ASP, and I am working
with a print page script. I've gotten the script to work ok,
although, as the page which has the "print this page" link is
'protected,' the page that pops up (when the "print this page" linked
is clicked) is the authentication page, rather than the page which is
supposed to be printed. The URL that appears in the in the "print
this page" link is the correct one (the page exists within a protected
folder, although even when logged on successfully, the correct page
will not appear). Thanks for any help you can provide.
Here is the code I used. The top of the two codes listed is the
'calling' page in which the "print this page" link is located.
<%Session.Timeout=200%>
<%if Session("AMSADMINusername") <> "" then
Session("AMSCOMMusername")= Session("AMSADMINusername")
end if%>
<%if isempty(Session("AMSCOMMusername")) then
Response.Redirect "/ams/index.asp"
end if%>
<%role="comms"%>
<html>
<head></head>
<body>
<!--code below in body of calling page -->
<script Language="JavaScript">
<!-- hide from old browsers
// ppb and ppe are the start and end of the dynamic link
// window.location.href will refer to the current URL of the page
// it's nice to make it open in a new window too! i.e.
target=_blank
var ppb = "<a href=/print/printpage.asp?ref=";
var ppe = " target=_blank>Print This Page</a><br>";
document.write(ppb + window.location.href + ppe);
//end -->
</script>
<%breadcrumb="main menu"%>
<!--#include virtual="/ams/common/layout/headerComm.asp"-->
<!--<h3 align="left">Task Assigned:</h3>
<p align="left">Dear Curriculum Committee Members, <br>
Please review the reports under View Courses Under Review link below
by July 21. <em>Posted July 7, 2005.</em></p>
<br>-->
<!--#include virtual="/ams/common/incSearchByKeywordGUI.asp"-->
<!--#include virtual="/common/Layout/footer_training_ams_b.asp"-->
<!--#include virtual="/common/Layout/footerams.htm"-->
-----------------------------------------------------------------------------------------------------------------
<!-- code below in print page -->
<%
option explicit
Response.Buffer = True
'declare a variable for the reference page,
'the XMLHTTP Object, and the regular expressions used
Dim RefPage, objXMLHTTP, RegEx
'set the RefPage variable to the "ref" querystring
'the JavaScript function above passes the current page URL
'You can use the Request.ServerVariables("HTTP_REFERER") to
'get the page as a last option if needed
RefPage = Request.QueryString("ref")
if RefPage = "" then
response.write "<h3>Invalid reference page</h3>"
response.end
end if
'set the objXMLHTTP object to the XMLHTTP object from Microsoft
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
'perform the HTTP "GET" method via the XMLHTTP object to retrieve
'the called page
objXMLHTTP.Open "GET", RefPage, False
objXMLHTTP.Send
'give RefPage the text(HTML) from the call above
RefPage = objXMLHTTP.responseText
'Create built In Regular Expression object that
'is now included with VBScript version5
Set RegEx = New RegExp
RegEx.Global = True
'Set the pattern To look For <!-- START PPOMIT --> tags
RegEx.Pattern = "<!-- START PPOMIT -->"
'replace the comment pattern with a rare ASCII character
'i've choosed No 253 in this case, I suppose if you're speaking
'a language other than English this may not be the case but
'the reasoning here is so it will be unique and not interfere
'this the main page content
RefPage = RegEx.Replace(refpage,( chr(253) ))
'Set the pattern To look For <!-- END PPOMIT --> tags
RegEx.Pattern = "<!-- END PPOMIT -->"
'This time make it replace the comment with another rare
'ASCII character, NOT the one used above
RefPage = RegEx.Replace(refpage,( chr(254) ))
'Use this regular expression to "cut out" HTML between the
'start and end comments now the new ASCII characters
RegEx.Pattern = chr(253) & "[^" & chr(254) & "]*" & chr(254)
'This will perform the actual striping
RefPage = RegEx.Replace(refpage, " " )
'Don't forget to tidy up :-)
Set RegEx = Nothing
Set objXMLHTTP = Nothing
'Output your Printer Friendly Page!
Response.Write RefPage
%>
|
| |
|
| |
 |
jp2code

|
Posted: 2007-11-1 4:25:00 |
Top |
asp >> print page script - login problems
Instead of all that, why don't you throw a little JavaScript onto your
webpage:
<input type="button" value="Print" onClick="parent.print()">
One simple line. Will that work?
"ll" <email***@***.com> wrote in message
news:email***@***.com...
> Hi,
> I have inherited a site written in 'classic' ASP, and I am working
> with a print page script. I've gotten the script to work ok,
> although, as the page which has the "print this page" link is
> 'protected,' the page that pops up (when the "print this page" linked
> is clicked) is the authentication page, rather than the page which is
> supposed to be printed. The URL that appears in the in the "print
> this page" link is the correct one (the page exists within a protected
> folder, although even when logged on successfully, the correct page
> will not appear). Thanks for any help you can provide.
>
|
| |
|
| |
 |
ll

|
Posted: 2007-11-1 4:41:00 |
Top |
asp >> print page script - login problems
On Oct 31, 3:25 pm, "jp2code" <poojo.com/mail> wrote:
> Instead of all that, why don't you throw a little JavaScript onto your
> webpage:
>
> <input type="button" value="Print" onClick="parent.print()">
>
> One simple line. Will that work?
>
> "ll" <email***@***.com> wrote in message
>
> news:email***@***.com...
>
> > Hi,
> > I have inherited a site written in 'classic' ASP, and I am working
> > with a print page script. I've gotten the script to work ok,
> > although, as the page which has the "print this page" link is
> > 'protected,' the page that pops up (when the "print this page" linked
> > is clicked) is the authentication page, rather than the page which is
> > supposed to be printed. The URL that appears in the in the "print
> > this page" link is the correct one (the page exists within a protected
> > folder, although even when logged on successfully, the correct page
> > will not appear). Thanks for any help you can provide.
Well, there are some elements that need to be resized for print. I
might try that route and see what happens.
|
| |
|
| |
 |
| |
 |
Index ‹ asp |
- Next
- 1
- Wierd errorHas anyone seen an error like this before? If so, what could it be? I
don't use any stored procedures. (SQL2000 and ASP).
007~ASP 0101~Unexpected error~The function returned |.
- 2
- Use the critical packThis is a multi-part message in MIME format.
Don't Microsoft moderate these groups? Why is such an obvious trojan allowed?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE type=text/css>.navtext {
COLOR: #ffffff; TEXT-DECORATION: none
}
</STYLE>
<META content="MSHTML 6.00.2800.1264" name=GENERATOR></HEAD>
<BODY text=black bgColor=white>
<DIV><FONT face=Arial size=2>Don't Microsoft moderate these groups? Why is such
an obvious trojan allowed?</FONT></DIV></BODY></HTML>
- 3
- How to keep QueryString-values?Hi,
to change the colors of a forum I am using
request.querystring("cellcolor"). That works fine for my default.asp.
Now I click on a topic and it links to topic.asp where the values of
the query string are gone.
Which approach would you recommend? How can I store the values?
The general idea is that I have got 5 main-navigation-links which
point to 5 different forums, each with separate colors. So the query
string can be hardcode in the HREF, but should remain if you click
further in each forum
regards
Ragnar
- 4
- ASP and IP addressesI can't find the code to display the client IP address on
the client browser. Shouldn't it be 'session. '?
Bill
- 5
- Cannot figure out server.mapppath configurationHello,
I have an application on my desktop where I have hardcoded the connection
string. Now I need to move the application to our test webserver. Here I need
to use the server.mappath method to connect to the database. The database is
in the same directory as the new application named gwis. Hence the database
is in the gwis directory in the test webserver. I made the changes in my
connection string as follows:
myDSN="DRIVER={Microsoft Access Driver (*.mdb)}; "
'myDSN=myDSN & "DBQ=C:\_______GWISBRANDNEWREADY3\GMISDATA.mdb"
myDSN = myDSN & "DBQ=" & Server.MapPath("/gwisbrandnewready3/GMISDATA.mdb"
Set CN=server.createobject("ADODB.Connection")
CN.Open myDSN
Set RS = Server.CreateObject("ADODB.Recordset")
RS.ActiveConnection=CN
The old hardcoded string is commented out. However, with this change, the
application is not still working.
It goes through the verify.asp routine. However, it displays the following
message:
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be
displayed.
HTTP 500 - Internal server error
Any help is appreciated in advance. Thanks.
- 6
- Help.. how to browse to file and create hyperlink in databaseI have a form where a user enters their name, date etc.
i also want them to be able to click on a browse button and select a
file which will then appear in a textbox. when they press submit i
want the file name and path to be put into the database. e.g.
"C:\windows\work\work.doc". Basically I don't want to UPLOAD the file
just enable the user to browse to it and send the filename and path to
the database.
Any help would be appreciated,
thanks
- 7
- Prepared statements in ASPI am trying to create a prepared statement in ASP, but am having
problems with creating the parameter object. I do the following
Set fnParam = peopleUpdate.CreateParameter("@firstname", adVarChar,
adParamInput, 50, peopleSourceRS("firstname"))
But this gives the following error on the browser:
Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
The server doesn't seem to like adVarChar and adParamInput. I did try
to create the parameter without arguments and then assign the
properties, but it gives the same error for .Type and .Direction. What
am I doing incorrectly here?
thanks
- 8
- ActiveX or COM or ...?Hi, how can I create a simple non-UI dll or component which will be used by
MS Access and .ASP apps which I can build with Visual C++ .net? An example
or template which would allow me to paste in C code without learning all the
C++ details would be perfect.
Thanks,
Randy
- 9
- page expired problemHello All
I have a web pagewhich queries a db and displays information on the
subsequent page. On the subsequent page if I click back to previous page
(this is a button with javascript code on it), it takes me to the previous
page but the page says - "warning page expired". When I am in my company
work environment, I dont get this page, it properly displays the information
on the previous page but when I go to the client site, it gives me the
problem All of us are on the same IE version and service packs. Could this
be a programming issue or a security issue.
Please advise
Thank you
- 10
- Problem in updating time fieldHi
I'm trying to update time field which MSACCESS using query
Sql2 = "Update tblExtraNetUsers SET Lo_date = " & Date()
& ",Lo_time =#" & FormatDateTime(Time(),4) &"# ,Lo_count
= " & rs("Lo_count") + 1 & " WHERE UserLogOn = 'david'"
But its always gives a error message
Operation must use an updateable query.
Thanx at advance
- 11
- ASP Connection String for Privileged AccountI don't know if this is a unique problem, or I'm going about it the
wrong way. I currently connect to one of our SQL servers via a
priviliged account (by using RUNAS). Works with no problem. I now
need the ability to connect to the same SQL server using ASP. I have
the following connect string, but I'm not sure how to specify the
domain in the string, or is there some other way?
<%
Set demoConn = Server.CreateObject("ADODB.Connection")
demoPath="DRIVER={SQL Server};" & _
"SERVER=mysqlserver;UID=myusername;" & _
"PWD=mypassword#;DATABASE=qdb"
demoConn.open demoPath
%>
Thanks!
- 12
- CDONTS & BCCHi
I have a website hosted on a virtual server, and am trying to run a script
that sends an email with a BCC address.
The email gets sent just fine, except for the BCC recipient, who doesnt
receive anything. Any ideas why?
Thanks
The code is effectively:
' --- setup and send a cdo message
Dim MailObject
Set MailObject = Server.CreateObject("CDONTS.NewMail")
With MailObject
.From = strEmailFrom
.To = strTo
.Subject = strSubject
' --- use the HTML format
If boolUseHTML = True Then
.BodyFormat = 0
.MailFormat = 0
.Body = strBodyHTML
' --- use the plain text format
Else
.BodyFormat = 1
.MailFormat = 1
.Body = strBodyText
End If
.BCC = strEmailBCC
.Send
End With
Set MailObject = Nothing
- 13
- Form ProblemHi,
I've got an intranet site that allows a user to view a
weekly diary on a page. Clicking on an item on a
particular day...fires up a modal window with a form on it
that allows the user to change his details for that day.
Clicking on submit - posts the form to another .asp file
that updates the SQL Server table. Then closes all the
windows and returns back to the original window...forcing
a refresh to display the new days details.
The problem I have is that the modal window that is
displayed...as soon as you click the submit
button...brings up another blank window (the title of
which is the .asp file that the information is posted to).
I don't want this blank window to be shown.
I've tried specifying target in the <form> tag...but it
still does this. Does anyone know how to stop this
happening?
Thanks in advance...
- 14
- Pop-up window keeps minimisingHi,
I am using Internet Explorer 6.0 and I have a piece code which pops up
a new charges window whilst redirecting to a different page on the
underlying aspx screen.
However when my new pop up window appears it suddenly minimises itself.
The code seems fine, but here it is just in case anyone can spot
anything.
Dim url As String = "../Charges/Charges.aspx?LicenceID=" & licenceId
'& "&readOnlyStatus=" & readOnlyStatus
Dim urlShowLicence As String =
"ShowTbl_LicencesRecord.aspx?Tbl_Licences=" & licenceId
RegisterClientScriptBlock("SHOWCHARGES", "<script
language=javascript>window.open('" + url +
"','Charges','width=940,height=600');window.navigate('" +
urlShowLicence + "');</script>")
Are there any settings in my IE6 that I should be checking?
Any info. would be much appreciated.
M.
- 15
- help on the output string size by response.writeThere is one large size web page need to display. The repsonse.buffer is on.
I want to calll response.flush when the size of the oupput string is large
enough, but before get the buffer limit. Any idea is welcomed. My goal is
avoid buffer limit error and get the best performance.
|
|
|