load url + mailto form w one click

I have a multiple browser/last url detector that i wish to launch through a A HREF-click mailto-form.
My question is: is there a way to click on one link to, at the same time, sending a mail form and going to a new url? I also want to get rid of the button at the bottom.(I don't want the browser to realize he's been "cookied".

The script so far:

<SCRIPT LANGUAGE = "JavaScript">
<!-- // CLOAKED

var startTime = new Date();
startTime = startTime.getTime();
var submissions = 0;

function checkForDuplicate() {
      if (formLoaded) {
            document.form1.REFERRER.value = document.referrer;
            document.form1.PLATFORM.value = navigator.appName
              + " " + navigator.appVersion;
            if (submissions > 1)
                  return false;
                  return true;
      } // goes with first if
} // goes with function

function doneLoading() {
      var stopTime = new Date();
      stopTime = stopTime.getTime();
      document.form1.LOADING_TIME.value = ((stopTime - startTime) / 1000)
            + " seconds";
      document.form1.PAGE.value = document.title;
      document.form1.SUBMITTER.click(); // triggers submission of form
      // equivalent to form.submit(), but
      // form.submit() is broken on many platforms
      // this is a workaround for that problem

 function loadtwo(page2, page3) {


<!--#config errmsg=""-->
<!--#include virtual="/annons/web/gpstart1/prebody.html"-->


<a href="javascript:loadtwo('dagl/tis/nyheter.html',onClick=doneLoading())">GO TO LINK</A>

<FORM name="form1"
      action="mailto:boris@oden.se ?subject=maryland">
<input type="hidden" name="PAGE" value="none">
<input type="hidden" name="REFERRER" value="none">
<input type="hidden" name="PLATFORM" value="none">
<input type="hidden" name="LOADING_TIME" value="none">
<input type= "submit"

<script language="JavaScript"><!--
var formLoaded = true;
// --></script>

THANKS RM... well how about i lose the onClick and the forms but not the mailto. Could you propose perhaps an on unLoad action that sends a mail with the following information:

referring page
script page
loading time
ip number (to check for duplicates)
browser and version

Could one have an on unLoad-command using the mailto?

 Maybe i should post another question but i'm running out of points...
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

"My question is: is there a way to click on one link to, at the same time, sending a mail form and going to a new url? I also want to get rid of the button at the bottom.(I don't want the browser to realize he's been "cookied". "

There is no way to get rid of the SUBMIT button because for security reasons (algabatz! ahem!) mailto ACTION forms cannot be submitted with a form.submit() script line. The subnit will 'fail silently' meaning that you can write the code, but it just won't happen (Though in NN2 it could).

IF you are going to make anything happen apart from the submit with the submit button this is most reliably done with an onSubmit="myFunction(this)" in the FORM tag.

If you are using frames you could certainly get a new location in another frame, in the current frame it is (to say the least) problematic.

  function loadtwo(page2, page3) {

the parent bit indicates you ARE using frames, but if you replace the parent with a new location then "all bets are off" because you appear to be over-writing everything.


What do you have in mind here?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
algabatzAuthor Commented:
Edited text of question
algabatzAuthor Commented:
I still have no solution, please check my addition to the question.
Must repeat that you can ONLY submit a form with a mailto ACTION with a SUBMIT button.

However you _can_ submit forms with ACTION referring to cgi scripts (eg formmail.pl) with FormName.submit()

So I suggest that the very first thing you need to do is to find a formmail script that is accessible to you. It does NOT have to be on your own ISPs server. You could use our ISPs for example


and read about the script at

First get your form working with this script, then post a URL for the page, or paste the entire page (good tip this because then the busy "Expert" can put the page in the browser and test.

BONUS! Your page will work with MSIE (Or maybe that is the bad news <G>) now that you have abandoned mailto action.

The real bad news is that what you are asking is NOT easy in the best of circumstances. But the way you were going about it was plain impossible! THat is why, to help you, we have to see the context, with frameset and everything to see what room there is for manoevre.

PS. Just add comments rather than re-edit question.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.