473,804 Members | 3,182 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

popup a window over button

niv
Hi,

I have an asp.net button control on a webform.
I would like to show a drop down window when the user
moves their mouse over the button.
The information in this dropdown or popup is going to be
coming from a dataset.

I have tried the following.
<INPUT onmouseover="fu nc()" id="myButton"
type="button" value="Button1" style="Z-INDEX: 102; LEFT:
200px; POSITION: absolute; TOP: 104px"
runat="server">
<script type="text/javascript">
function func()
{
//you could put anything here, e.g. opening a window etc.
alert('Hi');
}

myButton.Attrib utes["onmouseove r"]=String.Format( "func
({0})", "my text");

I am not getting the result Im looking for with this code.
I took this code from this newsgroup.

Thanks for your help,

niv

Nov 18 '05 #1
3 2664
Niv,

If you've looking for a hover tool tip when the user moves over a control
though, this is different (and probably better) and all you need to do is
create a button control ( <asp:Button> not <input> ) and then in your code
behind change the button's "tooltip" property. If this is what you want,
ignore the rest, else read on...

If you're getting the data that you want to populated your "pop-up" with
from a dataset, then you should add the control attribute in this in the
aspx page (design time), but rather as code behind (run-time)...
///////////////////////////////////////////////////////// aspx page
<!-- put this within the <Head> tags... -->

<script type="text/javascript">
function func( stringToDisplay )
{
//you could put anything here, e.g. opening a window etc.
alert(stringToD isplay);
}
</script>

</Head>
<Body>

<!-- other HTML/ASPX code here -->

<INPUT id="myButton"
type="button" value="Button1" style="Z-INDEX: 102; LEFT:
200px; POSITION: absolute; TOP: 104px"
runat="server">

<!-- etc... -->
///////////////////////////////////////////////////////// aspx.cs in the
Page_Load method.

string myString = "Testing";
myButton.Attrib utes["onmouseove r"]= "func(" + myString + ");"
hope that helps...
Thanks.

Daniel.

"niv" <ni*@hotmail.co m> wrote in message
news:9b******** *************** *****@phx.gbl.. .
Hi,

I have an asp.net button control on a webform.
I would like to show a drop down window when the user
moves their mouse over the button.
The information in this dropdown or popup is going to be
coming from a dataset.

I have tried the following.
<INPUT onmouseover="fu nc()" id="myButton"
type="button" value="Button1" style="Z-INDEX: 102; LEFT:
200px; POSITION: absolute; TOP: 104px"
runat="server">
<script type="text/javascript">
function func()
{
//you could put anything here, e.g. opening a window etc.
alert('Hi');
}

myButton.Attrib utes["onmouseove r"]=String.Format( "func
({0})", "my text");

I am not getting the result Im looking for with this code.
I took this code from this newsgroup.

Thanks for your help,

niv

Nov 18 '05 #2
niv
Hi Daniel,
Thanks for the help.
I am going to try this now.
I owe you a beer.
-----Original Message-----
Niv,

If you've looking for a hover tool tip when the user moves over a controlthough, this is different (and probably better) and all you need to do iscreate a button control ( <asp:Button> not <input> ) and then in your codebehind change the button's "tooltip" property. If this is what you want,ignore the rest, else read on...

If you're getting the data that you want to populated your "pop-up" withfrom a dataset, then you should add the control attribute in this in theaspx page (design time), but rather as code behind (run- time)...

///////////////////////////////////////////////////////// aspx page <!-- put this within the <Head> tags... -->

<script type="text/javascript">
function func( stringToDisplay )
{
//you could put anything here, e.g. opening a window etc. alert(stringToD isplay);
}
</script>

</Head>
<Body>

<!-- other HTML/ASPX code here -->

<INPUT id="myButton"
type="button " value="Button1" style="Z-INDEX: 102; LEFT:
200px; POSITION: absolute; TOP: 104px"
runat="server">

<!-- etc... -->
///////////////////////////////////////////////////////// aspx.cs in thePage_Load method.

string myString = "Testing";
myButton.Attrib utes["onmouseove r"]= "func(" + myString + ");"

hope that helps...
Thanks.

Daniel.

"niv" <ni*@hotmail.co m> wrote in message
news:9b******* *************** ******@phx.gbl. ..
Hi,

I have an asp.net button control on a webform.
I would like to show a drop down window when the user
moves their mouse over the button.
The information in this dropdown or popup is going to be
coming from a dataset.

I have tried the following.
<INPUT onmouseover="fu nc()" id="myButton"
type="button" value="Button1" style="Z-INDEX: 102; LEFT:
200px; POSITION: absolute; TOP: 104px"
runat="server">
<script type="text/javascript">
function func()
{
//you could put anything here, e.g. opening a window etc. alert('Hi');
}

myButton.Attrib utes["onmouseove r"]=String.Format( "func
({0})", "my text");

I am not getting the result Im looking for with this code. I took this code from this newsgroup.

Thanks for your help,

niv

.

Nov 18 '05 #3
First remove onmouseover="fu nc()" from <INPUT ...>.

In your previous message you just asked how to pass text to javascript
function. You didn't mention neither popup nor dropdown.

I don't think onmouseover event is good for that purpose.

Anyway, now you are asking how to get function func(..) to show a popup.
There are several ways of doing this. One is to use window.createPo pup.
Another is to launch a modal window with window.showModa lDialog. There is a
lot of differences between them and it is hard to advice without knowing
your specific requirements.

Eliyahu

"niv" <ni*@hotmail.co m> wrote in message
news:9b******** *************** *****@phx.gbl.. .
Hi,

I have an asp.net button control on a webform.
I would like to show a drop down window when the user
moves their mouse over the button.
The information in this dropdown or popup is going to be
coming from a dataset.

I have tried the following.
<INPUT onmouseover="fu nc()" id="myButton"
type="button" value="Button1" style="Z-INDEX: 102; LEFT:
200px; POSITION: absolute; TOP: 104px"
runat="server">
<script type="text/javascript">
function func()
{
//you could put anything here, e.g. opening a window etc.
alert('Hi');
}

myButton.Attrib utes["onmouseove r"]=String.Format( "func
({0})", "my text");

I am not getting the result Im looking for with this code.
I took this code from this newsgroup.

Thanks for your help,

niv

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
12435
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank, 'height=200,width=400,status=no,toolbar=no, menubar=no,location=no resizable=no scrollable=no'); but I can't seem to invoke the client side script from within a Server Side Form. I know I can use the context with to Response.redirect or Server.transfer to return a
4
20809
by: moose | last post by:
OK Popup window? No problem PDF in popup? No problem But what about a couple of Close Window buttons? Imagine a "Close Window" button at the top of the popup page. Then the PDF which can scroll. And another "Close Window" button at the bottom of the page. Any suggestions for completing this task?
5
2518
by: Jay | last post by:
I have a situation where the user clicks on a button in a DataGrid to launch a popup window via javascript. In the popup window the user does some things that result in changes to the underlying database the DataGrid is using as a data source. When the popup window is closed I want to refresh the main window -- i.e., cause a postback to happen. Is this possible?
1
11591
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at http://weblogs.asp.net/asmith/archive/2003/09/15/27684.aspx but it was far more complex then I needed. (I got lost trying to figure it all out). Therefore, here goes my simple "web dialog box with parent event handler fireing" solution. ...
3
1631
by: clsmith66 | last post by:
I am building an ASP.NET application where I have been required to make all the editing screens popup windows within the application. I didn't have any trouble creating the new windows but only about half of them show on top of the main application when they are created. The window are created in javascript and I've tried using the top property of the window object but it still does not work for all my windows and all the windows are...
3
1670
by: Chrysan | last post by:
I have a popup window, which consist of a asp:textbox and a asp:button. And, I would like to pass the textbox.text to the javascript function when I click the button. Besides, by clicking the button, also close the popup window. The problem is, when I click the button, the textbox.text is successfully pass to the javascript function and the popup window will be closed, but the popup window will be opened again in maximize mode. I notice...
1
5757
by: dapkniht | last post by:
Hello, Here's my situation... I have an ASP.NET 2.0 (C#) page with a link button. When a user clicks the button I need it to execute the code behind code for the link button on click event. At the end of the code behind code for the link button click event, I use JavaScript to popup another browser window (using window.open). This all works fine. It's basically a confirmation popup.
2
3274
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully validated my HTML and CSS code. 1. When I clear cache and refresh my webpage, it takes 3 tries before the popup window displays - I click on the button once, a white window the size of my webpage displays. I close it and click on the button again (for...
5
1977
by: wreed06 | last post by:
I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully validated my HTML and CSS code. 1. When I clear cache and refresh my webpage, it takes 3 tries before the popup window displays - I click on the button once, a white window the size of my webpage displays. I close it and click on the button again (for the same...
1
3241
by: dittu | last post by:
How to close the popup window when submitting the form? I have a sample.jsp. In that page one button is there. when button pressed, open popup window contains one "text box" and one " submit button". when "submit" button pressed, call the "servlet" in this popup window and then close the "popup" window. <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var X = 200; // change the # at the left for a fixed X co-ordinate to accommodate...
0
9577
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,...
0
10569
Oralloy
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...
0
10325
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
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,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9140
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4295
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
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.