Results 1 to 2 of 2

Thread: How to put autopostback property true/false using javascript?

  1. #1
    Join Date
    Feb 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow How to put autopostback property true/false using javascript?

    Hi all,
    Code:
    i want code for "How to put autopostback property true/false using javascript".

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Since your question is general, so is this answer:

    Code:
    object.autopostback = some_condition
    where object is some object that you want to set the autopostback property for and some_condition is either true or false or a statement which evaluates to either true or false depending upon current factors in the flow of the script.

    However:

    http://msdn.microsoft.com/en-us/libr...opostback.aspx

    states that there is no code for this in javascript (jscript is MS speak for javascript).

    But you could try it. You should probably use the formal form:

    AutoPostBack

    though. Perhaps something like:

    Code:
    <input id="mytextbox" type="text" name="whatever">
    <script type="text/javascript">
    document.getElementById('mytextbox').AutoPostBack = true;
    </script>
    But, as I say, it's an ASP.NET thing. If you're using ASP.NET, why not use the code for this as described for ASP.NET or Visual Basic?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •