I have a news video that I am sending out for a client. There are embedded
links to flash movies in the email.
I want the popup to be a set size (400 x 400). I am currently using the
following code, but the popup window is not 400 x 400, it is whatever the
browser size was last time it was opened. How can I set the absolute size
from within this email?
Thanks.
### START CODE ###
<SCRIPT language=javascript type=text/javascript>
<!--
/************************************************** ********************
Author: Eric King
Url: http://redrival.com/eak/index.shtml
Featured on Dynamic Drive script library ( http://www.dynamicdrive.com)
************************************************** *********************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos==random){LeftPosition=(screen.width)?Math.f loor(Math.random()*(screen
..width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen
..height-h)-75)):100;}
if(pos==center){LeftPosition=(screen.width)?(scree n.width-w)/2:100;TopPositi
on=(screen.height)?(screen.height-h)/2:100;}
else if((pos!=center && pos!=random) ||
pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPositi on+',left='+LeftPosition+'
,scrollbars='+scroll+',location=no,directories=no, status=no,menubar=no,toolb
ar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->
function blurAnchors(){
if(document.getElementsByTagName){
var a = document.getElementsByTagName(a);
for(var i = 0; i < a.length; i++){
a[i].onfocus = function(){this.blur()};
}
}
}
window.onload = blurAnchors;
</SCRIPT>
<TABLE>
<TBODY>
<TR>
<TD width=400><A onfocus=this.blur()
onclick="NewWindow(this.href,'video','400','400',' no','center');return"
href="http://www.buildingonline.net/client/archwood/ht_high.htm"
false>Launch Home Time Video for Broadband, Cable, DSL,
etc.</A></TD></TR>
<TR>
<TD> </TD></TR>
<TR>
<TD width=300><A onfocus=this.blur()
onclick="NewWindow(this.href,'video','400','400',' no','center');return"
href="http://www.buildingonline.net/client/archwood/ht_low.htm"
false>Launch Home Time Video for dial-up 56k
modem.</A></TD></TR></TBODY></TABLE> 5 2264
Sean Berry wrote: I want the popup to be a set size (400 x 400). I am currently using the following code, but the popup window is not 400 x 400, it is whatever the browser size was last time it was opened. How can I set the absolute size from within this email?
<TD width=400><A onfocus=this.blur()
onclick="NewWindow(this.href,'video','400','400',' no','center');return" href="http://www.buildingonline.net/client/archwood/ht_high.htm" false>Launch Home Time Video for Broadband, Cable, DSL, etc.</A></TD></TR>
Probably there is no script enabled in the email client so that the link
is simply opened. Just a guess, but generally don't expect script in
HTML emails to work.
--
Martin Honnen http://JavaScript.FAQTs.com/
How about... having a link in an email open a browser window... that page
opens a popup, then closes itself, leaving only the popup?
Any suggestions on code to open the popup automatically, then close the main
window?
Thanks...
"Sean Berry" <se********@cox.net> wrote in message
news:sohEc.1508$876.1171@fed1read07... I have a news video that I am sending out for a client. There are
embedded links to flash movies in the email.
I want the popup to be a set size (400 x 400). I am currently using the following code, but the popup window is not 400 x 400, it is whatever the browser size was last time it was opened. How can I set the absolute size from within this email?
Thanks.
### START CODE ###
<SCRIPT language=javascript type=text/javascript> <!-- /************************************************** ******************** Author: Eric King Url: http://redrival.com/eak/index.shtml Featured on Dynamic Drive script library (http://www.dynamicdrive.com) ************************************************** *********************/ var win=null; function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos==random){LeftPosition=(screen.width)?Math.f loor(Math.random()*(screen
..width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen .height-h)-75)):100;}
if(pos==center){LeftPosition=(screen.width)?(scree n.width-w)/2:100;TopPositi on=(screen.height)?(screen.height-h)/2:100;} else if((pos!=center && pos!=random) || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPositi on+',left='+LeftPosition+'
,scrollbars='+scroll+',location=no,directories=no, status=no,menubar=no,toolb ar=no,resizable=no'; win=window.open(mypage,myname,settings);} // -->
function blurAnchors(){ if(document.getElementsByTagName){ var a = document.getElementsByTagName(a); for(var i = 0; i < a.length; i++){ a[i].onfocus = function(){this.blur()}; } } } window.onload = blurAnchors;
</SCRIPT>
<TABLE> <TBODY> <TR> <TD width=400><A onfocus=this.blur()
onclick="NewWindow(this.href,'video','400','400',' no','center');return" href="http://www.buildingonline.net/client/archwood/ht_high.htm" false>Launch Home Time Video for Broadband, Cable, DSL, etc.</A></TD></TR> <TR> <TD> </TD></TR> <TR> <TD width=300><A onfocus=this.blur()
onclick="NewWindow(this.href,'video','400','400',' no','center');return" href="http://www.buildingonline.net/client/archwood/ht_low.htm" false>Launch Home Time Video for dial-up 56k modem.</A></TD></TR></TBODY></TABLE>
I figured most of this out....
My only problem now is that when the code executes to close the window, in
IE on Win, it wants you to confirm closing the window.
Anyway to bypass this? It works great in IE on Mac.
"Sean Berry" <se********@cox.net> wrote in message
news:MTkEc.1670$876.1026@fed1read07... How about... having a link in an email open a browser window... that page opens a popup, then closes itself, leaving only the popup?
Any suggestions on code to open the popup automatically, then close the
main window?
Thanks...
"Sean Berry" <se********@cox.net> wrote in message news:sohEc.1508$876.1171@fed1read07... I have a news video that I am sending out for a client. There are embedded links to flash movies in the email.
I want the popup to be a set size (400 x 400). I am currently using
the following code, but the popup window is not 400 x 400, it is whatever
the browser size was last time it was opened. How can I set the absolute
size from within this email?
Thanks.
### START CODE ###
<SCRIPT language=javascript type=text/javascript> <!-- /************************************************** ******************** Author: Eric King Url: http://redrival.com/eak/index.shtml Featured on Dynamic Drive script library (http://www.dynamicdrive.com) ************************************************** *********************/ var win=null; function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos==random){LeftPosition=(screen.width)?Math.f loor(Math.random()*(screen
..width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen .height-h)-75)):100;}
if(pos==center){LeftPosition=(screen.width)?(scree n.width-w)/2:100;TopPositi on=(screen.height)?(screen.height-h)/2:100;} else if((pos!=center && pos!=random) || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPositi on+',left='+LeftPosition+'
,scrollbars='+scroll+',location=no,directories=no, status=no,menubar=no,toolb ar=no,resizable=no'; win=window.open(mypage,myname,settings);} // -->
function blurAnchors(){ if(document.getElementsByTagName){ var a = document.getElementsByTagName(a); for(var i = 0; i < a.length; i++){ a[i].onfocus = function(){this.blur()}; } } } window.onload = blurAnchors;
</SCRIPT>
<TABLE> <TBODY> <TR> <TD width=400><A onfocus=this.blur()
onclick="NewWindow(this.href,'video','400','400',' no','center');return" href="http://www.buildingonline.net/client/archwood/ht_high.htm" false>Launch Home Time Video for Broadband, Cable, DSL, etc.</A></TD></TR> <TR> <TD> </TD></TR> <TR> <TD width=300><A onfocus=this.blur()
onclick="NewWindow(this.href,'video','400','400',' no','center');return" href="http://www.buildingonline.net/client/archwood/ht_low.htm" false>Launch Home Time Video for dial-up 56k modem.</A></TD></TR></TBODY></TABLE>
Sean Berry wrote: <TD width=400><A onfocus=this.blur()
This is a "trick" used to avoid the dotted outline around links. However, using
this "trick" removes the possibility of using anything other then a mouse to
activate the link. Doing it with "this.blur()" is a bad design. Removing the
focus indicator at all is a bad design, but if you insist on doing it, the way
you are doing it should be replaced by:
<head>
<style type="text/css">
a:focus {
-moz-outline: none ! important;
}
</style>
<script type="text/javascript">
function hideFoci() {
var a;
if (document.getElementsByTagName) {
a = document.getElementsByTagName('a');
} else if (document.all && document.all.tags) {
a = document.all.tags('a');
}
if (a && a.length > 0 && typeof a[0].hideFocus != 'undefined') {
for (var i = 0; i < a.length; i++) {
a[i].hideFocus = true;
}
}
}
</script>
</head>
<body onload="hideFoci();">
onclick="NewWindow(this.href,'video','400','400',' no','center');return" href="http://www.buildingonline.net/client/archwood/ht_high.htm" false>Launch Home Time Video for Broadband, Cable, DSL,
I'm not sure why you've included an attribute of the <A> tag called "false" on
this link. I think you might have been modifying code and in fact meant:
onclick="NewWindow(this.href,'video','400','400',' no','center');return false;"
href="...">Link text...
(ie - move the word false from it's position as an attribute of the <A> tag to
be the value returned by the onclick event)
etc.</A></TD></TR> <TR> <TD> </TD></TR> <TR> <TD width=300><A onfocus=this.blur()
onclick="NewWindow(this.href,'video','400','400',' no','center');return" href="http://www.buildingonline.net/client/archwood/ht_low.htm" false>Launch Home Time Video for dial-up 56k modem.</A></TD></TR></TBODY></TABLE>
Remove the onfocus event handler and move the "false" for this link as well.
--
| Grant Wagner <gw*****@agricoreunited.com>
* Client-side Javascript and Netscape 4 DOM Reference available at:
* http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
* http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Sean Berry wrote: I figured most of this out....
My only problem now is that when the code executes to close the window, in IE on Win, it wants you to confirm closing the window.
Anyway to bypass this?
<news:40**************@PointedEars.de>
It works great in IE on Mac.
So IE on Mac is borken.
[Top post]
<http://jibbering.com/faq/#FAQ2_3>
PointedEars This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jayme Assuncao Casimiro |
last post by:
Is there the possibility of not permiting the user of opening
two windows of the same web site?
Thanks
+---------------------------------------------+
| Jayme Assuncao Casimiro ...
|
by: ACaunter |
last post by:
Hi all,
I need to set a session variable and open a new window with a single click
of an asp.net button. My problem is that it always takes two clicks.. one
sets the session and the other opens...
|
by: Doug |
last post by:
When opening a DOC file via a hyperlink, is it possible to force
Microsoft Word to open in a specified-size window? For example, a
600x300 window?
I realize that MS Word will 'remember' the...
|
by: sathyanrockie |
last post by:
Plase tell me what is the difference between window.open and
window.showmodelessdialog.
Can we use window.showmodelessdialog in place of window.open?
|
by: Sonnich |
last post by:
Hi!
I have used JS, but I am still new to it.
I have something like this:
oNewWindow = new Object();
oNewWindow = open("sonnich.xls","Qopen","resizable=yes,scroll=yes,
status=yes,...
|
by: dibakar |
last post by:
Hello
I want to open a window using Window.showModalDialog once i click
inside of a TextBox.And that window need to come just under the
TextBox,so that it seems to a same control.
So,what...
|
by: tshad |
last post by:
I have an aspx window that is going to open a window (javascript) and
display a graphic. I want to resize the window to the size of the graphic
before it actually displays - how do I do that?
...
|
by: hcuellar |
last post by:
Hi.
Please I need your help for this:
After a database query, a table is created with a cell for each information retrieved, and for each record, two buttons, and second one have besides it...
|
by: vatz |
last post by:
I am using Java to open a window application. i need to open it in a specified size. Please let me know how to do this...Thanks in advance...
- Vatz
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |