Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Html Variable Substitution

    In the working example below there are 2 input boxes. In the real applicaion there are actually 12. The objective is to get the information typed in the input boxes to be included in the body of the email some how, some way. For simplicity, I would really like to keep it confined to just HTML coding.

    This is about as simple as I can make it.


    <html>
    <head>
    </head>
    <body>
    Name: <input type="text" name="T1" size="34">
    <br>
    Address: <input type="text" name="T2" size="34">
    <br>
    <A href='mailto:me@myisp.net?subject=MySub&body=Inputted Values'>Click to E-Mail</A>
    </body>
    </html>

    Any help is greatly appreciated.

    Bobby

  • #2
    Senior Coder chilipie's Avatar
    Join Date
    Jul 2004
    Location
    Shrewsbury, UK Age: 16
    Posts
    1,117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could possibly do something like this with JavaScript, but not with HTML alone...

  • #3
    Xko
    Xko is offline
    New Coder
    Join Date
    Feb 2005
    Location
    Birmingham, England
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'd use PHP for that - and as CP stated, HTML will simply not do what you're asking.

    HTML is nothing on it's on thesedays.

  • #4
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Yeah. HTML/CSS is just a markup system, for making info look pretty. it is completly static. It can't do anythingonce the page is loaded. You need to use JS or a server-side (PHP,ASP) technology to proces this

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #5
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    Can anyone show me a small example using just 1 field ? Something I could build on. Thanks.

    It would be greatly appreciated.

    Bobby

  • #6
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    [QUOTE=rfhall50] For simplicity, I would really like to keep it confined to just HTML coding.

    This is about as simple as I can make it.


    I understand simplicity (see my sig ). Though I may not fully understand yet why you try to do it this way.

    Have you any reason to avoid an online form? I mean from your text fields, you can send them all to your email in box in whatever configuration you choose. And you could have the benefit of removing your email address from the web to avoid spam bots etc. Oh nearly forgot, if you look on keeping it simple for the longer term, I think you'll find it more simple than settling for easy set-up.

    my 2c

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #7
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The biggest reason for confining it to HTML is that is what I know how to use at this point. I have no problem using HTML forms (if thats the forms you are talking about), but don't know how to get them out to email other than the old "mailto".

    Thanks

    Bobby

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Server side

    As stated, the best solution would be a simple form handler built using one of the available server side scripting languages.

    This topic was raised recently: see this thread for some more info.
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

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