Thanks anyway .. i solved it.   i changed the function to the following: 

var returnto = ""; 
function EmailEdit(emailID,returnto){
    document.EmailTemplates.target = "";
   document.EmailTemplates.action =
"EmailEdit.cfm?returnto="+returnto+"&emailId="+emailID;
   document.EmailTemplates.submit();
}


And the links on the buttons i changed to: 

onclick="EmailEdit(#emailMessage.e_id#,'#returnto#');"

So what's passed to the function is something like:
EmailEdit(477, library)   
or 
EmailEdit(4325, campaign)

And that does the trick!

Now i feel pretty good, having worked out the javascript by myself.  
But thanks for helping anyway, Steve.


Cheers
Mike Kear
Windsor, NSW, Australia
AFP Webworks
http://afpwebworks.com
.com,.net,.org domains from AUD$20/Year


On Thu, 23 Sep 2004 12:49:13 +1000, Mike Kear <[EMAIL PROTECTED]> wrote:
> 
> 
> G'day Steve,
> 
> Depending on the context (i'm trying to  re-use forms in several
> places around the site)  it is either a url variable or  determined
> from http_referer or a form variable.  So in the top of the page i
> have a <cfswitch to set the variable #returnto#.   Then i can have
> other parts of the page relevant to the job the user is doing.  This
> particular bit has to do some javascript work, and if everything
> checks out, send him back to where he came from, using the variable
> returnto to decide where.
> 
> But at the time this piece of javascript is run, the CF variable
> returnto has values like "library" or "campaign" or "singleuse"
> 
> That help?
> 
> Cheers
> Mike Kear
> Windsor, NSW, Australia
> AFP Webworks
> http://afpwebworks.com
> .com,.net,.org domains from AUD$20/Year
>

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to