473,800 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript alert message problem

Hello.

I'm developing and testing a web application using VS.NET 2003, VB, .NET
Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2
computer. I'm using a web form.

Using this line of code works great. It displays a little message box with
the alert message in it.

Me.btnGetArchiv edTrips.Attribu tes.Add("onMous eOver", "alert('mou se over')")

But how do i get it to display the alert message without doing a mouse over,
just trying to put it into an if statement ?

If Calendar1.Selec tedDate Me.Calendar2.Se lectedDate) Then
alert('mouse over')")
End If

Thanks,
Tony
Oct 4 '06
22 2329
Hi,

[crossposting removed, reply posted to
microsoft.publi c.dotnet.framew ork.aspnet only]

Tony Girgenti wrote:
Wow. That's great. Thanks to you and Damien for your code.

I need to learn more about scripting, but i'm confused about all the
scripting terminology. When i do searches for javascript, i always seem to
get returns that involve VBscript, Jscript, javascript, client-side scripts,
HTML etc.

What is it that i should be looking for ? and should i be looking for a
particular version ? Is what you did for me called "javascript " ?
You should be looking for "client-side javascript". JScript is
Microsoft's implementation (running in IE), so there are chances that
these examples also run on Firefox. However, there are differences in
the implementation. ECMAScript is the specification. As for VBScript,
it's Visual Basic Script, quite similar to VBA but running in IE only. I
don't recommend learning it, you can do pretty much everything in
JavaScript anyway, and it's cross browser compatible.

Also, the second line of the HTML code for my web page is "<!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">". Does that mean the HTML
version is 4.0 ?
Actually, it's a directive for the browser to select the parser engine.
In that case, it's HTML 4.0 *transitional*, which is a step towards
XHTML. Using this doctype, you won't see many changes with standard HTML
4.0. I would actually recommend XHTML 1.0 transitional, which is a
bigger step towards XHTML, and is very well supported by Visual Studio
(integrated validators). To select the validator you want (which checks
as you type), right click in an ASPX page, select "Formatting and
Validation", and then "Validation ". There you can choose the validator
you want to use.
Any help would be gratefully appreciated.

Thanks again,
Tony
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 9 '06 #11
Hello Laurent.

So i should basically stay with client-side javascript for my learning
purposes.

Also, i don't see the "Formatting and Validation" option on the right-click
menu. I'm using ASP 1.1 and VS.NET 2003. Should i see it there ?

Thanks,
Tony

"Laurent Bugnion" <ga*********@bl uewin.chwrote in message
news:uQ******** *****@TK2MSFTNG P03.phx.gbl...
Hi,

[crossposting removed, reply posted to
microsoft.publi c.dotnet.framew ork.aspnet only]

Tony Girgenti wrote:
>Wow. That's great. Thanks to you and Damien for your code.

I need to learn more about scripting, but i'm confused about all the
scripting terminology. When i do searches for javascript, i always seem
to get returns that involve VBscript, Jscript, javascript, client-side
scripts, HTML etc.

What is it that i should be looking for ? and should i be looking for a
particular version ? Is what you did for me called "javascript " ?

You should be looking for "client-side javascript". JScript is Microsoft's
implementation (running in IE), so there are chances that these examples
also run on Firefox. However, there are differences in the implementation.
ECMAScript is the specification. As for VBScript, it's Visual Basic
Script, quite similar to VBA but running in IE only. I don't recommend
learning it, you can do pretty much everything in JavaScript anyway, and
it's cross browser compatible.

>Also, the second line of the HTML code for my web page is "<!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">". Does that mean the
HTML version is 4.0 ?

Actually, it's a directive for the browser to select the parser engine. In
that case, it's HTML 4.0 *transitional*, which is a step towards XHTML.
Using this doctype, you won't see many changes with standard HTML 4.0. I
would actually recommend XHTML 1.0 transitional, which is a bigger step
towards XHTML, and is very well supported by Visual Studio (integrated
validators). To select the validator you want (which checks as you type),
right click in an ASPX page, select "Formatting and Validation", and then
"Validation ". There you can choose the validator you want to use.
>Any help would be gratefully appreciated.

Thanks again,
Tony

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch

Oct 9 '06 #12
Hi,

Tony Girgenti wrote:
Hello Laurent.

So i should basically stay with client-side javascript for my learning
purposes.
That's my recommendation, yes.

Also, the official JavaScript newsgroup is comp.lang.javas cript, which
especially (but not exclusively) deals with client-side javascript
related questions.

Also, i don't see the "Formatting and Validation" option on the right-click
menu. I'm using ASP 1.1 and VS.NET 2003. Should i see it there ?
Unfortunately, no. It's a new feature in VS2005 (amongst many other
improvements)
>
Thanks,
Tony
My pleasure,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 10 '06 #13
Hi Tony,
I need to learn more about scripting, but i'm confused about all the
scripting terminology. When i do searches for javascript, i always seem
to get returns that involve VBscript, Jscript, javascript, client-side
scripts, HTML etc.
Forget all about VBScript, JScript... if you are looking to work with
them on client side -- you are tied to IE. Firefox is the recipe-of-the-day.
What is it that i should be looking for ? and should i be looking for a
particular version ? Is what you did for me called "javascript " ?
If I recall correctly, Javascript 1.6 is the latest... albeit 1.2+
should be good enough for quite a few practical purposes.
Also, the second line of the HTML code for my web page is "<!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">". Does that mean the HTML
version is 4.0 ?
HTML 4.0 "Transition al" meaning that somethings like "<br>", "<img>" etc
will go without warnings where in XHTML mode it has to be "<br />", "<img
.... />".

I would suggest you to have a look into the topic of "XML", "DTD" and
"XSD" and then also look into "HTML" and "its DTD".

For advanced processing on client-side, additional topics would be
Javascript, DOM Level 3 API.

All of this is available on www.w3.org. This spectrum will give you a
complete understanding of the "web applications", how they function, what
all things you should take care of / note of etc when designing the "server
side" and the "client side" of your application.
Any help would be gratefully appreciated.
Hope that helps!
Thanks again,
Most welcome!
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------
Oct 10 '06 #14
Hi,

Gaurav Vaish (www.EdujiniOnline.com) wrote:
Hi Tony,
Forget all about VBScript, JScript... if you are looking to work with
them on client side -- you are tied to IE. Firefox is the recipe-of-the-day.
Firefox still represents a minority of the browsers, and with the
release of IE7, I think it will worsen Firefox's ratings. I personally
like Firefox (mostly for tabbed browsing), but that will be available in
IE too.

Anyway, I will always recommend writing standard JavaScript, so that it
works reasonably in all newer browsers. This is possible without major
efforts, once you mastered the learning curve. JavaScript and the DOM
are now standard enough that this shouldn't cause big problems. In that
sense, I find reasonable to recommend JavaScript (i.e. Netscape's
implementation) and JScript (i.e Microsoft's implementation) , which are
anyway almost the same.

Also, using feature detection instead of browser detection is alwaysa
good idea to increase compatibility, and degrade gracefully when a
feature is not available.

if ( document.getEle mentById )
{
document.getEle mentById( "myId" ).value = "...";
}
else
{
// Inform user or use another way.
}

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 10 '06 #15
Thanks to Gaurav and Laurent for their replies. I have a lot of learning to
do.

Tony

"Laurent Bugnion" <ga*********@bl uewin.chwrote in message
news:u%******** ********@TK2MSF TNGP03.phx.gbl. ..
Hi,

Gaurav Vaish (www.EdujiniOnline.com) wrote:
>Hi Tony,
> Forget all about VBScript, JScript... if you are looking to work with
them on client side -- you are tied to IE. Firefox is the
recipe-of-the-day.

Firefox still represents a minority of the browsers, and with the release
of IE7, I think it will worsen Firefox's ratings. I personally like
Firefox (mostly for tabbed browsing), but that will be available in IE
too.

Anyway, I will always recommend writing standard JavaScript, so that it
works reasonably in all newer browsers. This is possible without major
efforts, once you mastered the learning curve. JavaScript and the DOM are
now standard enough that this shouldn't cause big problems. In that sense,
I find reasonable to recommend JavaScript (i.e. Netscape's implementation)
and JScript (i.e Microsoft's implementation) , which are anyway almost the
same.

Also, using feature detection instead of browser detection is alwaysa good
idea to increase compatibility, and degrade gracefully when a feature is
not available.

if ( document.getEle mentById )
{
document.getEle mentById( "myId" ).value = "...";
}
else
{
// Inform user or use another way.
}

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch

Oct 10 '06 #16
Gaurav.

One thing i don't understand is "Forget all about VBScript, JScript". If
JScript is Microsoft's implementation of JavaScript and i am using VS.NET
2003, then why not use JScript ?

I'm sure you have a good reason, but i am puzzled by that.

Thanks,
Tony

"Gaurav Vaish (www.EdujiniOnl ine.com)"
<ga************ *****@nospam.gm ail.comwrote in message
news:OT******** ******@TK2MSFTN GP02.phx.gbl...
Hi Tony,
>I need to learn more about scripting, but i'm confused about all the
scripting terminology. When i do searches for javascript, i always seem
to get returns that involve VBscript, Jscript, javascript, client-side
scripts, HTML etc.

Forget all about VBScript, JScript... if you are looking to work with
them on client side -- you are tied to IE. Firefox is the
recipe-of-the-day.
>What is it that i should be looking for ? and should i be looking for a
particular version ? Is what you did for me called "javascript " ?

If I recall correctly, Javascript 1.6 is the latest... albeit 1.2+
should be good enough for quite a few practical purposes.
>Also, the second line of the HTML code for my web page is "<!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">". Does that mean the
HTML version is 4.0 ?

HTML 4.0 "Transition al" meaning that somethings like "<br>", "<img>"
etc will go without warnings where in XHTML mode it has to be "<br />",
"<img ... />".

I would suggest you to have a look into the topic of "XML", "DTD" and
"XSD" and then also look into "HTML" and "its DTD".

For advanced processing on client-side, additional topics would be
Javascript, DOM Level 3 API.

All of this is available on www.w3.org. This spectrum will give you a
complete understanding of the "web applications", how they function, what
all things you should take care of / note of etc when designing the
"server side" and the "client side" of your application.
>Any help would be gratefully appreciated.

Hope that helps!
>Thanks again,

Most welcome!
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------


Oct 10 '06 #17
Hi,

Tony Girgenti wrote:
Gaurav.

One thing i don't understand is "Forget all about VBScript, JScript". If
JScript is Microsoft's implementation of JavaScript and i am using VS.NET
2003, then why not use JScript ?

I'm sure you have a good reason, but i am puzzled by that.

Thanks,
Tony
I agree. See my post in the same thread. Better learn and program
against standards, instead of concentrating on one browser only,
whichever that is.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Oct 10 '06 #18
I agree. See my post in the same thread. Better learn and program against
standards, instead of concentrating on one browser only, whichever that
is.
Laurent said it all... reach out to as many people as you can.
"Why not bother" about millions of users that work with Firefox, or Safari
(kinda defacto on Mac from Tiger onwards). Note that MSIE does not work
identically on Windows and Mac.

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------
Oct 10 '06 #19
Firefox still represents a minority of the browsers, and with the release
of IE7, I think it will worsen Firefox's ratings. I personally like
Firefox (mostly for tabbed browsing), but that will be available in IE
too.
Two things:
1. I still won't leave that "millions of users" audience
2. Firefox is anyway more secure as compared to IE. Well, at least I have
more faith in it :-)
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------
Oct 10 '06 #20

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

Similar topics

7
2827
by: NewbieJon | last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script) My code is below. I am getting the following error "MyForm.oNetwork.Value is Null or is not an object". I'm struggling to diagnose what to do next. I'd very much appreciate some help Many thanks <HTML><BODY><FORM NAME="MyForm"...
14
5486
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net that works well as an html page. It brings up a modal popup window that I have been trying to work out for days now and this was the closest I have been able to come. I added a little asp.net code and an asp.net button and cannot get it to
3
2020
by: dgmoore | last post by:
Hello - I'm having trouble with JavaScript alerts in an imagemap. The mapped areas are cells in a table, and the alerts display info related to the cell that is clicked. The problem is that, even though the source html is correct, the alert messages that are displayed appear to be random, i.e., the alert for row 10 appears when row 3 is clicked, etc. On some long tables, the same alert message is displayed for (nearly) every row even...
7
1686
by: e | last post by:
I've been having an extremely difficult time finding an answer to this in IE / js groups, so I thought I'd try here. I've got an aspx page that delivers loads of report data into custom-named <span> tags on the client, hidden from the screen by @media classes. From a dynamically built menu of what was returned, the user selects wich report they want to view/print and a little jscript .innerHTML magic happens under the hood that copies...
6
1577
by: Steve B. | last post by:
Hello everybody In a webpage, I use JS display data from an xml file and a xsl file: var data = new ActiveXObject("Microsoft.XMLDOM"); data.async = false; var dataUrl = "data.aspx"; data.load(dataUrl) ; var transform = new ActiveXObject("Microsoft.XMLDOM"); transform.async = false ;
9
4924
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work fine from a link. The button does bring up the popup window, but when I press the links on the page, it doesn't return or close the window. ****************************************************************************
8
2610
by: Frank | last post by:
Hi, I am working with VS.NET 2005 Ultimately, I wish to call a JavaScript function from a .js file
2
2185
by: verci | last post by:
Hi guys, sorry if this seems stupid but I'm a newbie, I'm running Windows XP Pro SP2, IE 7, VS2005, ASP.net 2.0 The problem is that I'm trying to display this news scroller made in a Javascript file(newsscroller.js) in my ASP page, everything works great in a normal HTML page, I can see the scroller just fine, but in an ASP page it just does not show, I get some error message that the control has not been initialize, so far I've been...
16
1921
by: Tony Girgenti | last post by:
Hello. I just finished reading two articles about javascript here: http://msdn2.microsoft.com/en-us/library/bb332123(VS.80).aspx I tried some javascript testing in VS2005, SP1, VB , .NET 2.0, ASP.NET 2.0 on WIN XP Pro, SP2. It's real simple. I put a button on a page and coded the onClick in it like this:
9
2222
by: Matthew Wells | last post by:
OK, I've narrowed down the problem. This works when in the aspx page <script type="text/javascript" > function btnFirst_Click() { alert("Hello"); alert(document.getElementById("<%=LBFacilities.ClientID%>").options.length); return false; } </script>
0
9551
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10276
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10035
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9090
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7580
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6813
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.