|
-
Jan 19th, 2005, 12:40 PM
#1
Thread Starter
Frenzied Member
JS and ASP.net
I have a button in my user control:
<asp:Button ID=si Text=SI Runat=server cssclass=knap Enabled=False Width=50px OnClick="openNewWindow"></asp:Button>
And the js-function is defined at the beginning of the ascx-file:
<script language=javascript type="text/javascript">
function openNewWindow()
{
var winName = "w";
var winURL = "gf2004.aspx";
var w;
w = window.open(winURL,winName);
w.focus();
}
</script>
I have two questions:
1) Why does this code not work? Has it something to do with the user control? The error message is:
Compiler Error Message: BC30456: 'openNewWindow' is not a member of 'ASP.Buttons_ascx'.
2) Is it possible in JS to use this url winURL = "gf2004.aspx"; when the path is the same? Or do I have to use absolute paths (not preferred!)
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
|
Click Here to Expand Forum to Full Width
|