Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > Software > How to assign a returns value of a javascript function to a hiddenfield in a webpart

Reply
Thread Tools

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

 
 
Chander Chander is offline
Junior Member
Join Date: Dec 2007
Posts: 1
 
      12-20-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
.NET 1.1 WebPart to .NET 2.0 WebPart anars ASP .Net 0 01-07-2007 07:31 PM
Need help getting the value in a HiddenField! Jeff ASP .Net 3 10-18-2006 04:25 PM
HiddenField value not valid sklett ASP .Net 3 10-13-2006 06:53 AM
is the value passed via HiddenField to client-side always string? André ASP .Net 2 06-17-2006 07:37 PM



Advertisments