Ask a Question related to ASP.NET General, Design and Development.
-
Jenny #1
Simple JScript
Hi all,
I wrote a simple asp.net with JScript. But it doesn't work
properly. And I don't know why!
The CodeBehind:
Public Class WebForm1
Inherits System.Web.UI.Page
....
Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
Button1.Attributes.Add("AutoPostBack", "False")
Button1.Attributes.Add("onclick", "openPopup();")
End Sub
End Class
And the html in VisualStudio:
<HTML>
<HEAD>
<title>WebForm1</title>
<meta content="Microsoft Visual Studio .NET 7.1"
name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta
content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<SCRIPT language="JScript">
var oPopup = window.createPopup();
function openPopup()
{
var oPopBody = oPopup.document.body;
oPopBody.innerHTML="<DIV>This is a popup!</DIV>";
oPopup.show(15,150,50,50,document.body);
}
</SCRIPT>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button id="Button1" style="Z-INDEX: 101; LEFT:
174px; POSITION: absolute; TOP: 95px" runat="server"
Text="Button" Width="233px" Height="64px"
CausesValidation="False"></asp:Button></form>
</body>
</HTML>
Once started and clicked a message (This is a popup)
appears for some ms on the screen (And it doesn't look like
a popup window).
thanks for each help on this
Jenny
Jenny Guest
-
Confusion between Jscript and Javascript
Can someone explain here what is the difference if any between JScript with extentions .js and Javascript. I am trying to do a site and cant get... -
JScript (.js) in htlm
I am new here and trying ot self learned on Dynamic Web design. I am using Dreamweaver for this task. I have a quesrtion concerning the JSCript... -
MX 7 breaks CF 4 Jscript on NS 4.79
I've integrated a javascript-based popup menu function from www.dynamicdrive.com into my Cold Fusion 4.01 CFM file. This is a cross-platform site... -
problem with jscript and swf
You can also set the background of the swf to be "opaque" or "window" (and "transparent"). If you're using on NN, why doesn't make the menu in Flash... -
JScript
Hi all, how can I start a client side JScript function instead of doing a postback if a button (webforms) is clicked? Thx Jenny -
Prasad #2
Re: Simple JScript
Hi
AutoPostBack = false should be set at Server Side and not at ClientSide. It
should be
Button.AutoPostBack = false;
HTH
Prasad
"Jenny" <j.malloyNO@SPAMx-mail.net> wrote in message
news:03e501c35fcf$38234390$a401280a@phx.gbl...> Hi all,
>
> I wrote a simple asp.net with JScript. But it doesn't work
> properly. And I don't know why!
>
> The CodeBehind:
>
> Public Class WebForm1
> Inherits System.Web.UI.Page
> ...
>
> Private Sub Page_Load(ByVal sender As System.Object,
> ByVal e As System.EventArgs) Handles MyBase.Load
>
> Button1.Attributes.Add("AutoPostBack", "False")
> Button1.Attributes.Add("onclick", "openPopup();")
>
> End Sub
>
> End Class
>
> And the html in VisualStudio:
>
> <HTML>
> <HEAD>
> <title>WebForm1</title>
> <meta content="Microsoft Visual Studio .NET 7.1"
> name="GENERATOR">
> <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
> <meta content="JavaScript" name="vs_defaultClientScript">
> <meta
> content="http://schemas.microsoft.com/intellisense/ie5"
> name="vs_targetSchema">
> <SCRIPT language="JScript">
> var oPopup = window.createPopup();
> function openPopup()
> {
> var oPopBody = oPopup.document.body;
> oPopBody.innerHTML="<DIV>This is a popup!</DIV>";
> oPopup.show(15,150,50,50,document.body);
> }
> </SCRIPT>
> </HEAD>
> <body MS_POSITIONING="GridLayout">
> <form id="Form1" method="post" runat="server">
> <asp:Button id="Button1" style="Z-INDEX: 101; LEFT:
> 174px; POSITION: absolute; TOP: 95px" runat="server"
> Text="Button" Width="233px" Height="64px"
> CausesValidation="False"></asp:Button></form>
> </body>
> </HTML>
>
> Once started and clicked a message (This is a popup)
> appears for some ms on the screen (And it doesn't look like
> a popup window).
>
> thanks for each help on this
>
> Jenny
Prasad Guest



Reply With Quote

