|
Even better, Cheers.
Sorry for delay, I was watching the footy.
Trying it out now.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
Just to get this straight, so that I fully understand the process...
I put the jscript into the header.
This calls the 'value' expression in the drop down menu, adds it to the 'mailto' and then adds the rest of the address and sends.
I need to change only the 'value' in the drop down to the correct email recipient, and the 'anycompany' to my own.
If that is correct, I have done it, and hopefully it will be fine.
Cannot check until I get to work tomorrow!
Thanks once more for your time on this.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
David, you might want to run a script that checks if customer has entered anything otherwise this is what will be sent out if somebody just hits the submit button thoughtlessly.
Customer Name :=Name
Telephone Number :=Tel No.
ContactType=sales
S1=
Customer Email Address :=
modified 1-Aug-19 21:02pm.
|
|
|
|
|
In the HEAD...
<script type='text/javascript'>
function notEmpty(elem, helperMsg)
{
if(elem.value.length == 0)
{
alert(helperMsg);
elem.focus();
return false;
}
return true;
}
</script>
In the Form...
<input type='text' id='S1'/>
<input type='button'
onclick="notEmpty(document.getElementById('S1'), 'Please Enter a Value')"
value='Check Field' />
Would this work?
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
I would be inclined to ask
(1) Have you designed, or wanting to eventually design, the pages of your website for dynamic content (all or at least most pages)
(2) Is it to be served, eventually, by dynamic created web pages on the server
(3) Are you, or are there plans to, capturing and validating data into a database
If yes to any of them, and more questions you might ask, then your small script, irrespective if it works or not, will not do. Apologies if this sounds rude, that was not the intention.
For client-side dynamics and validation, have a look at jQuery and some jQuery plug-ins. They really are rather excellent. But don't rely upon client-side validation. Do that validation etc on the server as well.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
1) Maybe, but very little planned
2) Pass
3) Possibly, but I have no requirements yet.
To be honest, I am not overly good at this yet, and am still learning.
I understand that you weren't being rude, and I am always pleased to get advice and help.
So thanks anyway, and I am sure that when new things come along I will ask recieve help when I have to grumpily announce that I have no idea what I am doing!
(One of the main reasons for CP after all!)
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
>>I put the jscript into the header.
yes
>>This calls the 'value' expression in the drop down menu, adds it to
Yes
>>the 'mailto' and then adds the rest of the address
yes
>>and sends.
No, it's sent when the submit button is clicked.
(but only if client has email installed and OK's the sending)
>>I need to change only the 'value' in the drop down
>>to the correct email recipient, and the 'anycompany' to my own.
Sounds right to me.
Good Luck.
|
|
|
|
|
Cheers.
I did mean 'OK's to send', I realise it would only send on the onclick.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
Hi Guys,
Please explain me how to configure Eclipse 3.4 with JBoss 5.0 server.When am try to configure getting an error as Missing classpath entry.
Give me the details regarding this issue.
Thanks,
Ram's.
|
|
|
|
|
I am pulling out my hair! All I want is for my method to be called in the body onload event. I am currently getting an "object expected" error when calling the external javascript function. I have given up, and hope that someone here can explain to me why the following works in every browser known to man except internet explorer:
tester.html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<script type="text/javascript" src="tester.js"></script>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
<title>Test Application</title>
</head>
<body onload="testFunc();">
<h1>Test Application</h1>
</body>
</html>
tester.js
function testFunc() {
alert('foo');
} Thanks for any assistance,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Works for me (in IE8) and looks okay. Perhaps try:
<script type="text/javascript" language="javascript" src="tester.js"><script>
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
(I apologize for the shortness of this answer, but I am currently at work. I was looking for an answer to my own question and I thought I might be able to help you with this)
Do you have the requirement that you *MUST* use the strict doc type def? At least for debugging purposes, try switching over to the Transitional DTD and see if your problem "magically" disappears.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
If it DOES disappear, and you have a "strict.dtd requirement", then you need to investigate which rule of the strict.dtd you have violated.
If you're developing with VS2008, put a breakpoint inside testFunc and see if you actually enter the method on pageLoad.
You also might want to test out switching your script to be written within a script block on the page rather than loaded from file. If that works, then you've got a problem with your file hooks.
<script type="text/javascript">
function testFunc(){
alert('foo');
}
</script>
...
<body onload="testFunc();">
If that doesn't work, then try switching out your double quotes to be single quotes just for gits and shiggles.
I know it's not super specific to the effect of "Oh. I know exactly what's causing that" but I hope I pointed you in a couple directions that might let you figure it out for yourself. Good luck!
"I need build Skynet. Plz send code"
|
|
|
|
|
Hi,
You guys would have seen the image cropping tool which has a selection option (marque tool) created in javascript.
[URL="http://marqueetool.net/examples/"]http://marqueetool.net/examples/[/URL]
Like this i want to get all elements under a selection.
For example in windows we have mouse group selection of files and folders by dragging the mouse to select multiple files. Like that i need to get all the elements under a selection in javascript. I can try other gimmicks but if there could be a simple tool then i can speed up my work.
Todays beautiful moments are
tomorrows beautiful memories.
http://vikku.info
modified on Friday, April 2, 2010 2:04 AM
|
|
|
|
|
In a window, to select multiple files or folders that are near each other, you may drag the mouse pointer to create a selection around the outside of all the items that you want to include, to do a similar thing in a web page you first create a div and size and position it, then compare it's coordinates to the objects on the page .
|
|
|
|
|
That's a good idea.
So, i need to do a recursive dom parsing or to use document.all if it is anywhere on the screen.
or if it is inside a layer for example a table or a div then i get all the elements inside it and have a compare with its left and top properties. That is get the coordinates and check it with the selection boundary. And we can filter out the elements which we need to work on using the className attribute. Nice. This will work. thank you.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
|
Oh yes and in another discussion i got that answer but i want it to be of core javascript. thank you.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Jayapal Chandran wrote: core javascript
There are no built in methods of function, you must create it, in JavaScript yourself. Rather than spending the time and resources to do so wouldn't you think it more efficient to use a pre-built library?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yes, i accpet but it is all that matters is pride. thats it.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
i m fecthing the records from a text file whose email id is coming from text file but it does not work please help
and i want to send email to those people whose email id is in text file one below other ?
here is my code below
<%
OpenDataBase conn
sql="select top 1 * from forexemail order by id desc "
set obj=server.CreateObject("adodb.recordset")
obj.open sql,conn,1,1
fname=obj("filename")
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile(Server.MapPath("/todothis/" & fname), 1)
xyz=f.ReadAll
Dim My_String
Dim My_Array
My_Array=split(xyz,vbcrlf)
Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")
for i=0 to ubound(My_Array)
arrs=My_Array(i)
if IsValidEmail(arss)=true then
ObjSendMail.Subject = "News"
ObjSendMail.From ="admin@bigbonenews.net"
ObjSendMail.TextBody ="file is attached please check it"
ObjSendMail.AddAttachment server.mappath("AlienLa0.gif")
Response.Write i & " = " & arrs & "<BR>"
ObjSendMail.To =arrs
ObjSendMail.Send
end if
next
|
|
|
|
|
This is not what you were expecting... anyway here i go...
Doesn't asp have an option of sending mail to multiple recipients in one shot like in php?
It has been a long time i have used that.
I could suggest a tedious work around. Have a dll or other com component specially for this which could send mail using smtp. or send mail using smtp by using sockets.
You should be able to get code snippets for this i hope...
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Try This,It worked for me
char[] splitter = { ';' };
string[] MailIdTo = txtMailTo.Text.Split(splitter);
string[] MailCc = txtMailCc.Text.Split(splitter);
string[] MailBcc = txtMailBcc.Text.Split(splitter);
MailMessage mailToSend = new MailMessage();
if (txtAuthenticationMailId.Text != "")
mailToSend.From = new MailAddress(txtAuthenticationMailId.Text);
else
mailToSend.From = new MailAddress("XYZ@gebbs.com");
for (int i = 0; i < MailIdTo.Count(); i++)
{
if (MailIdTo[i] != "")
mailToSend.To.Add(new MailAddress(MailIdTo[i]));
}
if (txtMailBcc.Text != "")
{
for (int i = 0; i < MailIdTo.Count(); i++)
{
if (MailCc[i] != "")
mailToSend.Bcc.Add(new MailAddress(MailCc[i]));
}
}
if (txtMailCc.Text != "")
{
for (int i = 0; i < MailIdTo.Count(); i++)
{
if (MailBcc[i] != "")
mailToSend.CC.Add(new MailAddress(MailBcc[i]));
}
}
if (FileUpload1.HasFile)
{
string FileName = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName);
mailToSend.Attachments.Add(new Attachment(FileUpload1.PostedFile.InputStream, FileName));
}
if (FileUpload2.HasFile)
{
string FileName = System.IO.Path.GetFileName(FileUpload2.PostedFile.FileName);
mailToSend.Attachments.Add(new Attachment(FileUpload2.PostedFile.InputStream, FileName));
}
if (FileUpload3.HasFile)
{
string FileName = System.IO.Path.GetFileName(FileUpload3.PostedFile.FileName);
mailToSend.Attachments.Add(new Attachment(FileUpload3.PostedFile.InputStream, FileName));
}
if (FileUpload4.HasFile)
{
string FileName = System.IO.Path.GetFileName(FileUpload4.PostedFile.FileName);
mailToSend.Attachments.Add(new Attachment(FileUpload4.PostedFile.InputStream, FileName));
}
if (FileUpload5.HasFile)
{
string FileName = System.IO.Path.GetFileName(FileUpload5.PostedFile.FileName);
mailToSend.Attachments.Add(new Attachment(FileUpload5.PostedFile.InputStream, FileName));
}
mailToSend.IsBodyHtml = true;
mailToSend.Body = txtBody.Text;
mailToSend.Subject = txtSubject.Text;
SmtpClient smtpMesg = new SmtpClient();
smtpMesg.Host = "smtp.emailsrvr.com";
smtpMesg.UseDefaultCredentials = false;
if (txtAuthenticationMailId.Text != "" && txtPassword.Text != "")
smtpMesg.Credentials = new System.Net.NetworkCredential(txtAuthenticationMailId.Text, txtPassword.Text);
else
smtpMesg.Credentials = new System.Net.NetworkCredential("XYZ@gebbs.com", "passw0rd");
smtpMesg.Send(mailToSend);
|
|
|
|
|
First, sorry if this is a numbskull question:
Is there a way to catch a 'start up' event from IIS?
Here is the problem:
I have a significant amount of data to cache when the web-service starts up and I have not found a way to (reliably!) get notified when the web service is first started.
If I could catch that event, then I could do all the data pre-fetches before the first web service caller comes in.
Thanx in advance.
Just trying to keep the forces of entropy at bay
|
|
|
|
|
Hello all,
This is more of a posting of my findings. I traced the issue I had with an ajax script error. Since I found little information on the web on a fix for it, I wanted to make this post.
The Issue:
I have an ajax call to a script that returns contact information stored in a database. The xml result looks like this
<rs>
<coname>A Company</coname>
<addr>123 main st.</addr>
<city></city>
<state></state>
<zip>77001</zip>
</rs>
When the returned information include fields that are empty ie will throw an error "object required" when you try to access the value like...
document.getElementById("city").value = xmlDoc.getElementsByTagName("city")[0].childNodes[0].nodeValue;
...this is the source of the ie error, firefox does not generate an error.
Testing for empty string or null has no effect.
To work around it you can test for an empty sring in the result from the database query and either use a character string to test for in your callback function or leave the value out of the xml and test for undefined. Like..
<rs>
<coname>A Company</coname>
<addr>123 main st.</addr>
<city>-1</city>
<state>-1</state>
<zip>77001</zip>
</rs>
or
<rs>
<coname>A Company</coname>
<addr>123 main st.</addr>
<zip>77001</zip>
</rs>
Anyone else have ideas on this issue, I would like to hear them.
All the Best!
|
|
|
|
|
if(xmlDocument.getElementsByTagName("city")){
if(xmlDocument.getElementsByTagName("city").childNodes){
alert(xmlDocument.getElementsByTagName("city")[0].nodeValue)
}}
That's just a sorta, the idea is to test
for the object before accessing its property.
modified on Thursday, April 1, 2010 7:27 PM
|
|
|
|