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.
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!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.