/    Sign up×
Community /Pin to ProfileBookmark

User Info Form

Hi Im trying to Create a form for my users to enter inforamtion and have it displayed. I want their name, email, what colour they want as a background and also for the text, and have a new page displayed with the new information.
thanks for any help

[CODE]<script type=”text/javascript”>

function win()
{
bg = document.form1.bgcolour1.value
win = window.open(”+self.location,’mywin’,’toolbar=1′);
win.document.write(‘Your name is ‘ + document.form1.name.value);
win.document.write(‘<br>Your email is ‘ + document.form1.email.value);
win.document.write(“<body bgColor==bg” “>”);
win.document.write(‘<br>This is what you wrote ‘ + document.form1.info.value);
}

</script>
</head>

<body>
<form name=”form1″ id=”form1″ method=”post” action=””>
<p>Name:
<input type=”text” name=”name” id=”name” />
</p>
<p>Email:
<input type=”text” name=”email” id=”email” />
</p>
<p>Fav bgcolour:
<input type=”text” name=”bgcolour1″ id=”bgcolour1″ />
</p>
<p>Fav text colour:
<input type=”text” name=”txtclr” id=”txtclr” />
</p>
<p>Please enter some information about yourself:
<input type=”text” name=”info” id=”info” />
</p>
<p>
<input type=”submit” name=”Submit” value=”Submit” onClick=”win()” />
<input type=”reset” name=”reset” value=”Reset” />
</p>
</form>
</body>[/CODE]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@hpmad7Nov 24.2005 — You would have to save this information in a cookie in order for it to be displayed.
×

Success!

Help @tdh1985 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.4,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...