Thomas Hansen said:
HI,
Im on dotnet 1.1
I've generated extra checkboxes, textboxes via client side javascript:
eg:
var inputElement = document.createElement('input');
inputElement.setAttribute('type', 'radio');...
inputElement.setAttribute('id', 'xx');
...
How do i capture these values via server side?
var el = document.createElement('input');
el.type='hidden';
el.value = someValue;
el.id='myEl';
theForm.appendChild(el);
...!
Then you can do (server side) stuff like:
string tmp = Request.Params['myEl'];
But in general terms you really shouldn't DO this...!!
Thomas
----- Original Message -----
From: "Thomas Hansen" <
[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
Sent: Thursday, March 29, 2007 2:36
Subject: Re: how to grab values from javascript generated items?
HI,
Im on dotnet 1.1
I've generated extra checkboxes, textboxes via client side javascript:
eg:
var inputElement = document.createElement('input');
inputElement.setAttribute('type', 'radio');...
inputElement.setAttribute('id', 'xx');
...
How do i capture these values via server side?
var el = document.createElement('input');
el.type='hidden';
el.value = someValue;
el.id='myEl';
theForm.appendChild(el);
...!
Then you can do (server side) stuff like:
string tmp = Request.Params['myEl'];
But in general terms you really shouldn't DO this...!!
Thomas
Hi Thomas,
Thanks for the reply.
May I know why not? Sometimes they may be instances which we may have to
generate extra table rows or mayb extra textboxes on the fly.
Im curious whether dotnet catered for these situations and perhaps there's a
nice built in widget to do the validations for these on the fly controls! =)