|
You need to send mail in a free hosting that does not support mail object (like free account of brinkster)this is a solution:
Try my demo:
http://www25.brinkster.com/vokha/mail.asp
This is my code(This code using CDOSYS to send mail):
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Source code send mail in anyhost that support ASP and run below Windows 2000
'This source code send mail using a remote SMTP server that support open relay
'If you can't send mail in any server by this code. Please contact me. Because I using another
'server to send mail. So if someone change my password. It doesn't work. To make it work you
'should go to http://online.ie/registration/index.adp (Or any SMTP Server that support open relay). Register an account
'and place your username and password in the following code
'
' objConfig.Fields(cdoSMTPServer) = "Your server"
' objConfig.fields(cdoSendUserName) = "Your account"
' objConfig.fields(cdoSendPassword) = "Your password"
'
'Written by: VO KHA
'Email: one_puppy@yahoo.com
'Website: http://www.qitt.com, http://www.qitt.com/forum/
'Referce: msdn.microsoft.com, file cdosys.idl
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
if(trim(Request.Form("btnSend")) <> "") then
Dim strFrom, strTo, strSubject, strBody
strFrom = trim(Request.Form("txtFrom"))
strTo = trim(Request.Form("txtTo"))
strSubject = trim(Request.Form("txtSubject"))
strBody = trim(Request.Form("txtContent"))
call CDOSYSSendMail(strFrom, strTo, strSubject, strBody)
end if
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function CDOSYSSendMail(strFrom, strTo, strSubject, strBody)
Const cdoSendUsingPort = 2
Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort = "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPAuthenticate = "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic = 1
Const cdoSendUserName = "http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword = "http://schemas.microsoft.com/cdo/configuration/sendpassword"
Dim objMessage, objConfig
Set objMessage = CreateObject("CDO.Message")
Set objConfig = CreateObject("CDO.Configuration")
objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort
objConfig.Fields(cdoSMTPServer) = "mail.online.ie"
objConfig.Fields(cdoSMTPServerPort) = 25
objConfig.Fields(cdoSMTPAuthenticate) = cdoBasic
objConfig.fields(cdoSendUserName) = "one_puppy"
objConfig.fields(cdoSendPassword) = "testme"
objConfig.Fields.Update
Set objMessage.Configuration = objConfig
objMessage.To = strTo
objMessage.From = strFrom
objMessage.Subject = strSubject
objMessage.TextBody = strBody
On Error Resume Next
objMessage.Send
If Err.Number = 0 Then
Response.Write("Send successful!")
Else
Response.Write("Cannot send your email: Error " + err.Description )
Err.Number = 0
End If
On Error Goto 0
end function
%>
From: | | To | | Subject | | Content: | <%=strBody%> | | | | | |
|
Welcome to my website:
www.qitt.com
You can win if you want
|
|
|
|
|
Hi,
I think whatever you are saying is not a Open Relay, if I am right. You are sending mail through the SMTP servers with the mail account for which you have registered for yourself.
Perhaps for definitions of Open Relay and Third Party Relay, please check this URL.
http://mail-abuse.org/rbl/relay.html
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Hi
I have a problem with font sizes on my webpage. At the moment I'm using
which shows fine on my browser, but way too small on others (all viewed on 1024 x 768 resolution). If I set the size to '2', the font is way too big on my browser, but OK on other browsers.
And don't want fixed font sizes, so what is the best option?
tx
|
|
|
|
|
I know this sounds obvious, but...
have you checked the Text Size you are using on your own browser?
(in the "View"/"Text Size"... menu in IE)
It sounds as though your own browser is set to Text Size "Large" or "Larger".
Another possible cause...
are you using a non-standard font, which may be installed on your own system, but not on anyone else's? The font could be being substituted for one that displays "smaller" given the same font size.
Hope this helps!
-- JON --
Good Fast Cheap...
(Pick two, you can't have all three!)
|
|
|
|
|
Yeah, I should probably stick to the "normal" fonts.
are there any templates on the web for web page designs?
tx
|
|
|
|
|
On my web pages, I tend to match the "normal" font size to that of the windows font. So I guess it doesn't matter what screen resolution other people are running because it would appear to be "normal" to them anyway. There will always be people that changed the fonts to the windows menus etc to what they want and as good a mind reader that I am, I just don't know what the user does with the fonts on their system. And I think at least if I set the fonts of the website similar to the standard system fonts then it would suit the majority of users.
|
|
|
|
|
I don't know about you, but I use <td valign = "top">... quite a lot when I build HTML tables.
I have however never learnt the equivalent command in CSS. Could someone enlighten me on this one? I've been looking everywhere on and off for a year, but has come up with nada. I search the net everytime I start a new project when I bump into this little "problem", but give up after an hour of wasted time.
Is it possible I have to fiddle with flows and offsets? Please don't tell me I've just missed some silly CSS property, or I'll have to commit harakiri.
--
Shine, enlighten me - shine
Shine, awaken me - shine
Shine for all your suffering - shine
|
|
|
|
|
Try verticalAlign - auto
- Aligns the contents of an object according to the value of the layout-flow attribute.
- baseline
- Default. Aligns the contents of an object supporting VALIGN to the base line.
- sub
- Vertically aligns the text to subscript.
- super
- Vertically aligns the text to superscript.
- top
- Vertically aligns the contents of an object supporting VALIGN to the top of the object.
- middle
- Vertically aligns the contents of an object supporting VALIGN to the middle of the object.
- bottom
- Vertically aligns the contents of an object supporting VALIGN to the bottom of the object.
- text-top
- Vertically aligns the text of an object supporting VALIGN to the top of the object.
- text-bottom
- Vertically aligns the text of an object supporting VALIGN to the bottom of the object.
http://msdn.microsoft.com/workshop/author/css/reference/css_ref_entry.asp[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Thank you very much! I can't believe I've been so damn blind!
Now, where did I put that harakiri sword?
--
Shine, enlighten me - shine
Shine, awaken me - shine
Shine for all your suffering - shine
|
|
|
|
|
Jörgen Sigvardsson wrote:
Now, where did I put that harakiri sword?
Right next to the Why Life Is So Great inspirational video.
Don't worry, I thought I knew a lot about CSS. I knew about vertical-align but only a few of it's values. It is a good lesson why you should not become dependant on what VS.NET tells you are possible values
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Paul Watson wrote:
Right next to the Why Life Is So Great inspirational video.
Ah, found it. Just next to "101 ways to reach Sto-Vo-Kor" On a more serious note, life is great. I've never doubted that. It's just that it's great in too many ways. I could've settled with half.
Paul Watson wrote:
It is a good lesson why you should not become dependant on what VS.NET tells you are possible values
How true! I'm baffled though that I didn't find what I was looking for at www.w3c.org[^]. I use the recommendation documents quite often. I guess I can conclude this with the cliché "It's hard to see the forrest with all the trees blocking my view"or whatever the saying is in English
--
Shine, enlighten me - shine
Shine, awaken me - shine
Shine for all your suffering - shine
|
|
|
|
|
Just looked and found vertical-align values[^].
Still, it is the browser implementations that are probably your biggest problem. Bet they are all over the place.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Hopefully it will work out fine. The biggest differences between IE and Mozilla based browser I've seen, with respect to CSS, are sizes. Percent sizes in CSS behave very differently depending on if you've specified a size in the parent element or not. Very peculiar since old style width and height attributes seem to work just fine.
The only requirements I have are that this should work on IE and mozilla based browsers, and I will do weird and wonderful hacks to make it work if necessary.
--
Shine, enlighten me - shine
Shine, awaken me - shine
Shine for all your suffering - shine
|
|
|
|
|
Been scratching my head for too long now, so I hope there are someone out there who can tell me how to do this:
What I got:
I got an Access database with two tables, one for productcategories and one for products. In the products table I also got a unit price column.
On a webpage I got a form with two dropdown boxes and a textfield.
What I am doing:
The first dropdown box dynamically displays product categories via VBscript. No problem. The second dropdown box dynamically shows products in the selected product category. (No need to reload page as I use a Javascript array to store every possible value. It's not a big database).
What I want to do:
I need the price to dynamically show up in the textfield when a product has been selected.
I know the theory behind it. I need to load all the prices into a Javascript array from the database... but I can't understand how this is done in the code. (I mainly copied and pasted the code I got so far).
Copy of successful code below, anyone that could tell me how I can get the prices into an array and make them appear in a textfield?
Cheers
John
--- CODE ------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="950"%>
<!--#include file="Connections/CoffeeDarts.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_CoffeeDarts_STRING
Recordset1.Source = "SELECT ProductType FROM ProductType"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim rslist2
Dim rslist2_numRows
Set rslist2 = Server.CreateObject("ADODB.Recordset")
rslist2.ActiveConnection = MM_CoffeeDarts_STRING
rslist2.Source = "SELECT ProductType, ProductName FROM Products"
rslist2.CursorType = 0
rslist2.CursorLocation = 2
rslist2.LockType = 1
rslist2.Open()
rslist2_numRows = 0
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<!-- Dynamic Dependent List box Code for *** VBScript *** Server Model //-->
<script language="JavaScript">
<!--
var arrDynaList = new Array();
var arrDL1 = new Array();
arrDL1[1] = "selList1"; // Name of parent list box
arrDL1[2] = "form1"; // Name of form containing parent list box
arrDL1[3] = "selList2"; // Name of child list box
arrDL1[4] = "form1"; // Name of form containing child list box
arrDL1[5] = arrDynaList;
<%
Dim txtDynaListRelation, txtDynaListLabel, txtDynaListValue, oDynaListRS
txtDynaListRelation = "ProductType" ' Name of recordset field relating to parent
txtDynaListLabel = "ProductName" ' Name of recordset field for child Item Label
txtDynaListValue = "ProductName" ' Name of recordset field for child Value
Set oDynaListRS = rsList2 ' Name of child list box recordset
Dim varDynaList
varDynaList = -1
Dim varMaxWidth
varMaxWidth = "1"
Dim varCheckGroup
varCheckGroup = oDynaListRS.Fields.Item(txtDynaListRelation).Value
Dim varCheckLength
varCheckLength = 0
Dim varMaxLength
varMaxLength = 0
While (NOT oDynaListRS.EOF)
If (varCheckGroup <> oDynaListRS.Fields.Item(txtDynaListRelation).Value) Then
If (varCheckLength > varMaxLength) Then
varMaxLength = varCheckLength
End If
varCheckLength = 0
End If
%>
arrDynaList[<%=(varDynaList+1)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListRelation).Value)%>"
arrDynaList[<%=(varDynaList+2)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListLabel).Value)%>"
arrDynaList[<%=(varDynaList+3)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListValue).Value)%>"
<%
If (len(oDynaListRS.Fields.Item(txtDynaListLabel).Value) > len(varMaxWidth)) Then
varMaxWidth = oDynaListRS.Fields.Item(txtDynaListLabel).Value
End If
varCheckLength = varCheckLength + 1
varDynaList = varDynaList + 3
oDynaListRS.MoveNext()
Wend
If (varCheckLength > varMaxLength) Then
varMaxLength = varCheckLength
End If
%>
//-->
</script>
<!-- End of object/array definitions, beginning of generic functions -->
<script language="JavaScript">
<!--
function setDynaList(arrDL){
var oList1 = document.forms[arrDL[2]].elements[arrDL[1]];
var oList2 = document.forms[arrDL[4]].elements[arrDL[3]];
var arrList = arrDL[5];
clearDynaList(oList2);
if (oList1.selectedIndex == -1){
oList1.selectedIndex = 0;
}
populateDynaList(oList2, oList1[oList1.selectedIndex].value, arrList);
return true;
}
function clearDynaList(oList){
for (var i = oList.options.length; i >= 0; i--){
oList.options[i] = null;
}
oList.selectedIndex = -1;
}
function populateDynaList(oList, nIndex, aArray){
for (var i = 0; i < aArray.length; i= i + 3){
if (aArray[i] == nIndex){
oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i + 2]);
}
}
if (oList.options.length == 0){
oList.options[oList.options.length] = new Option("[none available]",0);
}
oList.selectedIndex = 0;
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_callJS('setDynaList(arrDL1)')">
<form name="form1" method="post" action="">
<table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="120" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="120" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
<td><img src="images/spacer.gif" alt="" width="100" height="1"></td>
</tr>
<tr>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">
<input name="quantity" type="text" id="quantity" size="5">
</font></td>
<td><select name="selList1" id="select" onChange="MM_callJS('setDynaList(arrDL1)')">
<%
While (NOT Recordset1.EOF)
%>
<option value="<%=(Recordset1.Fields.Item("ProductType").Value)%>"><%=(Recordset1.Fields.Item("ProductType").Value)%></option>
<%
Recordset1.MoveNext()
Wend
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
%>
</select></td>
<td><select name="selList2" id="select2">
</select></td>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">NT
<input name="unitPrice" type="text" id="unitPrice" size="6">
</font></td>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">
<input name="voucher" type="text" id="voucher" size="5">
張 </font></td>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">
<input name="refilled" type="text" id="refilled" size="5">
次</font></td>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">
<input name="discount" type="text" id="voucher3" size="5">
%</font></td>
<td><font color="#844B00" size="3" face="Arial, Helvetica, sans-serif">NT
<input name="subTotal" type="text" id="subTotal" size="6">
</font></td>
</tr>
</table>
</form>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
rslist2.Close()
Set rslist2 = Nothing
%>
|
|
|
|
|
Hi,
In my recent project I have a requirement to support two browser
instances, each of them using 2 different dialup connection settings.
How can point a browser to point to specific dial up settings?
I checked MSDN and some other sites such as codeguru.com & codeproject.com ,
but all my efforts are in vain.
I tried with normal Internet Explorer setting Internet options, which If we change once
are affecting the settings globally.
and also I tried using web browser control and winINet API..
Can you please give me an idea which will show me some path to solve this problem?
Thanks alot in advance..
Kiran
|
|
|
|
|
Hi
How do webpages update themselves automatically, like the ones that shows the soccer scores during the world cup?
tx
|
|
|
|
|
G'day....
One (simple) way is to use the JavaScript "setTimeout()" function.
Eg:
timeDelay = 30; // Time of delay before refresh in seconds.
myTimer = setTimeout( "refreshThisPage();" , (timeDelay * 1000) );
function refreshThisPage() {
document.location.replace("www.MyURL.com");
}
Hope this helps!;)
-- JON --
Good Fast Cheap...
(Pick two, you can't have all three!)
|
|
|
|
|
|
A variation on this would be to use the XMHTTP object with "setTimeOut()" for a partial refresh.
Cheers,
Simon
"I ask candidates to create an object model of a chicken.", Bruce Eckel on interviewing programmers.
animation mechanics in SVG (latest pic 1) (latest pic 2)
|
|
|
|
|
|
there are a few ways of doing this..
one is with the META tag <meta http-equiv="refresh" content="100"> , which will reload the complete page after 100 seconds.
another, which I prefer when I really am not interested in reloading the entire page, is with an IFRAME. You can create an individual page the has the necesary process (ASP, PHP, whatever) and reloads after a couple of seconds.
<iframe left="0" top="0" width="600" height="80" z-index="2" scrolling="no" marginwidth=0 marginheight=0 frameborder=0 name="scores" src="http://www.yoursite.com/scores.asp"></iframe>
of course you'll have a page called scores.asp that will do whatever you need to do and have the <meta http-equiv="refresh" content="100"> so that only that section of your page does the trick.
IFRAMEs are pretty niffty since they work like a layer. You could even put it inside a cell of the main table of your site (for example).
hope that works
luck
Jon
x-zd Designs
|
|
|
|
|
Dear all,
I got a problem. I'll like to popup a window, and while it closed, I could get it's return value. I write those codes like this:
(***in main.aspx************************):
...
function popup(){
var r=window.showModalDialog("Search.aspx","QSWindow","Toolbar:yes");
document.all("Textbox1").value=r.returnID;
}
...
POP-UP Search window
(***and in search.aspx*******************):
...
function closeMe(rid){
this.returnID = rid;
}
...
Close ME
...
now I execute the main.aspx at IE6, and It appears an error message when I push 'Close ME' at search.aspx: "..returnID is null or not an object...."
So I can sure I don't get the return value. If someone could tell me why? or tell me another way to pass variables within main/search window using javascript? please~
Peter 2003.03.12 (Taiwan)
|
|
|
|
|
Hi all,
I've successfully created several web services and invoked them
without problem from my own machine. I've even consumed the services
from separate machines, but now I'm starting to think about deployment
and how exactly this is going to work.
Currently, I have the following directory structure for a web service
:
--- Web Services
--- MailWebService
--- Bin
As of now, all of the assembly references are copied locally in the
corresponding "Bin" directory. Obviously, this is a less than ideal
deployment structure, as most of these assemblies are used by other
applications/services and need to reside outside the
"Web Services\MailWebService\Bin". Ideally, I'd like to store all the
assemblies in one central "Bin" directory that both web services and
win applications can access, but I'm not exactly sure how I can
accomplish this. Prior to .NET, this was not a problem because of the
use of the registry, but I'm still a little ignorant how to accomplish
the same goal with .NET.
Any ideas on how I can reference the same assemblies from different
channels without having to duplicate bins across my directory
structure?
Thanks
-John
|
|
|
|
|
|
You can mix and match your managed and unmanaged code using MC++ - definitely at least take a look, since it may solve the problem
cheers,
Chris Maunder
|
|
|
|
|