Newline Character giving problems... Plsssssss help!!!!

D

dimple.nshah

Hello frenz...

Here is what I am trying to do:

<SCRIPT LANGUAGE="JavaScript">

function temp() {
var bodytext = "Name: " + document.Form.Name.value + "\n Date: "
+document.Form.DateToday.value;
window.open("mailto:[email protected]?subject=Form&Body= " +bodytext);
window.close();
}
</script>

All I want is the label Name and Date to be on seperate lines. I feel
very weird in asking such a simple thing, but it does NOT work :(.

Can anyone please help!!

Thanks in advance.
Dimple.
 
B

Bart Van der Donck

function temp() {
var bodytext = "Name: " + document.Form.Name.value + "\n Date: "
+document.Form.DateToday.value;
window.open("mailto:[email protected]?subject=Form&Body= " +bodytext);
window.close();}

All I want is the label Name and Date to be on seperate lines. I feel
very weird in asking such a simple thing, but it does NOT work :(.

Name:John%0D%0ADate:2008-03-04
 
D

dimple.nshah

I did not receive anything in your reply ??!!!

Oh I apologize, I did receive it and I tried it... Works perfectly
fineeeeeeeeee... Thanks a ton!!!!!!!!
Can you pls explain why it was behaving so wierd with newline
character??? Thanks once again......
 
G

GArlington

Oh I apologize, I did receive it and I tried it... Works perfectly
fineeeeeeeeee... Thanks a ton!!!!!!!!
Can you pls explain why it was behaving so wierd with newline
character??? Thanks once again......

mailto: is href tag, so it expect url encoded string
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,824
Members
47,371
Latest member
Brkaa

Latest Threads

Top