>HI, I'm a cf newbie (about 3 months) and I was given the task of putting a
>link on the bottom of every page in a cf site to a) pull the url off the
>page they are on b) send the user
>and the url to a form to email that url to a friend. My first impulse was
to
>use the onrequestend.cfm and use the cgi variable to pull the url off the
>page. The problem is that half
>the pages in the site are static html pages so the onrequestend.cfm won't
>work for the site. So now I think I need a way to do this in Javascript
>(pull the url off the page) and then
>send them and the url to the email form which will be a cf template. Any
>suggestions on how to do this (example code)?

You really should ask the question on a javascript group, but here's the
answer.  Use the location object.
<A HREF="#" ONCLICK="self.location.href = 'emailform.cfm?MyURL=' +
scape( location.href )">go to my email form</A>

There you go.

Of course you still face the issue of no javascript on the person's browser.
In that case you would print out the above in javascript too.  This way
people without javascript or who have it turned off won't even see the
option.

Of course if you're using something like IIS or Netscape, you can use the
other server-side scripting available to you.

Roy.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to