Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

url in email

Status
Not open for further replies.

DeSn

Programmer
Nov 20, 2001
111
0
0
BE
Can you put an a href in an email in the way that you can put some javascript in the onclick event?
 
The onClick event signifies that something will be done when the mouse is clicked. If you want this functionality in an email, you'll have to send it as an HTML email and include the javascript code as part of the email.

What is it, exactly, that you want the recipient to do?

There's always a better way. The fun is trying to find it!
 
I want to open a new browser window and load a page in it. So normally when there are some windows who are already open, one of them is picked to open the url in. I want to prevent this an always open a new window.
 
That is a limitation of both your email software and the web browser you have chosen to use. Not something you can control completely through sending a URL through an email message.

Jeff
 
If all you want to do is open a page, then all oyu need to do is to include the URl to that page like this: "http// This can be done in a plaing text email and requires no javascript.

Most of the current email clients will automatically show this as a link and some will even have an "insert link" function that allows you to create the link.

Easy way to test is to send yourself an email with the url in the body of the message. I'd bet that when you open your mail, the link will be "clickable" and when clicked, a new page will open to the site you specified.

There's always a better way. The fun is trying to find it!
 
Thank a lot, that works just fine!!!
An other question: is it possible to say in which window the url must be opened?
I have an application where you have to logon. When the user is logged on and a receives an email with an url to the application, he can click on the url and then, when the url is opened in the right window he can start working. When the url is opened in the wrong window or in a new window, he has to logon again.
 
About the only way to do something like that would be to install a cookie on the users machine. If you want that functionality, you'll have to do a lot of modifications to your page(s) to set and read the cookie. Check out the javascript forum for more about setting and reading cookies.

There's always a better way. The fun is trying to find it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top