467,161 Members | 989 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

Javascript to populate controls without postback

I've got a web form (asp.net 1.1, vb.net) that has controls for a user
to enter their height and weight in either English or Metric units. I'd
like to be able to populate the metric control when the English changes
as well as the converse.
I have used javascript previously to do little things like blank out a
password field when it's clicked on or raise an alert when a button is
clicked by using Control.Attributes.Add().
Now I'd like to have one control's event populate another control and
I'm not sure how to do that.

Anyone got any suggestions or better yet, examples of this kind of stuff
I can look at?

Thanks!

Matt
Nov 20 '05 #1
  • viewed: 1175
Share:
2 Replies
asp.net 1.1 controls don't have builtin support for client script. you have
to look at the html rendered and then determine how to hook events or change
values. this is improved in version 2.0

if you don't know the browser dom, you should buy a book.

-- bruce (sqlwork.com)

"MattB" <so********@yahoo.com> wrote in message
news:3u************@individual.net...
I've got a web form (asp.net 1.1, vb.net) that has controls for a user to
enter their height and weight in either English or Metric units. I'd like
to be able to populate the metric control when the English changes as well
as the converse.
I have used javascript previously to do little things like blank out a
password field when it's clicked on or raise an alert when a button is
clicked by using Control.Attributes.Add().
Now I'd like to have one control's event populate another control and I'm
not sure how to do that.

Anyone got any suggestions or better yet, examples of this kind of stuff I
can look at?

Thanks!

Matt

Nov 20 '05 #2
The onBlur event is used to call a JavaScript function when a control has
lost its focus.

ControlName.Attribute.Add("onBlur", "unitConversion(param)");

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/


"MattB" <so********@yahoo.com> wrote in message
news:3u************@individual.net...
I've got a web form (asp.net 1.1, vb.net) that has controls for a user to
enter their height and weight in either English or Metric units. I'd like
to be able to populate the metric control when the English changes as well
as the converse.
I have used javascript previously to do little things like blank out a
password field when it's clicked on or raise an alert when a button is
clicked by using Control.Attributes.Add().
Now I'd like to have one control's event populate another control and I'm
not sure how to do that.

Anyone got any suggestions or better yet, examples of this kind of stuff I
can look at?

Thanks!

Matt

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Mark Fox | last post: by
21 posts views Thread by Martin Eyles | last post: by
3 posts views Thread by jeroen.bolle@gmail.com | last post: by
4 posts views Thread by Peter | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.