-
Javascript with asp controls can it be done?
Can I write a javascript for an asp control?
This is what I had before.
function OpenRouteWindow(WindowName)
{
NewWin = window.open(WindowName,'NewWin','toolbar=0,location=0,directories=0,status=0,menubar=0,scr ollbars=1,resizable=1,width=425,height=265');
}
Now the button is an asp control and I want to use the onclick event to
process this function.
The reason the button needs to be and asp control is that I am determining
on load if the button is to be visible or not.
I would like it to be in java script because it is a waste of a round trip
to the server if it is not.
Scott
-
Re: Javascript with asp controls can it be done?
To add script to a Web form, see the Page.RegisterClientScriptBlock and
Page.RegisterStartupScriptBlock methods. To add an attribute, such as an
event-handler, to a control, see the AttributeCollection's Add or
AddAttributes methods.
"s" <sremiger@pnms.com> wrote in message
news:3e5e6918$1@tnews.web.devx.com...
>
> Can I write a javascript for an asp control?
>
> This is what I had before.
>
> function OpenRouteWindow(WindowName)
> {
>
> NewWin =
window.open(WindowName,'NewWin','toolbar=0,location=0,directories=0,status=0
,menubar=0,scrollbars=1,resizable=1,width=425,height=265');
>
> }
>
> Now the button is an asp control and I want to use the onclick event to
> process this function.
>
> The reason the button needs to be and asp control is that I am determining
> on load if the button is to be visible or not.
>
> I would like it to be in java script because it is a waste of a round trip
> to the server if it is not.
>
> Scott
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks