Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 17th, 2004, 01:31 PM
Authorized User
 
Join Date: Nov 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Alert() is not displayed to some users

I have a client-side javascript function, I'm using for some validation. The problem is it works, but not for all the users, some users don't get the message.
How this can happen? If javascript is disabled on their computers, they are not able to run the whole application...
Still I think this happened because of their browser settings or similar...
Any suggestions?
Thanks to all,
Sofya

 
Old November 17th, 2004, 01:36 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Can you post the code and specify which browser (including version) and operating system that the code doesn't work on?

 
Old November 17th, 2004, 02:46 PM
Authorized User
 
Join Date: Nov 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

We only use IE in our agency. One of the users who didn't get the alert message had: version 6.0.2800.1106, which I belive the latest, so browser itself is not a problem.
Here is a code (part of a bigger function):
Attendance check/message does not work.
'this function validate and submit data to iframe to processing
function processWorkSheet(workname)
    {
    var tscomplete
    var getapproval
    var attcomplete

    tscomplete=document.all.TimeSheetComplete.value
    attcomplete=document.all.AttendanceComplete.value

    //check timesheet & attendance completness
    if (workname=="approve")
        {
        if(attcomplete=='true')// exempt or non-exempt filled out attendance sheet
            {
            if (tscomplete=='false')// timesheet not complete
                {
                if (confirm("Timesheet was not completed for the whole period, for some day(s) there was no hours entered\nor total of the entered hours was less than regular number of hours per day.\n\nPlease click 'OK' if you would like to approve it anyway, otherwise click 'Cancel' to leave it unapproved."))
                    {
                    getapproval=true; //approve anyway
                    }
                else
                    {
                    getapproval=false;
                    }
                }
            }
        else // attendance sheet wasn't filled out
            {
            alert("There are no attendance hours for this timesheet.\nTimesheet can't be approved!\n\nPlease note:\nThe default hours you see on the attendance screen\nare displayed just for the easy reference,\nthey are not saved in the system.")
            getapproval=false;
            }
        }
.................................................. some other code
            document.forms[0].submit();
        }
    }



 
Old November 17th, 2004, 04:06 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Try alerting the workname at the top of the function.

--

Joe (Microsoft MVP - XML)
 
Old November 17th, 2004, 05:12 PM
Authorized User
 
Join Date: Nov 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The problem is: our users located all over the world (Kenya, Thailand, Bolivia...) and as I said function is working fine on my computer, but I can not test it on their machines...
I think I need to figure out what setting on their end caused this...
Any suggestions?

 
Old November 17th, 2004, 05:55 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Well it's hard to say without seeing what might be in the values you are testing against. Could it be you are testing against values, such as "true" that have been localised?



--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
custom alert kanoorani Javascript 1 May 5th, 2007 02:46 AM
Email Alert Louisa .NET Framework 1.x 1 December 22nd, 2005 01:15 AM
alert darkhalf Javascript 3 November 18th, 2005 12:56 PM
alert collie Javascript 2 December 29th, 2003 02:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.