Updating textboxes without the OnLoad?

Updating textboxes without the OnLoad?

am 08.10.2004 10:27:42 von Astra

Hi All

I have a quandary.

I have 3 INPUT textboxes.

1 text box has a number auto-entered into it via an ASP lookup.

When the user changes this text box value a Javascript function puts a
different exchange rate value into the other 2 textboxes, eg:

If text box 1 has a value of 10 entered in it then text box 2 will have a
value of 20 put in it and text box 3 will have a value of 30 put in it.
Exchange rates being 2.00 and 3.00 respectively.

This works fine if the user goes in an changes the value, but from the start
textbox 2 and 3 have no value.

I know this may sound strange, but the way that I have structured my ASP
page means that I can't really use an OnLoad call in the Body of my page
because the same page shows 5 different forms depending on the stage the
user is at.

What would be nice is if I could call the script when say the textbox 2 and
3 are loaded.

Any ideas how to get round this?

Thanks

Robbie

Re: Updating textboxes without the OnLoad?

am 08.10.2004 18:14:16 von joker

Since this is a JavaScript question please read the following link as it
is way off topic in the "microsoft.public.inetserver.asp.db" newsgroup
as we only deal with server side code.

http://www.aspfaq.com/etiquette.asp?id=5001

Your other option is to have the ASP script to calculate these values as
well & insert the values into the text box.

Astra wrote:

> Hi All
>
> I have a quandary.
>
> I have 3 INPUT textboxes.
>
> 1 text box has a number auto-entered into it via an ASP lookup.
>
> When the user changes this text box value a Javascript function puts a
> different exchange rate value into the other 2 textboxes, eg:
>
> If text box 1 has a value of 10 entered in it then text box 2 will have a
> value of 20 put in it and text box 3 will have a value of 30 put in it.
> Exchange rates being 2.00 and 3.00 respectively.
>
> This works fine if the user goes in an changes the value, but from the start
> textbox 2 and 3 have no value.
>
> I know this may sound strange, but the way that I have structured my ASP
> page means that I can't really use an OnLoad call in the Body of my page
> because the same page shows 5 different forms depending on the stage the
> user is at.
>
> What would be nice is if I could call the script when say the textbox 2 and
> 3 are loaded.
>
> Any ideas how to get round this?
>
> Thanks
>
> Robbie
>
>

--
Please do not contact me directly or ask me to contact you directly for
assistance.

If your question is worth asking, it's worth posting.

If itÂ’s not worth posting you should have done a search on
http://www.google.com/ http://www.google.com/grphp?hl=en&tab=wg&q= or
http://news.google.com/froogle?hl=en&tab=nf&ned=us&q= before wasting our
time.