Hey hey!
Now I feel particularly stupid posting this, but I have to be honest, my brain feels as though it's shrunk to the size of a pea and is rattling around up there.
It's a fairly straightforward problem (haahahaha - I thought it was anyway):
I have this function:
code:
function mergeURL(x) {
with (document.forms["myForm"])
{
var setURL = passURL.value
var setSession = MonitoringRefID.value
var mailURL = setURL + setSession
}
}
Which takes the values from two form elements, and joins them in a variable.
Simple enough so far.
passURL is a textfield, containing a URL which ends thus: blahblahurl.asp?MonitoringID=
MonitoringRefID is also a textfield, dynamicaly populated by another function, and containg the unique identifyer which sits after the URL
Together they make a complete URL: http://blahblahurl.asp?MonitoringID=xxyyzz
This all works fine, so now I want to create a dynamic MAILTO link, which adds the complete URL in the body of the message. And here's where I fall flat on my behind.
I've tried the method below, but I just can't work out / remember where the delimiters go, and how to separate my html from my javascript...
Can someone please point out where I'm going wrong?
code:
<script>
document.write("<a href='MAILTO:Enter recipient name here?subject=monitoring%20session%20details&body=' + mailURL + ' onMouseOver=mergeURL(1)'>Send session link</a>")
</script>
Meanwhile, I'm off to break Google.
Seems the more I search, the more confused I become. *Sigh*
My head hurts.
Thanks again
Dufty