|
You really don't have much of an option, at least not that i'm aware of. If Things were Right with the World, you could do something like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <body> <table style="width:100%;height:100%;margin:0px;border:none;"> <thead> <tr><td> Fancy-pants header</td></tr> </thead> <tbody> <!-- put content here (in <tr><td></td></tr>) --> </tbody> <tfoot> <tr><td> Footer text </td></tr> </tfoot> </table> </body> </html>
And rest assured that the header and footer would repeat on every page, no matter how many pages tbody required.
But things aren't right, and that doesn't work in IE. So you can just add the page break CSS to the table, and make sure the stuff in tbody never takes up too much space, and that the table repeats for every page...
|
|
|
|
|
Thanks for the tip. As contents is of arbitrary size, and how much will fit in the contents area, and the fact that the user is suppose to be able to muck around with the layout, I'll just have to go with the "There won't be any fancy headers, sorry!"-option. They'll just have to live with page breaks. It still beats the look of a receipt, smeared out on an A4...
--
Pictures[^] from my Japan trip.
|
|
|
|
|
Otherwise, come up with an estimate of how long it'll take you to integrate Gecko...
|
|
|
|
|
Please don't put such thoughts into my head. I might actually try it.. *going my 18th hour*
time to pack up and go to sleep.
--
Pictures[^] from my Japan trip.
|
|
|
|
|
Hi,
Quick question. I wrote an application that after you submit a new entry to the database it directs you to a datagrid that shows all the entries made. What I would like to find out is when a new entry is made, is it possible to change the color of the new entry in the datagrid so that you can easily see where the new entries are?
Thanks!
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
Hi there,
IMO, You can do that. After the new entry is added, then while you bind the data to the grid, you can change the color of a row by customizing the OnItemDatabound (something like that...) event handler...
<< >>
|
|
|
|
|
I'm using VS2005 final. When I try to create a new Web Control Library project with VS2005 in C#, I could not find Web Control Library template. Any one has the same problem? If yes then what is a solution.
Regards.
|
|
|
|
|
In the Add New Project window, select the language, then the Windows subitem, then you will see the Web Control Library template in the right pane.
|
|
|
|
|
Hi..i'm doing a web design using C# web application.. Actually, there's two part which i not too sure about the coding..
1) Is that when i add the data, press save then it will link to a confirm page.. And from there, i can choose to continue to add the data or delete the data and exit to the menu. This is the part i not too sure how can i delete the data..
2) The user add his data, press save, everything is stored in the database and then he can delete this from the datagrid table.. From the datagrid table, i have goes to the property bulider --> columns --> button column
--> select, edit, update, delete and all my datafields.. But now how can i delete or edit the user(s)
Thanks for the help.. =) Can anyhow help me how to code it or who has done it give me example of it ?? Thanks!!
Cheers!!
|
|
|
|
|
1. As the data is not saved, you don't have to delete it. Just go to the meny and the data is gone.
2. The same way, but with the user table.
---
b { font-weight: normal; }
|
|
|
|
|
Hi..If i save the data, how am i going to delete it?? I mean how to delete from the datagrid table??
Thanks
|
|
|
|
|
momoo wrote: I mean how to delete from the datagrid table??
The easy way, IMO, after deleted the entry, just re-bind the data to the grid...
<< >>
|
|
|
|
|
save the data temporatily in a Session variable ~ go to confirm page ~ In confirm page to add , retrieve data from session and save it into database ~ to delete , just remove the session variable using Session.Remove
|
|
|
|
|
hi to all,
i am trying to create a website that is catalogue to order from.
i have alot of products from the database, so i get these products into a DataTable then i loop the table and generate the pictures and information into HTML (no problem here)
when i create the link to the products i am doing this.
string productHref = Server.UrlPathEncode(
"?code=" + productCode + "&" +
"qty=" + qty + "&" +
"price=" + price + "&" +
"url=" + Request.Url.ToString() + "/#" + productCode + "&" +
"image_url=" + productPictureLink);
then i use this in codebehind when looping the table
sb.Append(" < a name=\"" + productCode + "\" class=\"greenType\" href=\"" + productHref + "\" >Add to Cart< /a >" + newline);
now is the problem.
the first time i add to cart, all is well, but after that the querystring has 2 lots of the productHref in it, so the NameValueCollection has two entries in it from the QueryString.
1st add to cart
http:
code=product_x&
qty=1&
price=151&
url=http:
image_url=main/clothing/mens/tshirts/TShirt.jpg
2nd and thereafter add to cart
http:
code=product_x&
qty=1&
price=151&
url=http:
image_url=main/clothing/mens/tshirts/TShirt.jpg
how do i overcome this problem please?
it appears i need to strip out the QueryString before returning the page, is this possible?
obviously iof i dont store a link to the url of the product in the cart, then i will have no problems. it would be nice to be able to click back to a product from the checkout page though.
i can do some string manip on the querystring, is this the only way to do it?
kind regards,
g00fy
|
|
|
|
|
Hi
Is there a way to restart a single Web Service without restarting the whole IIS ?
At the moment the way this is done by manualy killing the process aspnet_wp.exe.
By killing aspnet_wp.exe <all> the webservices are restarted, is there are way to restart a single webservice even if there are other web services running under the same aspnet_wp.exe ?
How do I run a webservice under it own aspnet_wp.exe ?
Thanks
Gilad.
|
|
|
|
|
Why do you want to restart it? If you don't want to restart the process, what is it that you want to restart, really?
GiladKapel wrote: How do I run a webservice under it own aspnet_wp.exe ?
That depends a bit on what version of IIS you are using. Basically, though, you just set the application to run as an isolated process, e.g. setting the application protection level to the highest setting.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: Why do you want to restart it? If you don't want to restart the process, what is it that you want to restart, really?
Other than the web service I'm also running a "Watch Dog" service that monitors the web service and restarts it if the web service failes to replay\function for any unknown reason. I need the watch dog service to progrematicly restart the service. The watch dog is a very simple app and its chances of failing are very low.
Gilad.
|
|
|
|
|
Hi
I notice that there is a long delay on the first call to my web service (loading the web service and all its dll components). Is there a way bypass this delay by "manualy" calling the webservice after the IIS is restarted (gatthering all the "garbage time" to one place) ?
Thanks.
Gilad.
|
|
|
|
|
Hi to all!
I have download a ASP script called "A versatile html form mail script for classic ASP at 18 Nov 2003" of Nathan Ridley, but i can't contact him. because when i submit the form, its giving following error "HTTP 500 internal server error" and it doesn't send the email.
can any one tell me why it is happening? any clue or suggesstion are welcome. the server is windows and already many ASP script file are running on it.
url is:
"http://www.alsoc.org/alsoc/sendmail/sampleform.htm"
kindly help me
thanks in advance.
|
|
|
|
|
Hi there,
IMO, You might try to debug to find out which line of the code causes the error...
<< >>
|
|
|
|
|
Thanks!
Sorry, I don't have debugger installed my machine. can debug it on the web.?
which type of debugger i should use. i have WinXP installed.
i have putted the link, if you want i can put the code also. please suggest.
sujata.
|
|
|
|
|
just using response.write() method to write the info to the webpage....
<< >>
|
|
|
|
|
Is SMTP is enabled on your IIS?
N.Rajakumar B.E.,
Application Developer,
|
|
|
|
|
how i can test? can i enable by my self?
for your reference i am sending you coding, kindly check is this ok or not. i have checked a speace of code of PHP also, which is working at Linux server, but here saying "can't send mail"
here is the both links:
<a href="http://www.alsoc.org/alsoc/sendmail/sampleform.htm" rel="nofollow">http://www.alsoc.org/alsoc/sendmail/sampleform.htm</a>[<a href="http://www.alsoc.org/alsoc/sendmail/sampleform.htm" target="_blank" rel="nofollow" title="New Window">^</a>]
<a href="http://www.alsoc.org/alsoc/feedback_form1.asp" rel="nofollow">http://www.alsoc.org/alsoc/feedback_form1.asp</a>[<a href="http://www.alsoc.org/alsoc/feedback_form1.asp" target="_blank" rel="nofollow" title="New Window">^</a>]
above to form i have down load from here bu both are not running. here are the code:
feedback_form.asp
<% @ Language=VBScript %><br />
<% Option Explicit<br />
response.buffer=true%><br />
<% dim num<br />
num = Request.ServerVariables("SCRIPT_NAME")<br />
application.lock<br />
if isEmpty(application(num)) Then<br />
application(num)=0<br />
END IF<br />
application(num)=application(num)+1<br />
application.unlock<br />
%><br />
<%<br />
dim newmail, strfeed, ipadd, brow, now, msgbody, date, strnam, stremail, strcom, strsug<br />
brow = Request.servervariables("HTTP_USER_AGENT")<br />
ipadd= Request.ServerVariables("REMOTE_ADDR")<br />
date = time<br />
strfeed = request.cookies("Feed")("Yes")<br />
if (Len(strfeed) > 0) then<br />
response.write "<font color=red>You have already given us feedback! You can give it again after a week!</font>"<br />
response.redirect "index.asp"<br />
end if<br />
strnam = Trim(Request.Form("name"))<br />
stremail = Trim(request.form("mail"))<br />
strcom = Trim(request.form("com"))<br />
strsug = Trim(request.form("sug"))<br />
num = application(num)<br />
msgbody = ("Suggestions: " & strsug & "Comments: " & strcom & vbcrlf & "PC info:" & "IP:" & ipadd & "Browser: " & brow & "Time:" & date & "Hits:" & num &"times!")<br />
if (strnam <> "" and stremail <> "" and strcom <> "" and strsug <> "")then<br />
Set Newmail = Server.CreateObject ("CDONTS.newmail")<br />
Newmail.From = stremail<br />
Newmail.To = "alsoc@alsoc.org"<br />
Newmail.Subject = "Feedback From:" & strnam<br />
Newmail.Body = msgbody<br />
Newmail.Send<br />
Set Newmail = Nothing <br />
response.write "send mail"<br />
<br />
End if <br />
%><br />
<html><br />
<br />
<head><br />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><br />
<title>Sample Feedback Form : Gopi Aravind</title><br />
<script language="JavaScript1.2"><br />
var bookmarkurl="http://www.codeproject.com"<br />
var bookmarktitle="The Code Project - Free Source Code and Tutorials"<br />
function addbookmark()<br />
{<br />
if (document.all)<br />
window.external.AddFavorite(bookmarkurl,bookmarktitle)<br />
}<br />
</script><br />
</head><br />
<br />
<body bgcolor="#FFFFFF"><br />
<br />
<script language=JavaScript><br />
<!--<br />
<br />
<br />
var message="";<br />
function clickIE() {if (document.all) {(message);return false;}}<br />
function clickNS(e) {if <br />
(document.layers||(document.getElementById&&!document.all)) {<br />
if (e.which==2||e.which==3) {(message);return false;}}}<br />
if (document.layers) <br />
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}<br />
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}<br />
<br />
document.oncontextmenu=new Function("return false")<br />
</script><br />
<br />
<p align="left"><font size="7" color="#00CCFF"> F</font>eedback<br />
<font size="7" color="#00CCFF">F</font>orm</p><br />
<br />
<div align="right"><br />
<br />
<table border="0" cellspacing="1" id="AutoNumber2"><br />
<form action="<%= Request.ServerVariables("SCRIPT_Name") %>" method="POST"><br />
<br />
<tr><br />
<td> </td><br />
<td><font color="#808080"><code>Name: Email Id: YourComments: Suggestions:
By: Gopi Aravind
Go here:
<font color="#FF0000"><br />
<a style="text-decoration: none" href="http://www.trollzsoft.com/feedback.asp"><br />
http:
for an ever lasting sample!
Mail me at:
webmaster@trollzsoft.com
Bookmark
www.codeproject.com
Set as Codeproject.com as HomePage
Copyright © 2003-2004 Gopi Aravind. <br />
This code is for free distribution only.
All Rights Reserved.
<font color="#C0C0C0">Contact the webmaster:<br />
<a href="mailto:webmaster@trollzsoft.com?subject=From the Homepage!">Gopi <br />
Aravind</a></font>
sendmail.asp
<%<br />
'---------------------------------------------------------------------------------------------------<br />
'FORM MAIL SCRIPT<br />
'----------------<br />
'usage:<br />
'<form ACTION="sendmail.asp" ...><br />
'<br />
'Hidden fields to use in the form:<br />
' redirect - the url to redirect to when the mail has been sent (REQUIRED)<br />
' mailto - the email address of the recipient (separate multiple recipients with commas) (REQUIRED)<br />
' cc - the email address of the cc recipient (separate multiple recipients with commas) (OPTIONAL)<br />
' bcc - the email address of the bcc recipient (separate multiple recipients with commas) (OPTIONAL)<br />
' mailfrom - the email address of the sender (REQUIRED)<br />
' subject - the subject line of the email (REQUIRED)<br />
' message - the message to include in the email above the field values. not used when a template is<br />
' being used. (OPTIONAL)<br />
' template - specifies a text or html file to use as the email template, relative to the location of the<br />
' sendmail script. (e.g. ../email.txt) Templates should reference form fields like this: [$Field Name$]<br />
' html - if this has the value "yes", the email will be sent as an html email. only used if a template is supplied.<br />
' testmode - if this is set to "yes", the email contents will be written to the screen instead of being emailed.<br />
'---------------------------------------------------------------------------------------------------<br />
<br />
option explicit<br />
<br />
function getTextFromFile(path)<br />
dim fso, f, txt<br />
set fso = createobject("Scripting.FileSystemObject")<br />
if not fso.fileexists(path) then<br />
getTextFromFile = ""<br />
exit function<br />
end if<br />
set f = fso.opentextfile(path,1)<br />
if f.atendofstream then txt = "" else txt = f.readall<br />
f.close<br />
set f = nothing<br />
set fso = nothing<br />
getTextFromFile = txt<br />
end function<br />
<br />
dim redir, mailto, mailfrom, subject, item, body, cc, bcc, message, html, template, usetemplate, testmode<br />
redir = request.form("redirect")<br />
mailto = request.form("mailto")<br />
cc = request.form("cc")<br />
bcc = request.form("bcc")<br />
mailfrom = request.form("mailfrom")<br />
subject = request.form("subject")<br />
message = request.form("message")<br />
template = request.form("template")<br />
testmode = lcase(request.form("testmode"))="yes"<br />
<br />
if len(template) > 0 then template = getTextFromFile(server.mappath(template))<br />
if len(template) > 0 then usetemplate = true else usetemplate = false<br />
dim msg : set msg = server.createobject("CDONTS.NewMail")<br />
if usetemplate and lcase(request.form("html")) = "yes" then<br />
msg.bodyformat = 0 '(html)<br />
msg.mailformat = 0 '(mime)<br />
end if<br />
msg.subject = subject<br />
msg.to = mailto<br />
msg.from = mailfrom<br />
if len(cc) > 0 then msg.cc = cc<br />
if len(bcc) > 0 then msg.bcc = bcc<br />
<br />
if not usetemplate then<br />
body = body & message & vbcrlf & vbcrlf<br />
else<br />
body = template<br />
end if<br />
for each item in request.form<br />
select case item<br />
case "redirect", "mailto", "cc", "bcc", "subject", "message", "template", "html", "testmode"<br />
case else<br />
if not usetemplate then<br />
if item <> "mailfrom" then body = body & item & ": " & request.form(item) & vbcrlf & vbcrlf<br />
else<br />
body = replace(body, "[$" & item & "$]", replace(request.form(item),vbcrlf,"<br>"))<br />
end if<br />
end select<br />
next<br />
<br />
if usetemplate then 'remove any leftover placeholders<br />
dim rx : set rx = new regexp<br />
rx.pattern = "\[\$.*\$\]"<br />
rx.global = true<br />
body = rx.replace(body, "")<br />
end if<br />
<br />
msg.body = body<br />
if testmode then<br />
if lcase(request.form("html")) = "yes" then<br />
response.write "<pre>" & vbcrlf<br />
response.write "Mail to: " & mailto & vbcrlf<br />
response.write "Mail from: " & mailfrom & vbcrlf<br />
if len(cc) > 0 then response.write "Cc: " & cc & vbcrlf<br />
if len(bcc) > 0 then response.write "Bcc: " & bcc & vbcrlf<br />
response.write "Subject: " & subject & vbcrlf & string(80,"-") & "</pre>"<br />
response.write body<br />
else<br />
response.write "<html><head><title>Sendmail.asp Test Mode</title></head><body><pre>" & vbcrlf<br />
response.write "Mail to: " & mailto & vbcrlf<br />
response.write "Mail from: " & mailfrom & vbcrlf<br />
if len(cc) > 0 then response.write "Cc: " & cc & vbcrlf<br />
if len(bcc) > 0 then response.write "Bcc: " & bcc & vbcrlf<br />
response.write "Subject: " & subject & vbcrlf & vbcrlf<br />
response.write string(80,"-") & vbcrlf & vbcrlf & "<span style=""color:blue;"">"<br />
response.write body & "</span>" & vbcrlf & vbcrlf<br />
response.write string(80,"-") & vbcrlf & "**END OF EMAIL**</pre></body></html>"<br />
end if<br />
else<br />
msg.send<br />
response.redirect redir<br />
end if<br />
set msg = nothing<br />
%><br />
sampleform.htm (from where sendmail.asp get executed)
<HTML><br />
<HEAD><br />
<TITLE>Sample Form</TITLE><br />
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><br />
<!-- ImageReady Preload Script (subpage nav.psd) --><br />
<SCRIPT TYPE="text/javascript"><br />
<!--<br />
<br />
function newImage(arg) {<br />
if (document.images) {<br />
rslt = new Image();<br />
rslt.src = arg;<br />
return rslt;<br />
}<br />
}<br />
<br />
function changeImages() {<br />
if (document.images && (preloadFlag == true)) {<br />
for (var i=0; i<changeImages.arguments.length; i+=2) {<br />
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];<br />
}<br />
}<br />
}<br />
<br />
var preloadFlag = false;<br />
function preloadImages() {<br />
if (document.images) {<br />
renting_over = newImage("images/renting-over.gif");<br />
aboutus_over = newImage("images/aboutus-over.gif");<br />
contactus_over = newImage("images/contactus-over.gif");<br />
allrentallistings_over = newImage("images/allrentallistings-over.gif");<br />
newlistings_over = newImage("images/newlistings-over.gif");<br />
search_over = newImage("images/search-over.gif");<br />
preloadFlag = true;<br />
}<br />
}<br />
<br />
</SCRIPT><br />
<!-- End Preload Script --><br />
<script language="JavaScript" type="text/JavaScript"><br />
<!--<br />
function MM_findObj(n, d) {
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {<br />
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}<br />
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];<br />
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);<br />
if(!x && d.getElementById) x=d.getElementById(n); return x;<br />
}<br />
<br />
function MM_validateForm() {
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;<br />
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);<br />
if (val) { nm=val.name; if ((val=val.value)!="") {<br />
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');<br />
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';<br />
} else if (test!='R') { num = parseFloat(val);<br />
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';<br />
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');<br />
min=test.substring(8,p); max=test.substring(p+1);<br />
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';<br />
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }<br />
} if (errors) alert('The following error(s) occurred:\n'+errors);<br />
document.MM_returnValue = (errors == '');<br />
}<br />
</script><br />
<link href="rentalempire.css" rel="stylesheet" type="text/css"><br />
</HEAD><br />
<BODY ONLOAD="preloadImages();"><br />
<form action="sendmail.asp" method="post"><br />
<TABLE width="450" border=0><br />
<TR> <br />
<TD colSpan=2><p>Please use this form to get repairs organised for the property <br />
you are renting.</p></TD><br />
</TR><br />
<TR> <br />
<TD>Name: </TD><br />
<TD> <INPUT size=35 name="Tenants-Name"> </TD><br />
</TR><br />
<TR> <br />
<TD>Email: </TD><br />
<TD> <INPUT size=35 name="mailfrom"> </TD><br />
</TR><br />
<TR> <br />
<TD>Date: </TD><br />
<TD> <INPUT name="Date"> </TD><br />
</TR><br />
<TR> <br />
<TD>Contact Details</TD><br />
<TD> </TD><br />
</TR><br />
<TR> <br />
<TD vAlign=top> Property Address: </TD><br />
<TD> <TEXTAREA name="Property-Address" rows=2 cols=22></TEXTAREA> </TD><br />
</TR><br />
<TR> <br />
<TD>Work Phone: </TD><br />
<TD> <INPUT name="Work-Number"> </TD><br />
</TR><br />
<TR> <br />
<TD>Home Phone: </TD><br />
<TD> <INPUT name="Home-Number"> </TD><br />
</TR><br />
<TR> <br />
<TD>Mobile Phone: </TD><br />
<TD> <INPUT name="Mobile-Number"> </TD><br />
</TR><br />
<TR> <br />
<TD colSpan=2>Repair Details</TD><br />
</TR><br />
<TR> <br />
<TD vAlign=top> Repairs Required: </TD><br />
<TD> <TEXTAREA name="Repairs-required" rows=3 cols=22></TEXTAREA> </TD><br />
</TR><br />
<TR> <br />
<TD vAlign=top>Access for Tradesperson: </TD><br />
<TD><textarea name="Access-for-Tradesperson" rows=2 cols=22></textarea> <br />
</TD><br />
</TR><br />
<TR> <br />
<TD colSpan=2><div align="center"> <br />
<input name="submit" type=submit onClick="MM_validateForm('Tenants-Name','','R','mailfrom','','R','Date','','R','Property-Address','','R','Repairs-required','','R');return document.MM_returnValue" value=Send details!><br />
</div></TD><br />
</TR><br />
<TR> <br />
<TD> </TD><br />
<td><input name="redirect" type="hidden" id="redirect" value="thanks.htm"> <br />
<input name="mailto" type="hidden" id="mailto" value="alsoc@alsoc.com"> <br />
<input name="subject" type="hidden" id="subject" value="Website Form Submission: Request for Repairs"> <br />
<input name="template" type="hidden" id="template" value="emailtemplate.htm"> <br />
<input name="html" type="hidden" id="html" value="no"> </td><br />
</TR><br />
</TABLE><br />
</form><br />
</BODY><br />
</HTML>
here is the php file which is running ok at linux server but not at windows server:
this is html page url: http://www.alsoc.org/alsoc/php/pdf.html[^]
<HTML><br />
<HEAD><br />
<TITLE></TITLE><br />
<META name="description" content=""><br />
<META name="keywords" content=""><br />
<META name="generator" content="CuteHTML"><br />
<script language="javascript"><br />
<br />
function comprobadades(){<br />
sortir = 0;<br />
if (document.form1.Name.value == '') {<br />
window.alert('The fields with an * are required. Please, be sure that you fill them up.');<br />
document.form1.Name.focus();<br />
sortir = 1;<br />
}<br />
<br />
if (document.form1.Country.value == '' && sortir == 0) {<br />
window.alert('The fields with an * are required. Please, be sure that you fill them up.');<br />
document.form1.Country.focus();<br />
sortir = 1;<br />
}<br />
<br />
if (document.form1.Email.value == '' && sortir == 0) {<br />
window.alert('The fields with an * are required. Please, be sure that you fill them up.');<br />
document.form1.Email.focus();<br />
sortir = 1;<br />
}<br />
<br />
if (document.form1.Phone.value == '' && sortir == 0) {<br />
window.alert('The fields with an * are required. Please, be sure that you fill them up.');<br />
document.form1.Phone.focus();<br />
sortir = 1;<br />
}<br />
if (sortir == 0){<br />
document.form1.submit();<br />
}<br />
}<br />
</script><br />
</HEAD><br />
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080"><br />
<br />
Please fill in your details.<br><br><br />
<br />
<form name="form1" action="down.php" method="POST"> <br />
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"><br />
<tr><br />
<td><FONT color=#000080 face=Arial size=2>Name *</FONT><br />
</td><br />
<td><INPUT type="text" name="Name" size=32><br />
</td><br />
</tr><br />
<TD><br />
<FONT color=#000080 face=Arial size=2>Country *</FONT><br />
</TD><br />
<TD><br />
<FONT color=#000080 face=Arial size=1><INPUT name=Country size=32><br />
</FONT><br />
</TD><br />
<br />
</tr><br />
<tr><br />
<td><br />
<FONT color=#000080 face=Arial size=2>E-mail *</FONT><br />
</td><br />
<td><INPUT name=Email size=32><br />
</td><br />
</tr><br />
<tr><br />
<td valign="top"><br />
<FONT color=#000080 face=Arial size=2>Phone *</FONT><br />
</td><br />
<td><INPUT name=Phone size=32><br />
</td><br />
</tr><tr><td><input type="button" name="btn" value="download" onClick="javascript:comprobadades()"> </td></tr></table></form><br />
</BODY><br />
</HTML><br />
now code of down.php
<?php<br />
<br />
if(isset($HTTP_POST_VARS["Name"])){ <br />
$Name = $HTTP_POST_VARS["Name"];<br />
} <br />
else{<br />
print("missing file name");<br />
exit;<br />
} <br />
if(isset($HTTP_POST_VARS["Country"])){ <br />
$Country = $HTTP_POST_VARS["Country"];<br />
} <br />
else{<br />
print("wrong country name");<br />
exit;<br />
<br />
} <br />
if(isset($HTTP_POST_VARS["Email"])){ <br />
$Email = $HTTP_POST_VARS["Email"]; <br />
} <br />
else{<br />
print("wrong Email-address");<br />
exit;<br />
} <br />
if(isset($HTTP_POST_VARS["Phone"])){ <br />
$Phone = $HTTP_POST_VARS["Phone"];<br />
} <br />
else{<br />
print("wrong phone number");<br />
exit;<br />
} <br />
<br />
$mailto = "alsoc@alsoc.org";<br />
$subject = "USDCHF pdf file download";<br />
$header = $header."From: alsoc@alsoc.org\n";<br />
<br />
$body = "Information\n";<br />
$body = $body."-----------\n";<br />
$body = $body."Name : ".$Name."\n";<br />
$body = $body."Country: ".$Country."\n";<br />
$body = $body."Email : ".$Email."\n";<br />
$body = $body."Phone : ".$Phone."\n";<br />
<br />
if(mail($mailto,$subject,$body,$header)) {<br />
echo "Mail is sent!";<br />
}<br />
else {<br />
echo "Mail could not be sent!";<br />
exit;<br />
}<br />
<br />
print "<br><br>";<br />
print("click here for start <a href=\"down2.php?file=usdjpy.pdf\">download</a>");<br />
<br />
<br />
$fp = fopen ("/alsoc.org/www/alsoc/php/oildatfile/oil.dat", "a+");<br />
fputs ($fp, "$Name\t$Country\t$Email\t$Phone\n");<br />
fclose($fp);<br />
<br />
?><br />
let me know is there any problem with these above code.
requried urgent help on this regards.
sujata.
|
|
|
|
|
Dear,
You can’t restart SMTP; to do this you must contact your web server administrator.
If your web application deployed under windows based server you just confirm with your administrator whether you can use CDONTS or CDO because now a days most of the windows based server (2000/2003/XP) are using CDO instead of CDONTS
And one more thing you need to confirm with your administrator that is.
Is they assigned your IP Address in SMTP Virtual Server if not you just ask them to assign your IP..............................
N.Rajakumar B.E.,
Application Developer,
|
|
|
|
|