/    Sign up×
Community /Pin to ProfileBookmark

cookies and forms

Let me tell you what I’m trying to do. I have a webpage which has someone enter their username and their password. Their name then becomes a cookie and a button is clicked to go to login. On the next page I want this username to be placed into a form as data input so that the user cannot change the name (I believe I disabled the input textbox…). Then the user puts in other information and clicks submit and then it gets sent to me. What am I doing wrong?

<SCRIPT LANGUAGE=”javascript”>
document.write(“<form action=”http://formmail.dreamhost.com/cgi-bin/formmail.cgi” method=”POST”>”)
document.write(“<input type=hidden name=”recipient” value=”[email protected]“>”)
document.write(“<input type=hidden name=”redirect” value=”http://www.emmonspanish.com/sent.shtml“>”)
document.write(“nombre:”)
document.write(“<INPUT TYPE=text name=subject disabled SIZE=10 VALUE=” +YouWrote+ “>”);
document.write(“</form>”)
</SCRIPT>

When I take out the “action=”http://formmail.dreamhost.com/cgi-bin/formmail.cgi” method=”POST”” part in the “form” tag the textbox shows up, but when I put it there it disappears. Help me!

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@JonaFeb 27.2005 — [i]Originally posted by yarbar [/i]

[b]

document.write("<form action="http://formmail.dreamhost.com/cgi-bin/formmail.cgi" method="POST">")[/b]
[/quote]


[font=trebuchet ms]Your quotes are improperly nested. Try the following.[/font]

<i>
</i>document.write('&lt;form action="http://formmail.dreamhost.com/cgi-bin/formmail.cgi" method="POST"&gt;');
×

Success!

Help @yarbar 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.7,
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,
)...