Results 1 to 8 of 8

Thread: simple form help

  1. #1
    Join Date
    Jan 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default simple form help

    see,

    links to form with subject target

    http://www.xxx.com/contact.htm?=Report
    http://www.xxx.com/contact.htm?=Request

    After this contact form subject text field get call target and put in subject field automatic visitor dont need to write if they want to put custom text in subject then only give link like this http://www.xxx.com/contact.htm but dont show any thing in subject field hope u understand and help me in this...sorry for ma bad english

  2. #2
    Join Date
    Jan 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    help me

  3. #3
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Is this some sort of ****ography site? No can do then.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  4. #4
    Join Date
    Jan 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    no...XXX its just example of website link...LOL

    plz help me

  5. #5
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    yeah... use www.example.com/webpagex or something, xxx.com is a real **** website...
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  6. #6
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    ...and I'm under 18 so I can't enter.

    Anyway, what do you want? I don't know what you mean.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  7. #7
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I think what the OP means is when you go to contact.htm, you get a contact form with a subject field for the user to type in. If you go to contact.htm?=Reports, the subject becomes Reports or something like that.

    Well, my answer for this is you cannot do it with just HTML. You might be able to with Javascript (doubt it though, but you never know). You can; however, accomplish this with PHP. I currently don't have time to post the code for it, but the idea is simple. Have a variable (let's say $subject). See if it is set or not. If so, do not display subject field and use that as your subject in the mail. Else, display a field for the user to type into.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  8. #8
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Code:
    <script type="text/javascript">
    function getVar(variable)	{
      var query = window.location.search.substring(1);
      var vars = query.split("&");
      for (var i=0;i<vars.length;i++) {
        var pair = vars[i].split("=");
        if (pair[0] == variable) {
          return pair[1];
        }
      } 
      return "";
    }
    var to = "theemailhere@example.com"
    function mail()	{
    
    	window.location="mailto:" + to + "?subject=" + getVar('subject')
    }
    </script>
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

Bookmarks

Posting Permissions

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