By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,206 Members | 1,035 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,206 IT Pros & Developers. It's quick & easy.

Show Popup Help Window

P: n/a
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
Sep 18 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
use RegisterClientScriptBlock to register the script. use onmouseover and
onmouseout event to set the curor style of the button.

-- bruce (sqlwork.com)
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:O1*************@TK2MSFTNGP02.phx.gbl...
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


Sep 18 '06 #2

P: n/a
Use the cursor:hand; style.
As for the popup, you might consider using the free control detailed in the
second half of this article:
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net

"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:O1*************@TK2MSFTNGP02.phx.gbl...
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


Sep 18 '06 #3

P: n/a


--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"bruce barker (sqlwork.com)" <b_*************************@sqlwork.comwrote
in message news:%2****************@TK2MSFTNGP06.phx.gbl...
use RegisterClientScriptBlock to register the script. use onmouseover and
onmouseout event to set the curor style of the button.

-- bruce (sqlwork.com)
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:O1*************@TK2MSFTNGP02.phx.gbl...
>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



Sep 19 '06 #4

P: n/a
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.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"bruce barker (sqlwork.com)" <b_*************************@sqlwork.comwrote
in message news:%2****************@TK2MSFTNGP06.phx.gbl...
use RegisterClientScriptBlock to register the script. use onmouseover and
onmouseout event to set the curor style of the button.

-- bruce (sqlwork.com)
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:O1*************@TK2MSFTNGP02.phx.gbl...
>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



Sep 19 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.