SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    LONDON,UK
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with FORM

    hi

    the following appears to work in Firefox but not in Internet Explorer,google chrome and safari ...


    <form method="post" action="mailto:myemail?subject="test" enctype="text/plain"onsubmit="location.href='thanks.html'>

    in the case of the form not working it doesn't put the form input into the email AND the 'thanks' page does not appear.


    can you help me out please !?

  2. #2
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,371
    Mentioned
    268 Post(s)
    Tagged
    5 Thread(s)
    I'm pretty sure that content of each of your attributes should be quoted.
    Code:
    <form method="post" action="mailto:myemail" subject="test" enctype="text/plain" onsubmit="location.href='thanks.html'">

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Location
    LONDON,UK
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks techno but where does the ? go ?

  4. #4
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,371
    Mentioned
    268 Post(s)
    Tagged
    5 Thread(s)
    I'm guessing here, because this is not something I use. I've found an example in a book which has
    Code:
    <form action="mailto:myemail? subject="test" method="post" enctype="text/plain">
    so it looks as if you were right there. I can't find an example of onsubmit, but I still think you'd need the closing double-quote there. Try it and see if it works, and I'll keep reading the book.

    Edit: Actually, a quick search suggests it should be onSubmit, so try that too.
    Last edited by TechnoBear; Dec 5, 2011 at 08:35. Reason: More info.


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
  •