|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
problem with two </script> tagsThis code gives two errors, one on each </script> tag: the first: "statement cannot appear in method body" the last: "end of tag has no matching start tag" Any way to solve this? Thanks Bob <script runat="server"> Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Dim jv As String jv = "<script type='text/javascript' language='javascript'>" _ & " alert('Thanks, data are in');" _ & "</script>" Response.Write(jv) End Sub </script>
Show quote
Hide quote
"bob" wrote: Sounds like an IDE bug. You could do something like:> This code gives two errors, one on each </script> tag: > the first: "statement cannot appear in method body" > the last: "end of tag has no matching start tag" > <script runat="server"> > Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e As > System.Web.UI.WebControls.DetailsViewInsertedEventArgs) > Dim jv As String > jv = "<script type='text/javascript' language='javascript'>" _ > & " alert('Thanks, data are in');" _ > & "</script>" > Response.Write(jv) > End Sub > </script> & " alert('Thanks, data are in');" _ & "</sc" & "ript>" Which may trick the IDE into thinking it isn't a closing tag. Hi, thanks for replying.
I get now the java-error: ; expected Show quoteHide quote "Leon Mayne" <LeonMa***@discussions.microsoft.com> schreef in bericht news:21BBEB13-C6F5-4C71-BB12-A91AE5642D99@microsoft.com... > "bob" wrote: >> This code gives two errors, one on each </script> tag: >> the first: "statement cannot appear in method body" >> the last: "end of tag has no matching start tag" >> <script runat="server"> >> Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e >> As >> System.Web.UI.WebControls.DetailsViewInsertedEventArgs) >> Dim jv As String >> jv = "<script type='text/javascript' language='javascript'>" _ >> & " alert('Thanks, data are in');" _ >> & "</script>" >> Response.Write(jv) >> End Sub >> </script> > > Sounds like an IDE bug. You could do something like: > > & " alert('Thanks, data are in');" _ > & "</sc" & "ript>" > > Which may trick the IDE into thinking it isn't a closing tag. > "bob" wrote: Looks like the Javascript is wrong, try this:> Hi, thanks for replying. > I get now the java-error: ; expected jv = "<script type='text/javascript' language='javascript'>" & Environment.NewLine & _ " alert('Thanks, data are in')" & Environment.NewLine & _ "</scr" & "ipt>" Thanks, but still javascript error (expected ;)
Show quoteHide quote "Leon Mayne" <LeonMa***@discussions.microsoft.com> schreef in bericht news:A8626523-85A3-4F5F-9344-DCA8EF51F1C6@microsoft.com... > "bob" wrote: >> Hi, thanks for replying. >> I get now the java-error: ; expected > > Looks like the Javascript is wrong, try this: > > jv = "<script type='text/javascript' language='javascript'>" & > Environment.NewLine & _ > " alert('Thanks, data are in')" & Environment.NewLine & _ > "</scr" & "ipt>" > > "bob" wrote: Works OK for me. Do you have any other scripts on the page? Could you do a > Thanks, but still javascript error (expected ;) 'View source' in IE when you get the error and post the complete <script> section that's causing the problem?
Need a tip: How do you streamwrite from two different db tables?
Recognizing if SQL Server is installed (and what version) Q: Advice on threads On Error Goto Next Loop How to simulate Application.DoEvents in a DLL open source .NET search engine? Bootstrapping .NET 2.0 Dispose problem/crash with maximized MDI child windows need help!! VB2005 - Split Files |
|||||||||||||||||||||||