473,395 Members | 1,613 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Merging Java and VB for alert box


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

Dec 9 '06 #1
7 2249
You might want to post this to microsoft.public.dotnet.framework.aspnet.

Robin S.
--------------------------------------
"Jeff" <no**@none.comwrote in message
news:45***********************@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

Dec 9 '06 #2
Why?
"RobinS" <Ro****@NoSpam.yah.noneschreef in bericht
news:n4******************************@comcast.com. ..
You might want to post this to microsoft.public.dotnet.framework.aspnet.

Robin S.
--------------------------------------
"Jeff" <no**@none.comwrote in message
news:45***********************@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


Dec 9 '06 #3
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

"Jeff" <no**@none.comschreef in bericht
news:45***********************@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

Dec 9 '06 #4

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:u9**************@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
I thought of that and was trying that previously. The problem is that many
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)("QuestionMor e"))
code.Append("');return false")
BtnInfo.OnClientClick = (code.ToString)

--
Posted via a free Usenet account from http://www.teranews.com

Dec 9 '06 #5
I guess I thought it was an ASP.Net question.

Robin S.
---------------------------
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:uJ**************@TK2MSFTNGP06.phx.gbl...
Why?
"RobinS" <Ro****@NoSpam.yah.noneschreef in bericht
news:n4******************************@comcast.com. ..
>You might want to post this to
microsoft.public.dotnet.framework.aspnet.

Robin S.
--------------------------------------
"Jeff" <no**@none.comwrote in message
news:45***********************@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



Dec 9 '06 #6
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" <Ro****@NoSpam.yah.noneschreef in bericht
news:oY******************************@comcast.com. ..
>I guess I thought it was an ASP.Net question.

Robin S.

Dec 10 '06 #7
Okay, fair enough. I'll follow your guidelines.

Robin S.
-----------------------------------
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:uf**************@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" <Ro****@NoSpam.yah.noneschreef in bericht
news:oY******************************@comcast.com. ..
>>I guess I thought it was an ASP.Net question.

Robin S.


Dec 10 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

55
by: Elijah | last post by:
I have read many of the topics on learning C++ or Java first. It seems like everyone says something different. I would like to know if I should learn C++ or Java. First a little about myself. I...
3
by: William Ahern | last post by:
I'm looking for resources on splitting and merging XML trees. Specifically, on methods to pare large XML documents into smaller documents which can be merged later. Off of the top of my head, I...
3
by: Steve W | last post by:
I've searched over and over again and have not been able to find a definitive answer. Basically, we have a heavily JavaScripted web site. What I was hoping to do was to start enhancing our site...
1
by: Jan Vinten | last post by:
Hello, I'm looking for a javascript, that can detect which java VM is installed and what the current version is. Can any of you give me some details? Best regards, Jan Denmark
4
by: Don Grover | last post by:
I hope some one can help, I have a html table that is created with asp that has a row of repeated buttons down the side. these call a page passing a query string with invoice number. I need to...
4
by: Dani Shapira | last post by:
Hi. can anyone help me with how to find if JAVA is evalible and if yes, of what version? Thanks Dani
4
by: aotemp | last post by:
Does anyone know how to detect the version of Java installed? My website has an application that requires java 1.5+ to be installed, basically if the user doesn;t already have it installed I...
0
by: ErikaW | last post by:
Hi all, I've tried to google this but could not find a clear solution. I have a Web application developed in JDevloper using mostly html and Javascript. I have a pre-defined PDF form which I merge...
2
by: josephx | last post by:
Hello, I got some of these errors listed below after executing an HTTP Post MIDlet on CLDC/MIDP platform, "Nokia S40 DP 2.0 SDK 1.1" and "S40 5th Edition SDK Feature Pack 1" and even for S60's...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.