|
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
|
|
|
|
|
the check I was using...
if(typeof xmlDoc.getElementsByTagName("city")[0].childNodes[0] != "undefined")
{
document.getElementById("city").value = xmlDoc.getElementsByTagName("city")[0].childNodes[0].nodeValue;
}
IE did not complain about the object (childNode[0]) being undefined. Nor did FF. FF just assigned a blank string to city and IE would choke at the assignment and toss the error.
Maybe I could have done this to check if the value is set, but I have not checked if it is even valid.
if(typeof xmlDoc.getElementsByTagName("city")[0].childNodes[0].nodeValue != "undefined")
I now use this and it works fine...
if(typeof xmlDoc.getElementsByTagName("city")[0].childNodes[0] != "undefined")
{
if(xmlDoc.getElementsByTagName("city")[0].childNodes[0].nodeValue!="-1")
{
document.getElementById("city").value = xmlDoc.getElementsByTagName("city")[0].childNodes[0].nodeValue;
}
else
{
document.getElementById("city").value = "";
}
}
I check server side for an empty string and instead return a -1 when one is found.
|
|
|
|
|
Ok so I'm new(ish) to web stuff being predominantly a C/C++ programmer up to now. I'm looking to produce my own website (for fun (!)) to display photos in gallery and slideshow form, I'd like it to be flashy and cool with nice transitions between photos, lots of shiny things, reflections etc ( )
Whats the best route to go down as regards what language(s) to start with?
|
|
|
|
|
The language doesn't really matter, you can do all if with html and JavaScript.
However, it would be an easier transition from C++ to C# and JavaScript since the syntax and structure is very similar.
I would recommend looking at the JQuery as it provides a nice library of useful UI widgets and functions for JavaScript. Silverlight would also get you the very flashy coolness but it has a learning curve for one not accustomed to .NET
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks for the advice - what sort of tools should I be using for Javascript?
|
|
|
|
|
You don't need any tools except notepad really. VS will give intellisence if it's setup, but that won't help with learning the language. For that you would need to pick up book or look on the web, plenty of resources there.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
cheers - I'll get started, watch this space...
|
|
|
|
|
html,javascript and css2.1 to start.
then work into a server side script like php.
next would be to learn to code ajax.
keep an eye on html5 and css3 too, I suspect it is coming online quicker than most think and can displace both silverlight and flash.
---------
tools I use is notepad++ on windows and bluefish editor on linux, both free
use firefox with its webdeveloper and firebug addons to run and debug scripts.
of course a webserver, iss is ok, but I like abyss webserver [x-1 I think] (again free)
|
|
|
|