Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8601511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:51:42+00:00 2026-06-12T01:51:42+00:00

I am working on the following script for mailing the data dynamically entered by

  • 0

I am working on the following script for mailing the data dynamically entered by the user .This works fine for the content with lesser data and Outlook window is opening properly with the data.But when I use this same logic for the larger data . I am getting error while opening the Outlook window stating “The command line argument is not valid. Verify the switch you are using”.Refer this link for the error (http://support.citrix.com/article/CTX123773) occurred What could be the reason for this .Kindly help with this issue.

Thanks in advance .

<html>
<head>
  <script>
    var bodyScript = " ";
    var json = " ";

    function ajaxCall() {
      ajax {
        url: function: loadDetails,
        error: ,
      }
    }

    function loadDetails() {
      bodyScript += "Hi" + json.Name;
      .....
      bodyScript += "%0D%0Awelcome to our Camp .Your ID is " + json.ID;
      .....
    }

    function sendEmail() {
      var link = "mailto:" +
        +"?cc=Sam&subject=test&body=" + bodyString;
      alert('bodyString before mailing ' + bodyString);
      window.location.href = link;
    }
  </script>

  <body>
    <div id=”btnSubmit” onclick=sendEmail()”>click me</div>
  </body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:51:44+00:00Added an answer on June 12, 2026 at 1:51 am

    Try encodeURIComponent(bodyString), there seems to be some characters (possible quotes) that mess with the command-line options:

    var link = "mailto:"+
    +"?cc=Sam&subject=test&body="+encodeURIComponent(bodyString);
    

    I see that on the example you already urlencode somehow the line breaks. So instead of just using encodeURIComponent(bodyString) you maybe will have to turn it into encodeURIComponent(decodeURIComponent(bodyString))

    Demo: http://jsfiddle.net/H9ERc/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following Script isn't working in CHROME browser, IE is Fine. I've changed opener.document ...
The following java-script is working fine (Jquery) $(document).ready(function(){ $('#c_area').load($('.m_top:first').attr('href')) }); $('.m_top').click( function(){ $(#myDiv).html('<img src=images/loading.gif
This problem is really puzzling to me: I have the following script working on
I have the following script to validate my form. It is working fine but
I have the following script: http://jsfiddle.net/oshirowanen/8mQ7x/1/ Which works fine, but as soon as I
The following script below is not running in IE7 but works perfectly fine in
I haven't used JavaScript for sometime. I'm trying to get this following script working
Hey I just wanted to find out the working of the following script as
I just fiddled following script. It's not working. <SCRIPT> function kin() { var kobj
I have the following script, which is working for the most part Link to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.