I'm running the below script to open a popup window. Works great!
I'd like to find out if there's a way to include Mouse Coordinates in
the top and left parameters so that when my button is clicked, the
popup opens in the same location.
protected void btnLocateEmpID_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
sb.Append("<script>");
sb.Append("window.open('LocateEmpID.aspx', '','toolbar=0,
height=320,width=375,resizable=0,scrollbars=0');") ;
sb.Append("</scri");
sb.Append("pt>");
Page.RegisterStartupScript("test", sb.ToString());
}
Please be as descriptive as possible with your reply.
Thanks for your help! ;-) 3 3729 http://msdn2.microsoft.com/en-us/library/ms536651.aspx
-- http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"Dave" wrote:
I'm running the below script to open a popup window. Works great!
I'd like to find out if there's a way to include Mouse Coordinates in
the top and left parameters so that when my button is clicked, the
popup opens in the same location.
protected void btnLocateEmpID_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
sb.Append("<script>");
sb.Append("window.open('LocateEmpID.aspx', '','toolbar=0,
height=320,width=375,resizable=0,scrollbars=0');") ;
sb.Append("</scri");
sb.Append("pt>");
Page.RegisterStartupScript("test", sb.ToString());
}
Please be as descriptive as possible with your reply.
Thanks for your help! ;-)
Peter, that link basically tells me what I already have in my original
posting. Thank you all the same. My Original Posting says that the
script I had worked Great. My original question...How Can I get
"Mouse Coordinates" (X,Y) to include them as Left and Top parameters
so that the popup window opens "where the button was clicked"? That
link doesn't provide that.
On Nov 10, 10:56 am, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.comwrote:
http://msdn2.microsoft.com/en-us/library/ms536651.aspx
--http://www.eggheadcafe.com
unBlog:http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"Dave" wrote:
I'm running the below script to open a popup window. Works great!
I'd like to find out if there's a way to include Mouse Coordinates in
the top and left parameters so that when my button is clicked, the
popup opens in the same location.
protected void btnLocateEmpID_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
sb.Append("<script>");
sb.Append("window.open('LocateEmpID.aspx', '','toolbar=0,
height=320,width=375,resizable=0,scrollbars=0');") ;
sb.Append("</scri");
sb.Append("pt>");
Page.RegisterStartupScript("test", sb.ToString());
}
Please be as descriptive as possible with your reply.
Thanks for your help! ;-)- Hide quoted text -
- Show quoted text -
Dave wrote:
Peter, that link basically tells me what I already have in my original
posting. Thank you all the same. My Original Posting says that the
script I had worked Great. My original question...How Can I get
"Mouse Coordinates" (X,Y) to include them as Left and Top parameters
so that the popup window opens "where the button was clicked"? That
link doesn't provide that.
It's kind of messy in implementation on a per-browser basis.
Scroll down until you see the Mouse Position heading. http://www.quirksmode.org/js/events_properties.html
Chris. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Les |
last post by:
Hi,
I'd like to find out how to use the window.open() script in Fireworks MX. I have posted my question in the Fireworks forum but
didn't get any replies. Since it's javascript, maybe someone...
|
by: Dan Cruz |
last post by:
Below are two files: Main.asp and Help.asp.
I've stripped it down to the 'barest-of bones' so that anyone willing to
help can duplicate the problem on their own systems.
***Main.asp*** looks...
|
by: Richard Bell |
last post by:
I'm a bit new to Javascript and am trying to do
oNewWin = window.open( ... );
then determine when the contents of oNewWin are completely loaded.
I've tried
oNewWin.attachEvent( "onload",...
|
by: Dominic Tocci |
last post by:
I'm searching for a way to use window.open on my web page to open a window
in firefox that allows the sidebars to work (bookmarks, history, etc).
When I use the following:
var...
|
by: Fowler |
last post by:
1.) i want to open a browser when click a button
the browser can only be open ONE only, no TWO can be open!
|
by: Seth Grimes |
last post by:
Hello all,
I want to open a window when a user leaves my site. I set up a function
called by onUnload. To skip the window.open if the user hasn't left my
site, I set a variable in my links and...
|
by: NC |
last post by:
Hi All,
We have an issue where if we say:
window.open(uri, 'QuickTradePopup',
'width=730,height=300,menubar=no,toolbar=no,scrollbars=yes,resizable=yes').
|
by: Dave |
last post by:
For some reason, the below lines only work on select machines. All
machines are running IE6. IE SP's and OS's vary. When it doesn't
work, default.aspx (the page that this code is in) opens and...
|
by: arajunk |
last post by:
In Firefox this opens a full size window (maximized) . In IE it opens
the partial window requiring user to click restore (upper right) to
maximize. What am I missing ?
var...
|
by: Dave |
last post by:
I'm running the below script to open a popup window. Works great!
How Can I get "Mouse Coordinates" (X,Y) to include them as Left and
Top parameters
so that the popup window opens "where the...
|
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: 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: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |