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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    mailto function not working in firefox

    i have a mailto: function that allows me to put the contents of a textbox in the subject of the mailto: and it works great for IE but firefox doesn't wanna tango for some reason.

    here is the function
    PHP Code:
    // This function takes whatever is in the textbox output and sends
    // it via email to the administrator
    function mailIt(form) {

      
    form.mailBody.value document.Configurator.output.value
      
    return true

    here is the textbox form and the send mail form
    PHP Code:
    <tr>
    <
    td colspan="2"><input type="submit" value="Submit form" /><br/>
    <
    input type="reset" /></td></tr>
    <
    tr><td colspan="2"><textarea cols="70" rows="20" name="output" >When you hit 'Submit' the user input will be written to this textarea</textarea></td></tr>
    </
    table>
    <
    div align="right"></div>
    </
    form>

    <
    form 
      NAME
    ="mailForm" 
      
    ACTION="mailto:xxxxx@xxxxxx.com?subject=Configurator BOM" 
      
    METHOD="post"
      
    ENCTYPE="multipart/form-data"
      
    onSubmit="return mailIt(this)">
    <
    input TYPE="hidden" NAME="mailBody" VALUE="">
     <
    tr>
      <
    td COLSPAN=2 ALIGN=center>
        <
    input TYPE="submit" VALUE="Send BOM To Mercury Marine Via E-Mail">
     </
    tr>
    </
    form
    here is a link to the full page.

    http://students.ou.edu/S/Jared.D.Spa..._IEcompat.HTML

    Thanks

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Firefox has a JavaScript Console...Is there any errors in that?

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts
    nope, no errors. it actually opens the email client and pastes the recipient and subject but does not attach the body file.

    the file attached by IE is named POSTDATA.ATT and looks like this when opened in a txt editor:

    -----------------------------7d828512a04ae
    Content-Disposition: form-data; name="mailBody"

    When you hit 'Submit' the user input will be written to this textarea
    -----------------------------7d828512a04ae--

  • #4
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts
    this is what firebug shows when i hit the button:

    PHP Code:
    <form onsubmit="return mailIt(this)" enctype="multipart/form-data" method="post" action="mailto:dylan.sparks@mercmarine.com?subject=Configurator BOM" name="mailForm">
    <
    input type="hidden" value="When you hit 'Submit' the user input will be written to this textarea" name="mailBody"/>
    <
    input type="submit" value="Send BOM To Mercury Marine Via E-Mail"/>
    </
    form


  •  

    Posting Permissions

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