Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. Execute the notepad data using querystring [modified]

Execute the notepad data using querystring [modified]

Scheduled Pinned Locked Moved JavaScript
comdata-structurestoolstutorialquestion
3 Posts 2 Posters 33 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shailrathore
    wrote on last edited by
    #1

    I am using querystring to execute the notepad data. notepad contains follwing: mailto:shail?CC=shail&Subject=test&Body=qtsts I dont want to use window.open script in notepad file to open the prepopulated outlook window, is there anyway we can open the outlook window using above 'mailto:' data. Below is url as example http:example.com?name=http:teamspace/sites/notepadefile.txt below is my script <script> function PageQuery(q) { if(q.length > 1) this.q = q.substring(1, q.length); else this.q = null; this.keyValuePairs = new Array(); if(q) { for(var i=0; i < this.q.split("&").length; i++) { this.keyValuePairs[i] = this.q.split("&")[i]; } } this.getKeyValuePairs = function() { return this.keyValuePairs; } this.getValue = function(s) { for(var j=0; j < this.keyValuePairs.length; j++) { if(this.keyValuePairs[j].split("=")[0] == s) return this.keyValuePairs[j].split("=")[1]; } return false; } this.getParameters = function() { var a = new Array(this.getLength()); for(var j=0; j < this.keyValuePairs.length; j++) { a[j] = this.keyValuePairs[j].split("=")[0]; } return a; } this.getLength = function() { return this.keyValuePairs.length; } } function queryString(key){ var page = new PageQuery(window.location.search); return unescape(page.getValue(key)); } function displayItem(key){ if(queryString(key)=='false') { document.write("you didn't enter a ?name=value querystring item."); }else{ document.write(queryString(key)); } } </script>

    modified on Thursday, August 12, 2010 8:38 AM

    P 1 Reply Last reply
    0
    • S shailrathore

      I am using querystring to execute the notepad data. notepad contains follwing: mailto:shail?CC=shail&Subject=test&Body=qtsts I dont want to use window.open script in notepad file to open the prepopulated outlook window, is there anyway we can open the outlook window using above 'mailto:' data. Below is url as example http:example.com?name=http:teamspace/sites/notepadefile.txt below is my script <script> function PageQuery(q) { if(q.length > 1) this.q = q.substring(1, q.length); else this.q = null; this.keyValuePairs = new Array(); if(q) { for(var i=0; i < this.q.split("&").length; i++) { this.keyValuePairs[i] = this.q.split("&")[i]; } } this.getKeyValuePairs = function() { return this.keyValuePairs; } this.getValue = function(s) { for(var j=0; j < this.keyValuePairs.length; j++) { if(this.keyValuePairs[j].split("=")[0] == s) return this.keyValuePairs[j].split("=")[1]; } return false; } this.getParameters = function() { var a = new Array(this.getLength()); for(var j=0; j < this.keyValuePairs.length; j++) { a[j] = this.keyValuePairs[j].split("=")[0]; } return a; } this.getLength = function() { return this.keyValuePairs.length; } } function queryString(key){ var page = new PageQuery(window.location.search); return unescape(page.getValue(key)); } function displayItem(key){ if(queryString(key)=='false') { document.write("you didn't enter a ?name=value querystring item."); }else{ document.write(queryString(key)); } } </script>

      modified on Thursday, August 12, 2010 8:38 AM

      P Offline
      P Offline
      Prosanta Kundu online
      wrote on last edited by
      #2

      shailrathore wrote:

      I am using querystring to read the notepad data. notepad contains follwing mailto:shail?CC=shail&Subject=test&Body=qtsts

      What does it means? You are reading nodepad data in querystring??

      shailrathore wrote:

      I dont want to use window.open script in notepade file, is there anyway we can open the outlook window using above 'mailto:' data. at the moment it only write the data. http:example.com?name=http:teamspace/sites/notepadefile.txt below is my script

      Your question is not clear. If I understand correctly that you wants to read the data from a text file and prepare the mail body, subject etc and send the email. Is it right?

      S 1 Reply Last reply
      0
      • P Prosanta Kundu online

        shailrathore wrote:

        I am using querystring to read the notepad data. notepad contains follwing mailto:shail?CC=shail&Subject=test&Body=qtsts

        What does it means? You are reading nodepad data in querystring??

        shailrathore wrote:

        I dont want to use window.open script in notepade file, is there anyway we can open the outlook window using above 'mailto:' data. at the moment it only write the data. http:example.com?name=http:teamspace/sites/notepadefile.txt below is my script

        Your question is not clear. If I understand correctly that you wants to read the data from a text file and prepare the mail body, subject etc and send the email. Is it right?

        S Offline
        S Offline
        shailrathore
        wrote on last edited by
        #3

        Yes Prosanta you are right. At the moment I am using below script in notepad window.open('mailto:shail?CC=shail&Subject=test&Body=qtsts ') and i dont what to use this script. Please help Shail

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups