aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes mailto form in html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "mailto form in html" Watch "mailto form in html" New topic
Author

mailto form in html

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
ok this is what I have html wise:



and this is my sendemail() function in javascript:



why won't this work? I don't see why it wouldn't. It looks fine to me lol
but then again I'm a noob.

Thanks,

Justin Fox
[ December 28, 2007: Message edited by: Bear Bibeault ]

You down with OOP? Yeah you know me!
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
ok, the thing is working now, i just didnt put '()' after submit in my version of the code. but that just brings up outlook.

I dont want that, I just want the thing to email me directly.

Is this possible?

Thanks,

Justin Fox
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61653
    
  67

Not possible. All the mailto pseudo-url does is to launch your default mail app.

To send email you need to have something on the server side do it for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
:/ php it is i guess...
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
ok i have the mail form working now, I used ajax though, so I don't have to refresh the page.

when I input my message, when I get the email, my returns don't apply.

for example: if in the email "form" I type:

hello.
my name.
is justin.

when I get the email it shows up like this.

hello.my name.is justin.

how do I go about fixing this?

Thanks,

Justin Fox
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
I looked into the nl2br() function, but that doesnt seem to work either..
any direction would be nice

Thanks,

Justin Fox
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61653
    
  67

Please read this.

You are posting to JavaRanch not phpRanch, and on a Saturday, and you expect immediate responses?

First thing I'd do is to see how the line breaks from the text area being delivered to the server.
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
That's funny, I never said I wanted an immediate response...

And PHP is an internet based programming language which you use with and to make ajax work. So I believe these questions are totally appropriate.

And again, Thank for the advice.

Justin Fox
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61653
    
  67

At no point did I say inappropriate... it's just that you are unlikely to get quick responses on a topic that is not core to this site. Your post a few back sounded kind of pushy; if that was not your intention, no issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mailto form in html