How to assign a returns value of a javascript function to a hiddenfield in a webpart

Discussion in 'Software' started by Chander, Dec 20, 2007.

  1. Chander

    Chander

    Joined:
    Dec 20, 2007
    Messages:
    1
    Hi All!

    I have a simple javascript function:

    function Date()
    {
    var date = new Date();
    var hidden = document.GetElementById('"+ HiddenField.UniqueID +"');
    hidden.Value = date;
    doument.forms[0].submit();
    }

    The above code is able to locate the right hidden field declared in the "CreateChildControls" method.

    The problem is: The Hidden field does not store the value!

    Not sure if this is not support int he webparts development or I am missing on something?

    Any dieas?

    Thanks
    Chander, Dec 20, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. uv2003
    Replies:
    4
    Views:
    616
    =?Utf-8?B?U2Vhbg==?=
    Jun 23, 2005
  2. MS

    Javascript ?? IsDate Function

    MS, Feb 26, 2004, in forum: Computer Support
    Replies:
    1
    Views:
    9,712
  3. visj4u
    Replies:
    2
    Views:
    3,442
    iamafreak
    Apr 23, 2007
  4. Shane

    To Javascript, or not to Javascript

    Shane, Aug 29, 2005, in forum: NZ Computing
    Replies:
    5
    Views:
    432
    Waylon Kenning
    Aug 30, 2005
  5. Brendan Haddock
    Replies:
    0
    Views:
    1,602
    Brendan Haddock
    Jul 1, 2008
Loading...

Share This Page