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 button was clicked"?
protected void btnLocateEmpID_ Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder() ;
sb.Append("<scr ipt>");
sb.Append("wind ow.open('Locate EmpID.aspx', '','toolbar=0,
height=320,widt h=375,resizable =0,scrollbars=0 ');");
sb.Append("</scri");
sb.Append("pt>" );
Page.RegisterSt artupScript("te st", sb.ToString());
}
I've already read what the books have to sayin reqards to
window.open,
and I haven't been lucky in finding anything in reqards to
window.open
and Mouse Coordinates together. Please be as descriptive as possible
with your reply.
Thanks for your help! :-) 1 1870
Call the static Control.MousePo sition ite returns in screen coordinates.
--
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Dave" <Da**********@J acobs.comwrote in message
news:11******** **************@ o38g2000hse.goo glegroups.com.. .
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 button was clicked"?
protected void btnLocateEmpID_ Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder() ;
sb.Append("<scr ipt>");
sb.Append("wind ow.open('Locate EmpID.aspx', '','toolbar=0,
height=320,widt h=375,resizable =0,scrollbars=0 ');");
sb.Append("</scri");
sb.Append("pt>" );
Page.RegisterSt artupScript("te st", sb.ToString());
}
I've already read what the books have to sayin reqards to
window.open,
and I haven't been lucky in finding anything in reqards to
window.open
and Mouse Coordinates together. Please be as descriptive as possible
with your reply.
Thanks for your help! :-) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike |
last post by:
In my previous post, I wrote:
> ...
> GOAL: (very simple) Provide a hyperlink which, when clicked,
> calls a javascript function which opens a new URL.
> ...
> PROBLEM: The following code works fine if I click to open in
> the same window, but if I click the browser option to open in a
> new window, the new window tries to open the href URL (the
> onClick function does get executed, but seems to be ignored).
> ...
|
by: Carlos Andr?s |
last post by:
Hi everybody.
I've got a problem. I'd like to avoid opening a new window when you
have pressed the shift key and you click in the left button of the
mouse. I've tried the next solution, in the body of the page I put the
next code:
<BODY onkeydown='notOpenNewWindow();'>
|
by: Dave Hammond |
last post by:
Hi All,
This one is a bit bizarre. My understanding of "Access is denied" with
respect to window.moveTo is that it results from a request which would
move a portion of the window off screen.
The window in question is 480 high by 1000 wide. The screen dimensions
are 1024x768. The move request is to 10,10, which would put the max
right coordinate of the window at 1010 and the max bottom coordinate at
490. Both coordinates are...
|
by: Alexandre Jaquet |
last post by:
Hi,
I would like to copy and paste a selected item on a web page I already
've a context menu when the user rigth click on an item.
I would like to draw a rectangle who carry about current mouse position
until the user click left to a position.
I know how to draw a rectangle and how to get mouse position, now I need
to know how can I draw the rectangle (move it with mouse coordinate)
|
by: Martin |
last post by:
I have some pages I'm serving out that are about twice the size of the
browser window (IE only; intranet only). The user must use the
horizontal and vertical scroll bars to move the page around.
Is it possible to have a javascript that would allow the user to click
and drag the page around (kind of like the new Google maps)? I already
have a ton of scripting in these pages - a few more lines won't hurt
anything.
Maybe someone could...
| |
by: Viken Karaguesian |
last post by:
Hello all,
On occasion I want to open hyperlinks (images, etc.) in a new window. In the
past, I've used target="_blank" to open the link in a new window. However,
using the "target" attribute causes my pages to fail validation (strict
doctype). The validator says "There is no attribute 'target'.."
So...how do I open a link in a new window, without Javscript, and pass
strict validation?
|
by: alexandre.brisebois |
last post by:
Hi, I am using access 2003, I would like to know if there is an option
to reorganize the tables in a maner that is readable, as we can do in
sql sever 2000 or 2005.
I have been given a database to look a and I am loosing tremendious
amounts of time trying to organize it so that I could view it.
Regards,
Alexandre Brisebois
|
by: ck.kislay |
last post by:
When I passed bounding area ( Location,height ,width )of a Window
control to the ClipCursor API it restrict the mouse in screen
coordinate ,Its fine because ClipCursor works on Screen coordinate. But
when I changed the bounding area (Location) to Screen coordinate then
pass to ClipCursor API then some time it works and some time it
doesn't work. Also how can unrestrict the mouse from ClipCursor?
Waiting for Reply,
Chandan Kumar
|
by: peradino |
last post by:
Hi
I have a problem when I want to know how far my cursor is from the top of pictureBox.
I can get mouse coordinate but it is screen coordinate.
I can get the top position of my pictureBox but it is the distance from its container, not the screen coordinate.
So my question is...
1.How can I get the top position of pictureBox in screen coordinate?
or esle
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |