/    Sign up×
Community /Pin to ProfileBookmark

Hello,

I have a textarea box that passes information to another form when a submit button is clicked. However when the new form opens all the information appears on 1 line.

How can i make the information appear as the user has entered it including returns (new lines). Also how can i separate the retrieved information into separate text fields postioned on different parts of the form?

header:-

function getParams() {
var idx = document.URL.indexOf(‘?’);
var params = new Array();
if (idx != -1) {
var pairs = document.URL.substring(idx+1, document.URL.length).split(‘&’);
for (var i=0; i<pairs.length; i++) {
nameVal = pairs[i].split(‘=’);
params[nameVal[0]] = nameVal[1];
}
}
return params;
}
params = getParams();

Body:-

kids = unescape(params[“kids”]);
document.write(“” + kids +”<br>”);

email = unescape(params[“email”]);
document.write(“” + email + “<br>”);

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@benb7760Apr 26.2005 — that looks like javascript, ask in the javascript forums
×

Success!

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