Show Popup Help Window

J

Jonathan Wood

Greetings,

I'm new to ASP.NET and am trying to figure out how to popup a help window.

I was able to get the following code to work:

helpButton1.Attributes.Add("onclick",
"window.open('http://www.softcircuits.com', null, 'height=250, width=250,
status= no, resizable= no, scrollbars=no, toolbar=no, location=no,
menubar=no');");

But there are a few problems with it:

1. The button does not show a hand pointer when the mouse hovers over it,
indicating the button performs an action. I'd like to fix that.

2. I need my script to be a little more complex and would prefer to define
it outside of this call. Can someone show me how I could create the script
string separately and then just pass the name of it to Attributes.Add?

3. Any other suggestions on how to handle this? Maby add the script to my
HTML directly? Since the popup window will show some of my pages, should I
create regular C# code to handle this? Anything else?

Thanks for any tips!

Jonathan
 
B

bruce barker \(sqlwork.com\)

use RegisterClientScriptBlock to register the script. use onmouseover and
onmouseout event to set the curor style of the button.

-- bruce (sqlwork.com)
 
J

Jonathan Wood

I tried Page.RegistClientScriptBlock but it seemed to cause myh script to
run right when the page was loaded rather than when the button was clicked.

Thanks.
 

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

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top