Click to See Complete Forum and Search --> : mailto:


virgil
01-30-2003, 09:33 PM
Hey all,:)

What would be the proper syntax for...

<input type='button' onclick='mailto:whoever@any.com'>


Ive tried innumerable variations ....location mail() etc.

Ive searched the manuels, sites, tuts, etc.

Trial and error just aint the way to go....

Thanks so much for any advice...

Tired and lost JS newbee...

Virgil

virgil
01-30-2003, 10:19 PM
Hello Again Dave:)

<input type='button' onclick='self.location.href=mailto:whoever@any.com'>


gives me a ';' expected JS alert error...


I tried sticking it before and after the last quote, but it dosen't seem to recognize it.

I dont have to put it between script tags do I?

Didnt have to with onclick=window.open()

Wait..........

Just saw it....Quote in the wrong place....should be...

<input type='button' onclick=self.location.href='mailto:whoever@any.com'>


Yep That did it!!!:D :D


Ill post this anyway just to give you another Big Ass Thanks:D


Virgil....Bedtime...

Charles
01-31-2003, 09:53 AM
Of course, that will fail one or more in ten times. The following will work whenever the client's server supports the "mailto:" pseudo-protocol.

<form action="mailto:fie@foe.fum">
<div><input type="submit"></div>
</form>

Charles
02-01-2003, 06:35 AM
Originally posted by Dave Clark
What's the DIV for? With the 4.01 Specification the FORM element can contain only BLOCK and SCRIPT elements.<!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form -->Form controls are inline elements.<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
<!ENTITY % block "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT | BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">