Results 1 to 12 of 12

Thread: Best language for a certain task?

  1. #1
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default Best language for a certain task?

    So I recently started a new job here we have to respond to customers through email with something similar to this

    Code:
    Hey JPHamlett,
    Thanks you for contacting XXY XXXYXY. I was glad I was able to assist you with your password reset. If you have any questions feel free to contact us
    
    JPHamlett
    999-9999|help@website.com
    website
    The only thing is that sometimes the name changes and some other things vary also, such as the issue we solved.

    What language would be best for an online form that would take some input and output a similar paragraph and I could just copy paste it and move on?


    Thanks
    JPHamlett

  2. #2
    Join Date
    Nov 2014
    Posts
    104
    Mentioned
    12 Post(s)
    Quoted
    59 Post(s)

    Default

    Quote Originally Posted by JPHamlett View Post
    So I recently started a new job here we have to respond to customers through email with something similar to this

    Code:
    Hey JPHamlett,
    Thanks you for contacting XXY XXXYXY. I was glad I was able to assist you with your password reset. If you have any questions feel free to contact us
    
    JPHamlett
    999-9999|help@website.com
    website
    The only thing is that sometimes the name changes and some other things vary also, such as the issue we solved.

    What language would be best for an online form that would take some input and output a similar paragraph and I could just copy paste it and move on?


    Thanks
    JPHamlett
    If that is all you need, you can do it quickly with HTML & JavaScript. If you've never touched JavaScript, then take a look at jQuery. Most people find it easy to use and very helpful.

    If your application starts becoming bigger, you might want to create a back-end in PHP.

    Good luck and congrats on your new job!

  3. #3
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    PHP would be my choice for such a task. Why? Because sending emails with libCurl is easy and done quite a lot. If you need to communicate with a database, that's done as well..

    You can't really send an email using just javascript or jquery only.. without writing out every single header manually.

    You will have to use JQuery for the front-end (form and looks for the page) and PHP for the back-end (actual emailing/server-side stuff) or JSP or ASP (your choice).
    Last edited by Brandon; 12-20-2014 at 04:12 PM.
    I am Ggzz..
    Hackintosher

  4. #4
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    PHP would be my choice for such a task. Why? Because sending emails with libCurl is easy and done quite a lot. If you need to communicate with a database, that's done as well..

    You can't really send an email using just javascript or jquery only.. without writing out every single header manually.

    You will have to use JQuery for the front-end (form and looks for the page) and PHP for the back-end (actual emailing/server-side stuff) or JSP or ASP (your choice).
    He didn't want it to send an email, he want's it to output a paragraph. Javascript would be the best bet.

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  5. #5
    Join Date
    May 2014
    Posts
    633
    Mentioned
    8 Post(s)
    Quoted
    322 Post(s)

    Default

    I wouldn't suggest using PHP unless it's something your company already uses elsewhere as PHP does some pretty weird stuff sometimes that doesn't make any sense http://eev.ee/blog/2012/04/09/php-a-...of-bad-design/

    I'd suggest making something super quick+easy using JavaScript + HTML unless you actually need to send the email, in which case I think Python probably can do it pretty easy.

  6. #6
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Something you may not have considered. Try using the in-built Microsoft Office e-mail tools. That might be a bit easier and straightforward.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  7. #7
    Join Date
    Dec 2014
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    I would suggest PHP, but it might be a little bit hard for beginners.

  8. #8
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Very basic model of what I wanted to do.

    Code:
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>OIT Help Desk</title>
    </head>
    
    <body>
    <p id = "page"> </p>
    <select id="selection" size = "9">
    <option>Phone-Escalation</option>
    <option>Phone-Password Reset</option>
    <option>Phone-General</option>
    <option>Phone-Google Desktop</option>
    <option>Email-Escalation</option>
    <option>Email-General</option>
    <option>Email-Password</option>
    <option>Information Services</option>
    </select>
    <button onclick="generate()">Generate()</button>
    <script>
    function copyToClipboard(s) {
        if (window.clipboardData && clipboardData.setData) {
            clipboardData.setData('text', s);
        }
    }
    
    function generate(){
    	copyToClipboard("Test")
    	var index = document.getElementById("selection").selectedIndex;
    	var name = prompt("Name")
    	var string = ""
    	var special = false
    	switch(index){
    		case 0: string = "I have escalated your ticket up to our " + prompt("Escalated group") + " team. Your incident number is " + prompt("Incident number");
    		break;
    		case 1: string = "I am glad we were able to reset your password successfully";
    		break;
    		case 2: string = "I am glad I could help you " + prompt("What do you do?");
    		break;
    		case 3: string = "I am glad I could help you setup your Google Desktop/ Mobile Client Password.";
    		break;
    		case 4:  string = "I have escalated your ticket up to our " + prompt("Escalated group") + " team. Your incident number is " + prompt("Incident number");
    		break;
    		case 5: string = "I am glad I could help you " + prompt("What do you do?");
    		break;
    		case 7: string = "Transfered caller to " + prompt("Dept/Person") + " [" + prompt("Transfer number") + "]";
    		special = true;
    		break; 
    		case 6: string = name + ",<br><br>Thanks for contacting 1-Help. Unfortunately I cannot reset passwords over email due to security reasons. In order to get your password reset you will have to give us a call at 612-301-4357 (any time 24/7) and reference incident number " + prompt("Inc Number") + "<br><br>Thanks and have a great day! <br><br> John H";
    		special = true;
    		break;
    			
    	}
    	if (special){
    		document.getElementById("page").innerHTML = string
    	} else{
    		document.getElementById("page").innerHTML = name + ",<br><br>Thanks for calling 1-Help." + string + ". If you have any further questions feel free to call us at 612-301-4357<br><br>Thanks and have a great day! <br><br> John H"
    	}
    }
    </script>
    	
    
    </body>
    </html>

  9. #9
    Join Date
    Feb 2013
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    48 Post(s)

    Default

    Probably PHP, although maybe the use of a framework make it a bit easier for you. Creating the code in PHP will prove itself harder but eventually more easier because you are able to adept your code freely.
    Last edited by Sh4d0wf0x; 07-20-2015 at 01:24 AM.

  10. #10
    Join Date
    Aug 2012
    Posts
    188
    Mentioned
    9 Post(s)
    Quoted
    71 Post(s)

    Default

    Quote Originally Posted by Sh4d0wf0x View Post
    Probably PHP
    And there's the 30 spam posts! Congrats on the rank!

  11. #11
    Join Date
    Feb 2013
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    48 Post(s)

    Default

    To be honest mate, the person asked for an opinion not a full technical spec. So don't know since when an opinion became spam.

  12. #12
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

    Default

    Quote Originally Posted by Sh4d0wf0x View Post
    To be honest mate, the person asked for an opinion not a full technical spec. So don't know since when an opinion became spam.
    Sadly, one of the side-effects of a post count-based rank is the tendency to post until you get there. I can understand that urge you may have felt

    However, the Junior rank requirements are meant to encourage solid contributions and helpful activity. This includes helping people test scripts, providing constructive, useful feedback, sharing your own scripts/snippets, or genuinely participating in debates. The rank is meant to be acquired passively, as a result of giving to the SRL community. This does not mean that you should go around grave-digging threads, and providing quarter-effort responses to raise PC. It is of course hard to judge the line between spam and a "useful" post, but the intent becomes clear after awhile.

    I'm sure if you begin sharing the scripts and ideas you mentioned you were working on, you will become a Junior member in no time!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •