Getting the validation summary message to display: help...

J

JJ_377

This works in Internet Explorer, but not in Netscape (8).
Note this script was borrowed from another posting.
Can anyone help? Thank you.

function ErrorMessage()
{
try
{
var validationSummaryMessage =
document.getElementById("vs_Summary").innerText;


if( validationSummaryMessage != null &&
validationSummaryMessage !=
"")
{
alert(validationSummaryMessage­);
}
}
catch(exception)
{
}



}
 
G

Grant Merwitz

i have a feeling the line you need to review is
document.getElementById("vs_Summary").innerText;

JavaScript differs slightly over all browser, and you might need to do a
check to see which type of client browser it is and modify your code
slightly.

I know a method to see if its a mozilla based brower versus IE

if(document.all)
{
//IE BROWSER
}
else
{
//MOZILLA BROWSER
}

So, google and find out the Netscape equivalent of:
document.getElementById("vs_Summary").innerText;
and the method to check for Netscape as well.

It will be worth it to make a page with just that line, and test it to see
if it works in netscape, and try modify it to get it too work.
I would try, but don't have netscape (and AM NOT INSTALLING IT :) )

HTH and Good Luck


This works in Internet Explorer, but not in Netscape (8).
Note this script was borrowed from another posting.
Can anyone help? Thank you.

function ErrorMessage()
{
try
{
var validationSummaryMessage =
document.getElementById("vs_Summary").innerText;


if( validationSummaryMessage != null &&
validationSummaryMessage !=
"")
{
alert(validationSummaryMessage­);
}
}
catch(exception)
{
}



}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top