Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7556631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:54:28+00:00 2026-05-30T11:54:28+00:00

Sorry I could not find the appropriate title Here is my problem I am

  • 0

Sorry I could not find the appropriate title

Here is my problem

I am using a method which returns a string value like hh:mm(12:45)
this method is named as DeliveryTimeCalc()

I am using a jQuery timepicker to take input on my aspx page
this timepicker has to be validated by mintime
the minimum time should be the value returned by the method DeliveryTimeCalc()
this serverside method has to be called during the jQuery is initialized
so I did the below method

<script type="text/javascript">
    $(document).ready(function () {
        //window.onload = pageMethodConcept.callServerSideMethod;
        var time = pageMethodConcept.callServerSideMethod;
        alert(time);
        var hm = time.split(':');
        var h = hm[0]; var m = hm[1];
        $("#tb_DeliveryTime").timepicker({ showPeriodLabels: false,
            onHourShow: OnHourShowCallback,
            onMinuteShow: OnMinuteShowCallback
        });
        function OnHourShowCallback(hour) {

            if ((hour < h)) {
                return false; // not valid
            }
            return true; // valid
        }
        function OnMinuteShowCallback(hour, minute) {
            if ((hour == h) && (minute <= m)) { return false; } // not valid
            return true;  // valid
        }
    });
</script>
<script language="javascript" type="text/javascript">
pageMethodConcept = {
    callServerSideMethod: function () {
         PageMethods.DeliveryTimeCalc(pageMethodConcept.callback);
    },
    callback: function (result) {
        alert(result);
        //return result;
        }
    }
    //window.onload = pageMethodConcept.callServerSideMethod;
</script>

but the problem is that it is not returning the value (hh:mm)
I am getting a alert box which contains output like

function () {
    PageMethods.DeliveryTimeCalc(pageMethodConcept.callback);
}

even if I use return I am getting the same value

but if I use

window.onload = pageMethodConcept.callServerSideMethod;

I am getting a alert box which contains output like hh:mm

Please Help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:54:29+00:00Added an answer on May 30, 2026 at 11:54 am

    Thank you guys for helping
    but i have found the solution myself

    Sol 1
    Using Web Services

    http://markitup.com/WebServices/TimeZones.asmx?op=CurrentDateTime

    this is a web service in which we have to enter the name of the time zone
    Ex:(India Standard Time)

    Sol 2

    Write a method in the pageload and in that method write your code.
    When you have to return the result
    place the result in a labe text and make the visibility of the label to false
    (Note: You can not find the label in javascript if the visibility is set to false
    So do this instead of making visibility false. style=”display: none;” this does the same
    but in JavaScript you can find the label)
    you can find the label in javascript by using

    var time = $("#lbl_time").text();
    

    Since we coded the jquery as $(document).ready(function () the jquery will be executed only after the page load is executed

    So Problem Solved

    Thank You

    -Krishna Thota

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sorry I could not think of a better title. The problem is the
sorry if dumb but could not find an answer. #include <iostream> using namespace std;
Sorry i could not find a proper title to this question. I have generated
Sorry if this has been answered already, but I could not find an appropriate
Sorry for the slightly rubbish title. I could not think how to describe this
Sorry I could not find this. $('div#loader').slideDown(fast).delay(1.5); Does not word as expected, I want
I am sorry to ask this trivial question but I could not find a
Sorry for not included any example data for my problem. I couldn’t find a
Sorry if this has been discussed somewhere else on stackoverflow (I could not find
I'm sorry to ask such a basic question but I could not find a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.