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

  • Thread starter alberta soranzo
  • Start date
A

alberta soranzo

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...width=600,height=450');seriesdetails.focus();
 
I

Ivo

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','menubar=no,scrollbars=yes,resiz
able=yes,width=600,height=450');seriesdetails.focus();

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
 
M

Markus Ernst

alberta soranzo said:
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','menubar=no,scrollbars=yes,resiz
able=yes,width=600,height=450');seriesdetails.focus();

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.
 
K

kaeli

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. :)


--
 
M

Markus Ernst

kaeli said:
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.
 
K

kaeli

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
 
R

Randy Webb

kaeli said:
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.
 
T

Thomas 'PointedEars' Lahn

Markus said:
[...]
the links are all like this:
javascript:seriesdetails=open('http://www.cinema.ucla.edu/calendar/calendard
etails.aspx?details_type=2&id=123','_blank','menubar=no,scrollbars=yes,resiz
able=yes,width=600,height=450');seriesdetails.focus();

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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top