View Full Version : Email functions - Help
bw3249
01-14-2000, 04:28 PM
Howdy!!!
Anybody know how to do this?
If I set up a link with:
[nbsp][nbsp][nbsp][nbsp]onClick=open.window("www.domain.com (http://www.domain.com)")
I get a new window that points to the URL provided.
What I want to do is similar, but with email.[nbsp][nbsp]If I set up the link as onClick=open.window(mailto:somebody@domain.com) it opens a new browser window, but doesn't have an address.[nbsp][nbsp]But it also opens an email window, which is what I'm trying to do.
I know I'm using the wrong object, but I don't know which one to use.[nbsp][nbsp]Any suggestions?
BTW, I realize I can get the desired functionality if I used the old fashioned HREF="mailto:somebody@domain.com", but I don't want to do it that way.
Thanks,
------------------
Brian Williams (The)
elite
01-14-2000, 06:34 PM
I am confused do you just want it to open up a email window without any email address in it?
If so just use what you said w/o the email: IE HREF="mailto:" ....
bw3249
01-14-2000, 06:56 PM
Sorry for the confusion.
What I'm looking for is an email window to open with the email address populated.[nbsp][nbsp]I want it to behave just as if I'd used <A HREF="name@domain.com"> except I want to do it as <A onClick=<something>("name@domain.com")>. Yes, I know it's the hard way, but I have my reasons.
Is that clearer?
------------------
Brian Williams (The)
Justin
01-14-2000, 06:56 PM
I also am confused why you would want to use javascript to hyperlink an email address... the general rule in web design is to go with the most simple method possible -- eg, don't use CSS to specify your background color -- so as not to isolate those with older browsers (as much)...
At any rate, try this:
<a onclick="JavaScript:location.href='mailto:me@mydomain'">
Untested, not sure if it will work, but it's worth a shot (eg, it does the same thing but without opening a new window)...
HTH
------------------
Justin Nelson
FutureQuest Support
bw3249
01-14-2000, 07:46 PM
OK, here's the long story...
It's a consistancy issue.[nbsp][nbsp]The web page has 4 icons.[nbsp][nbsp]Clicking on 3 of the icons opens a new browser window.[nbsp][nbsp]The 4th opens an email window.[nbsp][nbsp]On the 3 browser windows I use the <A onClick=window.open(...)> method so that I can vary the browser window options.[nbsp][nbsp]As a result, when the cursor passes over the icon, the cursor does not change to the little pointy finger.[nbsp][nbsp]Because the email link uses the normal HREF= method, the pointy finger appears over the icon.[nbsp][nbsp]I think the inconsistant behavior is confusing.[nbsp][nbsp]I would prefer that the behaviors be the same one way or the other.
Now, perhaps I'm going about this backwards.[nbsp][nbsp]Can I launch the browser windows using the HREF= method and still modify the window parameters?
Brian
Hi I quite understand what you are talking about. Might this work:
<A HREF="mailto:you@yourdoamin.com"?subject=whatever you want" TARGET="_New">
Let me know if this is what you are looking for. I have not tried this method with an email message link but have done it with a regular hyperlink...
Why does your website only show a list of files?
Thank you.
------------------
--------------------------------------------------
Noody Does It Better In The Y2Gg!!
BLAZING-HOT.COM&#153; 2000
--------------------------------------------------
bw3249
01-14-2000, 10:20 PM
Hey, I figured it out.[nbsp][nbsp]The answer is:
<A onClick=window.location="name@domain.com">
Thanks everybody for your input.[nbsp][nbsp]For those that visited my site and noticed strange thing...I'm loading the new version.[nbsp][nbsp]Check back in a couple of days.
Next question...I'm a Web Site Owner, how come I'm listed as a New Member Visitor?
Brian
Justin
01-14-2000, 10:21 PM
I see now... there are ways to modify the mouse pointer but I think the easiest way would be to use:
<a href="JavaScript:win.open('http://blah')">
Instead of the onClick event. Works the same in both browsers in my experience, and will give you the standard mouse icon. I don't think IE would behave like you describe though I'm not sure...
HTH
------------------
Justin Nelson
FutureQuest Support
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.