CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Setting a textbox value according to the Onclick of the RadioButton

Print topic Send  topic

Author Message
NerishaB

Posts: 25
Posted: 09/27/2010, 7:02 AM

Hi there.

I have a form to allow the user to either send an email or an SMS to clients. If the user selects the "Email" radio button, then the clients email address needs to appear in the Textbox, textbox1. If the user selects "SMS", then the clients phone number needs to appear in textbox1. Now, I have the following code in the Client OnClick event:

thisForm = document.{HTMLFormName};
if (thisForm.RadioButton1.checked = true) {
thisForm.textbox1.value = DocEmail;
}else{
thisForm.textbox1.value = DocSMS;
}
result=true;

This does not seem to work though. Can anyone help me to fix this?
View profile  Send private message
CodeChargeMVP

Posts: 473
Posted: 09/27/2010, 7:32 AM

IŽd know to solve it using javascript.

I let you here the main example from

I learned and then i adapt to every single case.

The secret is to understand every object, how it works,

and of course how works with it .

http://forums.codecharge.com/posts.php?post_id=111778




Quote NerishaB:
Hi there.

I have a form to allow the user to either send an email or an SMS to clients. If the user selects the "Email" radio button, then the clients email address needs to appear in the Textbox, textbox1. If the user selects "SMS", then the clients phone number needs to appear in textbox1. Now, I have the following code in the Client OnClick event:

thisForm = document.{HTMLFormName};
if (thisForm.RadioButton1.checked = true) {
thisForm.textbox1.value = DocEmail;
}else{
thisForm.textbox1.value = DocSMS;
}
result=true;

This does not seem to work though. Can anyone help me to fix this?

_________________
Best Regards
Entrepeneur | NT Consultant
View profile  Send private message
raphaelbiz

Posts: 10
Posted: 09/27/2010, 12:11 PM

i resolve that to in js...
_________________
linuxell.serveftp.com
View profile  Send private message
NerishaB

Posts: 25
Posted: 09/27/2010, 11:34 PM

I'm new to this. Can you give me a more detailed example? Is the code I placed above not correct?
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.