Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data to outlook

Status
Not open for further replies.

davmold

IS-IT--Management
Jul 16, 2007
29
0
0
US
Hello All,

I am having a little problem with a javascript within my ASP code. Before hand I apologize if this is not the correct Forum to post this.
Senario:
I have an asp Page that has an javascript when you submit the page the java script opens outlook and enters some data into the email To: , Subject: and Body of the e-mail.

Everything was working well. Nothing has changed but all of the sudden the
variables are not working.

I have checked and re-checked the code and nothing seems to be wrong, so I think I am going in circles. Could anybody give me a hand with this one?

Thank you


Code:
<head>
<script>
function initialize()
{
 document.forms['form'].elements['email'].value = temp ;
}
</script>

</head>





<body>
<script type=text/javascript>

function openoutlook()
{
  var S=document.form.customer.value;
  var B=document.form.comments2.value;
  var M=document.form.email.value;
  var A= <% = request.querystring("id") %>
  var url = '[URL unfurl="true"]http://mywebsite/view1.asp?id='[/URL] + escape(A);

  
 self.location="mailto:abc@mywebsite.com?subject=An Update Has Been Made To XYZ Project# "+A+" By "+M+"&body="+M+" Updated Project # "+A+" .  Here is the link to the project  "+url; }
</script>
 
your code looks fine to me. Make sure your form elements
customer, comments2, email, have their name and id set.


try alerting you vars and see which one is messing up.

 
it looks like it is all of them I cannot get anything from them.
 
You didn't happen to change the name of the form, did you? You didn't show that part of your HTML.

Also, for flexibility in different versions of various browsers, I'd access the form elements using an associative array:

Code:
var el = document.forms['form'].elements;
var S=el['customer'].value;
var B=el['comments2'].value;
var M=el['email'].value;

Lee
 
well it looks like it has something to do with IE7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top