|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Merging Java and VB for alert boxJavascript. I need a java alert box that contains text that eventually will come from an sql table. The alert box should activate when the user clicks on text or a button (or something similar). The test code below will do most of what I need (I didn't include the code to retrive from the table for simplicity). Since I don't know much java, I'm attempting to do as much of this as easily as possible in an aspx.vb codebehind file rather than attempting to figure out how to directly embed the java on the page. The only problem is that I don't want the Button to post back, and asp button postbacks can't seem to be disabled. What is the easy alternative? An HTML button apparently requires me to use code with which I'm not yet familiar to alter the alter text. Is there some other way to do what I want? Dim a As String = "testing popup" Dim code As New StringBuilder code.Append("alert('") code.Append(a) code.Append("')") BtnInfo.OnClientClick = (code.ToString) Thanks in advance Jeff You might want to post this to microsoft.public.dotnet.framework.aspnet.
Robin S. -------------------------------------- Show quoteHide quote "Jeff" <n***@none.com> wrote in message news:457aefad$0$15504$88260bb3@free.teranews.com... > > I am new to VB.net 2005 in visual web developer, and even newer to > Javascript. > > I need a java alert box that contains text that eventually will come > from an sql table. > The alert box should activate when the user clicks on text or a button > (or something similar). > The test code below will do most of what I need (I didn't include the > code to retrive from the table for simplicity). > Since I don't know much java, I'm attempting to do as much of this as > easily as possible in an aspx.vb codebehind file rather than > attempting to figure out how to directly embed the java on the page. > > The only problem is that I don't want the Button to post back, and asp > button postbacks can't seem to be disabled. > What is the easy alternative? An HTML button apparently requires me > to use code with which I'm not yet familiar to alter the alter text. > Is there some other way to do what I want? > > > Dim a As String = "testing popup" > Dim code As New StringBuilder > code.Append("alert('") > code.Append(a) > code.Append("')") > BtnInfo.OnClientClick = (code.ToString) > > Thanks in advance > > Jeff > > -- > Posted via a free Usenet account from http://www.teranews.com > Why?
Show quoteHide quote "RobinS" <RobinS@NoSpam.yah.none> schreef in bericht news:n4CdnewtBI1cmebYnZ2dnUVZ_hm3nZ2d@comcast.com... > You might want to post this to microsoft.public.dotnet.framework.aspnet. > > Robin S. > -------------------------------------- > "Jeff" <n***@none.com> wrote in message > news:457aefad$0$15504$88260bb3@free.teranews.com... >> >> I am new to VB.net 2005 in visual web developer, and even newer to >> Javascript. >> >> I need a java alert box that contains text that eventually will come from >> an sql table. >> The alert box should activate when the user clicks on text or a button >> (or something similar). >> The test code below will do most of what I need (I didn't include the >> code to retrive from the table for simplicity). >> Since I don't know much java, I'm attempting to do as much of this as >> easily as possible in an aspx.vb codebehind file rather than attempting >> to figure out how to directly embed the java on the page. >> >> The only problem is that I don't want the Button to post back, and asp >> button postbacks can't seem to be disabled. >> What is the easy alternative? An HTML button apparently requires me to >> use code with which I'm not yet familiar to alter the alter text. Is >> there some other way to do what I want? >> >> >> Dim a As String = "testing popup" >> Dim code As New StringBuilder >> code.Append("alert('") >> code.Append(a) >> code.Append("')") >> BtnInfo.OnClientClick = (code.ToString) >> >> Thanks in advance >> >> Jeff >> >> -- >> Posted via a free Usenet account from http://www.teranews.com >> > > I guess I thought it was an ASP.Net question.
Robin S. --------------------------- Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:uJAXVU8GHHA.2464@TK2MSFTNGP06.phx.gbl... > Why? > > > "RobinS" <RobinS@NoSpam.yah.none> schreef in bericht > news:n4CdnewtBI1cmebYnZ2dnUVZ_hm3nZ2d@comcast.com... >> You might want to post this to >> microsoft.public.dotnet.framework.aspnet. >> >> Robin S. >> -------------------------------------- >> "Jeff" <n***@none.com> wrote in message >> news:457aefad$0$15504$88260bb3@free.teranews.com... >>> >>> I am new to VB.net 2005 in visual web developer, and even newer to >>> Javascript. >>> >>> I need a java alert box that contains text that eventually will come >>> from an sql table. >>> The alert box should activate when the user clicks on text or a >>> button (or something similar). >>> The test code below will do most of what I need (I didn't include >>> the code to retrive from the table for simplicity). >>> Since I don't know much java, I'm attempting to do as much of this >>> as easily as possible in an aspx.vb codebehind file rather than >>> attempting to figure out how to directly embed the java on the page. >>> >>> The only problem is that I don't want the Button to post back, and >>> asp button postbacks can't seem to be disabled. >>> What is the easy alternative? An HTML button apparently requires me >>> to use code with which I'm not yet familiar to alter the alter text. >>> Is there some other way to do what I want? >>> >>> >>> Dim a As String = "testing popup" >>> Dim code As New StringBuilder >>> code.Append("alert('") >>> code.Append(a) >>> code.Append("')") >>> BtnInfo.OnClientClick = (code.ToString) >>> >>> Thanks in advance >>> >>> Jeff >>> >>> -- >>> Posted via a free Usenet account from http://www.teranews.com >>> >> >> > > But in ASP you can use VB.Net as well.
This is not direct an installation or whatever question, it is in my idea about using the VB.net language. Cor Show quoteHide quote "RobinS" <RobinS@NoSpam.yah.none> schreef in bericht news:oYKdnWXxBfAxhObYnZ2dnUVZ_u63nZ2d@comcast.com... >I guess I thought it was an ASP.Net question. > > Robin S. Okay, fair enough. I'll follow your guidelines.
Robin S. ----------------------------------- Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:ufipCuCHHHA.3660@TK2MSFTNGP05.phx.gbl... > But in ASP you can use VB.Net as well. > This is not direct an installation or whatever question, it is in my > idea about using the VB.net language. > > Cor > > "RobinS" <RobinS@NoSpam.yah.none> schreef in bericht > news:oYKdnWXxBfAxhObYnZ2dnUVZ_u63nZ2d@comcast.com... >>I guess I thought it was an ASP.Net question. >> >> Robin S. > > Jeff,
I have a sample from a html textbox that you can use. However do it in a VB.Net way. Just open a textbox on your page that you hide when you don't need it. Than a nice label below in the same way and your user will be much hapier than with such an ugly dialogbox. Cor Show quoteHide quote "Jeff" <n***@none.com> schreef in bericht news:457aefad$0$15504$88260bb3@free.teranews.com... > > I am new to VB.net 2005 in visual web developer, and even newer to > Javascript. > > I need a java alert box that contains text that eventually will come from > an sql table. > The alert box should activate when the user clicks on text or a button (or > something similar). > The test code below will do most of what I need (I didn't include the code > to retrive from the table for simplicity). > Since I don't know much java, I'm attempting to do as much of this as > easily as possible in an aspx.vb codebehind file rather than attempting to > figure out how to directly embed the java on the page. > > The only problem is that I don't want the Button to post back, and asp > button postbacks can't seem to be disabled. > What is the easy alternative? An HTML button apparently requires me to > use code with which I'm not yet familiar to alter the alter text. Is there > some other way to do what I want? > > > Dim a As String = "testing popup" > Dim code As New StringBuilder > code.Append("alert('") > code.Append(a) > code.Append("')") > BtnInfo.OnClientClick = (code.ToString) > > Thanks in advance > > Jeff > > -- > Posted via a free Usenet account from http://www.teranews.com > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message I thought of that and was trying that previously. The problem is that manynews:u9FfWV8GHHA.1252@TK2MSFTNGP02.phx.gbl... > Jeff, > > I have a sample from a html textbox that you can use. > > However do it in a VB.Net way. > > Just open a textbox on your page that you hide when you don't need it. > Than a nice label below in the same way and your user will be much hapier > than with such an ugly dialogbox. > > Cor of my users will be students working on an 800x600 monitor and there is a space issue with the other items on the page. If I put in the textbox, I had to toggle something else invisible to make things fit. I did more checking and found out that by adding the "return false" to the alert box code, that the postback could be disabled. Apparently the return false typically was designed for confirmation boxes, but it works for alert boxes also. So the below does what I want, although I wish there were a more elegant solution, similar to opening the texbox as you mentioned. I may keep messing with the cosmetics and figure out a better way. Dim code As New StringBuilder code.Append("alert('") code.Append(QuestionTableCopy.Item(0)("QuestionMore")) code.Append("');return false") BtnInfo.OnClientClick = (code.ToString)
Why I am sick of .Net
Need some help... destroying/releasing objects from memory? Threading Delegate Question Retrieve Hard Disk Serial Number or othe unique PC identifier - XP & 2K Error: The transport failed to connect to the server This code demonstrates a problem using a treeview twice How to get the registry key permission using RegistryRight in NET2.0? Looking for suggestions on how to do something slow form backimage load @ vb.net |
|||||||||||||||||||||||