/    Sign up×
Community /Pin to ProfileBookmark

Suggestions script

I downloaded the suggestions script in the forms section. The only change I made was to the mailto statement. The script sent the email to me bu the body where the suggestion was supposed to be was blank. the subject was correctly filled in. How can I get this script to pass the suggestions to my email client(outlook express).
I didn’t change any of the other statements. Was there an error in the script. I know very little of Javascript and I have no clue where to look or even what to look for to correct this problem. [url]http://forums.webdeveloper.com/newthread.php?action=newthread&forumid=3&#[/url]
[url]http://forums.webdeveloper.com/images/smilies/redface.gif[/url] Please help:eek:

Robert B.:o

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@oleragMar 07.2004 — You should post your code and also a link to the site's code

sample can help too. Right now, those links in your post

don't cut it.
Copy linkTweet thisAlerts:
@David_HarrisonMar 07.2004 — I don't think that IE or Outlook Express like you using the body= in the mailto: so I don't think what you want to do can be done. You could always look into server-side mailing though.
Copy linkTweet thisAlerts:
@RBosticauthorMar 07.2004 — I include my code this time.

<html>

<head>

<title>Suggestion</title>

<SCRIPT LANGUAGE="JavaScript">



<!-- Begin

function leaptoIntro() {

window.location="http://rebostic.com"

}

function About() {

alert("nHave a suggestion for a JavaScript example?nnFill out the form and submit it. I will see what I can do.nnPlease be as specific as possible.");

document.forms[0].elements[1].focus();

}

function Reset() {

document.forms[0].elements[1].value = "";

document.forms[0].elements[2].value = navigator.appName + " " + navigator.appVersion;

document.forms[0].elements[3].value = "";

document.forms[0].elements[1].focus();

}

function submitForm() {

if ( (isName() ) && (isBrowser()) && (isSuggestion()) ) {

if (confirm("nYour submission is about to be sent.nnClick YES to submit.nnClick NO to cancel."))

return true

else

return false;

}

else

return false;

}

function isName() {

var str = document.forms[0].elements[1].value;

if (str == "") {

alert("nThe NAME field is blank.nnPlease enter your name.")

document.forms[0].elements[1].focus();

return false;

}

for (var i = 0; i < str.length; i++) {

var ch = str.substring(i, i + 1);

if (((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch)) && ch != ' ') {

alert("nThe NAME field only accepts letters & spaces.nnPlease re-enter your name.");

document.forms[0].elements[1].select();

document.forms[0].elements[1].focus();

return false;

}

}

return true;

}

function isBrowser() {

if (document.forms[0].elements[2].value != navigator.appName + " " + navigator.appVersion) {

if (confirm("nYou've changed your browser type.nnClick YES to keep changes.nnClick NO to restore detected browser."))

return true

else

{

document.forms[0].elements[2].value = navigator.appName + " " + navigator.appVersion;

return true;

}

}

else

return true;

}

function isSuggestion() {

var str = document.forms[0].elements[3].value;

if (str == "") {

alert("nThe SUGGESTION field is blank.nnPlease enter your suggestion.")

document.forms[0].elements[3].focus();

return false;

}

else

return true

}

// End -->

</SCRIPT>

</head>

<body onLoad="Reset()">

<CENTER>

<FORM ENCTYPE="text/plain" NAME="test" METHOD='POST' ACTION='mailto:[email protected]?subject=JS

Suggestions' onSubmit="return submitForm()">

<INPUT TYPE="hidden" NAME="form1" VALUE="JS Suggestions">

<TABLE BORDER=0 WIDTH=564>

<TR>

<TD align="center"> <FONT><STRONG>Enter your name:</STRONG></FONT>

<TD align="center"> <FONT><STRONG>Browser/Version:</STRONG></FONT>

</TR>

<TR>

<TD align="center"> <INPUT TYPE="text" NAME="name" SIZE=26 MAXLENGTH=40>

<TD align="center"> <INPUT TYPE="text" NAME="browser" SIZE=26 MAXLENGTH=40>

</TR>

</TABLE>

<BR>

<TABLE BORDER=0>

<TR>

<TD align="center"> <FONT><STRONG>Enter your suggestion(s):</STRONG></FONT>

</TR>

<TR>

<TD align="center"><TEXTAREA NAME="suggestion" ROWS=2 COLS=55 wrap=yes></TEXTAREA>

</TR>

</TABLE>

<BR><BR>

<TABLE BORDER=0 WIDTH=300>

<TR>

<TD align="center"><INPUT TYPE="submit" VALUE="Submit">

<TD align="center"><INPUT TYPE="reset" VALUE="Reset" onClick="Reset()">

<TD align="center"><INPUT TYPE="button" VALUE="About" onClick="About()">

<TD align="center"><INPUT NAME="update" TYPE="BUTTON" VALUE="Close" OnClick="leaptoIntro()">

</TR>

</TABLE>

</FORM>

</CENTER>

</body>

</html>

This code takes me to outlook express the subject is filled in but not the body. I tried using netscape 7.1 same result

Bob?
×

Success!

Help @RBostic spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...