Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

creating dynamic email response with javascript

athomasathomas Posts: 228Member
Hello,

I want to create a dynamic email response with Javascript but didnt found a tutorial or other how tos for this.

I have a guest book for my homepage and I would like to send an response mail if the user has submitted his message to me.

The site looks as follows so far:




Guestbook

Type your message here











Comments

  • TurtleXTurtleX Posts: 2Member
    I don't know about javascript but it can be done with a Perl script. Check this out:

    http://www.codebrain.com/perl/index.html
  • athomasathomas Posts: 228Member
    Hi,

    well thanks but I know how to do it with Perl but I want to do it with Javascript. I dont know if its possible to include perl scrpits into HTML code.

    Cheers.
    Alex


    : I don't know about javascript but it can be done with a Perl script. Check this out:
    :
    : http://www.codebrain.com/perl/index.html
    :

  • JonathanJonathan Posts: 2,914Member
    : well thanks but I know how to do it with Perl but I want to do it with Javascript. I dont know if its possible to include perl scrpits into HTML code.
    :
    In general...
    JavaScript = client side
    Perl = server side
    Reliably sending mail formatted the way you want needs server side support. The end.

    Jonathan


    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • WeirdofreakWeirdofreak Posts: 439Member
    : I dont know if its possible to include perl scrpits into HTML code.

    No, but it's easy enough to convert an HTML page into a Perl script. Just remember to print a content header of text/html. For example the HTML page

    [code]

    Hi.

    [/code]

    Would become

    [code]#!/usr/bin/perl
    use warnings;
    use strict;

    print "content-type=text/html



    Hi.

    ";[/code]
  • athomasathomas Posts: 228Member
    Hi,

    ok thanks, I will try this out.

    : : I dont know if its possible to include perl scrpits into HTML code.
    :
    : No, but it's easy enough to convert an HTML page into a Perl script. Just remember to print a content header of text/html. For example the HTML page
    :
    : [code]
    :
    : Hi.
    :
    : [/code]
    :
    : Would become
    :
    : [code]#!/usr/bin/perl
    : use warnings;
    : use strict;
    :
    : print "content-type=text/html
    :
    :
    :
    : Hi.
    :
    : ";[/code]
    :

  • JonathanJonathan Posts: 2,914Member
    : : I dont know if its possible to include perl scrpits into HTML code.
    :
    : No, but it's easy enough to convert an HTML page into a Perl script. Just remember to print a content header of text/html. For example the HTML page
    :
    : [code]
    :
    : Hi.
    :
    : [/code]
    :
    : Would become
    :
    : [code]#!/usr/bin/perl
    : use warnings;
    : use strict;
    :
    : print "content-type=text/html
    :
    :
    :
    : Hi.
    :
    : ";[/code]
    :
    Personally I prefer to use:-

    print qq{
    HTML Here
    };

    Instead. HTML often contains double quotes, so "..." isn't generally the best way to quote it.

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • athomasathomas Posts: 228Member
    Thank you all much. I will check out both.
    Alex


    : : : I dont know if its possible to include perl scrpits into HTML code.
    : :
    : : No, but it's easy enough to convert an HTML page into a Perl script. Just remember to print a content header of text/html. For example the HTML page
    : :
    : : [code]
    : :
    : : Hi.
    : :
    : : [/code]
    : :
    : : Would become
    : :
    : : [code]#!/usr/bin/perl
    : : use warnings;
    : : use strict;
    : :
    : : print "content-type=text/html
    : :
    : :
    : :
    : : Hi.
    : :
    : : ";[/code]
    : :
    : Personally I prefer to use:-
    :
    : print qq{
    : HTML Here
    : };
    :
    : Instead. HTML often contains double quotes, so "..." isn't generally the best way to quote it.
    :
    : Jonathan
    :
    : ###
    : for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    : (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    : /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
    :
    :

Sign In or Register to comment.