469,600 Members | 2,246 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,600 developers. It's quick & easy.

link won't open correctly in email (mac and win)

i'm trying to send a mass-email using microsoft's list builder
(http://www.bcentral.com/products/lb/default.asp).
my html file is clean and the javascript links work fine in all
browsers.
when the emails are received though, clicking on the links opens two
browser windos: one --on top -- displays the content correctly. the
other one - always on the bottom -- displays "[object]".
is there something i should change in the links to make them work in
outlook/mail/entourage?
thanks,

alberta

the links are all like this:

javascript:seriesdetails=open('http://www.cinema.ucla.edu/calendar/calendardetails.aspx?details_type=2&id=123','_blan k','menubar=no,scrollbars=yes,resizable=yes,width= 600,height=450');seriesdetails.focus();
Jul 23 '05 #1
7 3332
Ivo
"alberta soranzo" wrote
i'm trying to send a mass-email
Oh no!
using microsoft's list builder
(http://www.bcentral.com/products/lb/default.asp).
my html file is clean and the javascript links work fine in all
browsers.
Javascript in email is not a good idea. According to conservative hearsay
estimates, 70% of users have script turned off in their email client. If
there are a few more like you, the other 30% will follow shortly.
when the emails are received though, clicking on the links opens two
browser windos: one --on top -- displays the content correctly. the
other one - always on the bottom -- displays "[object]".
is there something i should change in the links to make them work in
outlook/mail/entourage?
What is not working in the current situation? I assume that this "[object]"
bothers you, but you don't say what this second window should display.
thanks,
alberta

the links are all like this:

javascript:seriesdetails=open('http://www.cinema.ucla.edu/calendar/calendard
etails.aspx?details_type=2&id=123','_blank','menub ar=no,scrollbars=yes,resiz
able=yes,width=600,height=450');seriesdetails.focu s();

This is in the "href" of an "a", right? See
http://www.jibbering.com/faq/#FAQ4_24
What happens is the variable "seriesdetails" is returned from the javascript
evaluation, and the browser tries to display it. This the the "object" that
you see. If you add "void('');" after the focus command, any return value is
suppressed.

BUt to take a step back, what is wrong with a normal and ordinary link, like
<a
href="http://www.cinema.ucla.edu/calendar/calendardetails.aspx?details_type=
2&id=123">
Apart from the window size which would be the reader's current or favourite
window size instead of your hardcoded 600x450 (how does that compare on
800px resolution or 1600 resolution), everything would work the same.
I must be crazy helping people script in email.
Ivo
Jul 23 '05 #2
"alberta soranzo" <al************@earthlink.net> schrieb im Newsbeitrag
news:5e**************************@posting.google.c om...
i'm trying to send a mass-email using microsoft's list builder
(http://www.bcentral.com/products/lb/default.asp).
my html file is clean and the javascript links work fine in all
browsers.
when the emails are received though, clicking on the links opens two
browser windos: one --on top -- displays the content correctly. the
other one - always on the bottom -- displays "[object]".
is there something i should change in the links to make them work in
outlook/mail/entourage?
thanks,

alberta

the links are all like this:

javascript:seriesdetails=open('http://www.cinema.ucla.edu/calendar/calendard
etails.aspx?details_type=2&id=123','_blank','menub ar=no,scrollbars=yes,resiz
able=yes,width=600,height=450');seriesdetails.focu s();

You focus a window called 'seriesdetails', but there is none, as the window
you create is called '_blank'. So your e-mail client might think it should
create one, another one might not...

For the rest see Ivo's post. Why use Javascript in an e-mail? I am not a
very suspicious person, I don't use popup blockers and stuff like that, but
I would _never_ allow scripting in e-mails.

--
Markus
Jul 23 '05 #3
In article <40***********************@news.easynet.ch>,
derernst@NO#SP#AMgmx.ch enlightened us with...

For the rest see Ivo's post. Why use Javascript in an e-mail? I am not a
very suspicious person, I don't use popup blockers and stuff like that, but
I would _never_ allow scripting in e-mails.


The only people I know who DO allow scripting are newbies using Outlook.
The first virus they get, they disable scripting.

However, if this is for an intranet application where you know your
users have script, go for it. Try using window.open instead of just
open. If that doesn't do it, change the target of _blank to _self in the
open.
That's all I can think of. :)
--
--
~kaeli~
Suicide is the most sincere form of self-criticism.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #4
"kaeli" <ti******@NOSPAM.comcast.net> schrieb im Newsbeitrag
news:MP************************@nntp.lucent.com...
In article <40***********************@news.easynet.ch>,
derernst@NO#SP#AMgmx.ch enlightened us with...

For the rest see Ivo's post. Why use Javascript in an e-mail? I am not a
very suspicious person, I don't use popup blockers and stuff like that, but I would _never_ allow scripting in e-mails.


The only people I know who DO allow scripting are newbies using Outlook.
The first virus they get, they disable scripting.

However, if this is for an intranet application where you know your
users have script, go for it. Try using window.open instead of just
open. If that doesn't do it, change the target of _blank to _self in the
open.
That's all I can think of. :)


So is the syntax

seriesdetails=open('url','_blank');

creating a window with the name "seriesdetails"? I thaught that would make
seriesdetails a variable with the value true if window is opened, and the
name of the window was '_blank'... But I am really not sure about that.

--
Markus
Jul 23 '05 #5
In article <40***********************@news.easynet.ch>,
derernst@NO#SP#AMgmx.ch enlightened us with...

So is the syntax

seriesdetails=open('url','_blank');

creating a window with the name "seriesdetails"? I thaught that would make
seriesdetails a variable with the value true if window is opened, and the
name of the window was '_blank'... But I am really not sure about that.


A new window will be created with the window.open command. The variable
seriesdetails will point to it. I haven't seen any other code, so if
open (without the window in front) is defined in other code, it may or
may not function the same.
I also don't know what happens, really, when you name your window a
reserved (?) target name like _blank. Seeing that makes me think what
would normally be the name of the window in the standard window.open
command is actually a target in a user defined open command. The OP was
using a microsoft tool to create this, so all bets are off. ;)

--
--
~kaeli~
Why do they lock gas station bathrooms? Are they afraid
someone will clean them?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #6
kaeli wrote:
In article <40***********************@news.easynet.ch>,
derernst@NO#SP#AMgmx.ch enlightened us with...
So is the syntax

seriesdetails=open('url','_blank');

creating a window with the name "seriesdetails"? I thaught that would make
seriesdetails a variable with the value true if window is opened, and the
name of the window was '_blank'... But I am really not sure about that.

A new window will be created with the window.open command. The variable
seriesdetails will point to it. I haven't seen any other code, so if
open (without the window in front) is defined in other code, it may or
may not function the same.
I also don't know what happens, really, when you name your window a
reserved (?) target name like _blank. Seeing that makes me think what
would normally be the name of the window in the standard window.open
command is actually a target in a user defined open command. The OP was
using a microsoft tool to create this, so all bets are off. ;)


seriesdetails = window.open('URL','WindowName','properties')

WindowName will be what the OP is after. AFAIK, open and window.open
work the same, perhaps not in some strange browsers that I have not run
across. Using _blank is no different than using myHumptyDumptyWindow as
the name, other than when used as the target attribute of a link.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #7
Markus Ernst wrote:
"alberta soranzo" <al************@earthlink.net> schrieb im Newsbeitrag
news:5e**************************@posting.google.c om... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^
[...]
the links are all like this:

javascript:seriesdetails=open('http://www.cinema.ucla.edu/calendar/calendard
etails.aspx?details_type=2&id=123','_blank','menub ar=no,scrollbars=yes,resiz
able=yes,width=600,height=450');seriesdetails.focu s();


You did not wrote that as the quotation level would indicate, but Alberta
did. Please take heed of both <http://got.to/quote> and, as for your munged
e-mail address, <http://gerlo.de/falsche-email-adressen.html>.
You focus a window called 'seriesdetails', but there is none, as the window
you create is called '_blank'. So your e-mail client might think it should
create one, another one might not...


You confuse window name and object reference identifier. Apart from the
misguided "javascript:" label that should be removed, the first statement
assigns the result of window.open() to the global `seriesdetails' to refer
to the created window. In the second statement that reference is used to
call a method of Window objects. The internal name of that referenced
window, however, is chosen to be "_blank" via the second argument of
window.open(). (One can do that to prevent the window being re-used, as
"_blank" is a key value for the "target" attribute of the "base" and "a"
elements in HTML. Nothing is syntactically or logically wrong with this.
However, I doubt anyone would deliberately allow scripts to execute in
their e-mail client and it is likely that web-mail software will disable
that script as well.
PointedEars
Jul 23 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Ben Sharvy | last post: by
29 posts views Thread by wayne | last post: by
4 posts views Thread by Amanda H. | last post: by
7 posts views Thread by Ben Amada | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.