Carlos
|
| Posted: 05/17/2004, 4:24 PM |
|
Hello,
I want to know if the text in a form button can be changed from a field in a
database or using an If...then
Something like.
If status = 1 Then
form.button1.value = "Send data"
Else
form.button1.value = "Send Mail"
End If
Thanks,
Carlos
|
|
|
 |
Don Safar
|
| Posted: 05/18/2004, 7:05 AM |
|
If you look in the component reference for button, the only runtime property
is the visible property. You could accomplish what you want by having two
buttons and making one of them visible at runtime.
"Carlos" <Carlos@forum.codecharge> wrote in message
news:640a949c5b07f8@news.codecharge.com...
> Hello,
>
> I want to know if the text in a form button can be changed from a field in
a
> database or using an If...then
> Something like.
>
> If status = 1 Then
> form.button1.value = "Send data"
> Else
> form.button1.value = "Send Mail"
> End If
>
> Thanks,
>
> Carlos
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Carlos
|
| Posted: 05/18/2004, 8:33 AM |
|

Hello,
What Im trying to do is a multi languaje system. So what Im doing is adding all labels to a DB (ie. in a form the labels: Name, Last Name, etc) and then bring them back with CCDLookUp, and so far is doing great, but when I get to the Buttons I cant add a label to make this "translation" from the DB.
I think IŽll also have the same problem with some other HTML areas, but if I can find a way to deal with this Button translation I think IŽll be able to do it.
Any Suggestions?
Carlos
|
|
|
 |
Oper
Posts: 1195
|
| Posted: 05/18/2004, 10:17 AM |
|
Like Don said:
For your first sample just create 2 Button
1 Button (Send Data)
2 Button (Send Mail)
and
if whatever
button1.visible=true
button2.visible=False
else
button1.visible=False
button2.visible=true
end if
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
Don Safar
|
| Posted: 05/19/2004, 9:02 AM |
|
It sounds like you need to use a link control then apply css to make it look
like a button. You can modify the URL and the text value of the link control
at runtime.
"Carlos" <Carlos@forum.codecharge> wrote in message
news:640aa2ce25f06b@news.codecharge.com...
> 
> Hello,
> What Im trying to do is a multi languaje system. So what Im doing is
adding all
> labels to a DB (ie. in a form the labels: Name, Last Name, etc) and then
bring
> them back with CCDLookUp, and so far is doing great, but when I get to the
> Buttons I cant add a label to make this "translation" from the DB.
>
> I think IŽll also have the same problem with some other HTML areas, but if
I
> can find a way to deal with this Button translation I think IŽll be able
to do
> it.
>
> Any Suggestions?
>
> Carlos
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Tony Do
|
| Posted: 05/19/2004, 8:19 PM |
|
You can use the set tag function
Now your button is
<Input type="submit" value="Search" name="DoSearch">
Change it to
<Input type="submit" value="{AVALUE}" name="DoSearch">
Then in the before show page event or before show record event
<code>
HTMLTemplate.SetVar "@AVALUE", "New button value"
</code>
"Carlos" <Carlos@forum.codecharge> wrote in message
news:640aa2ce25f06b@news.codecharge.com...
> 
> Hello,
> What Im trying to do is a multi languaje system. So what Im doing is
adding all
> labels to a DB (ie. in a form the labels: Name, Last Name, etc) and then
bring
> them back with CCDLookUp, and so far is doing great, but when I get to the
> Buttons I cant add a label to make this "translation" from the DB.
>
> I think IŽll also have the same problem with some other HTML areas, but if
I
> can find a way to deal with this Button translation I think IŽll be able
to do
> it.
>
> Any Suggestions?
>
> Carlos
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
zolw
Posts: 51
|
| Posted: 05/20/2004, 11:06 AM |
|
Tony Do,
Thanks for your answer it works great.
I called a CCDLookUp to get the language tag from the database and then place it with TemplateHTML into the HTML code.
Thanks for your help and also to other members for your ideas.
Carlos
Quote Tony Do:
You can use the set tag function
Now your button is
<Input type="submit" value="Search" name="DoSearch">
Change it to
<Input type="submit" value="{AVALUE}" name="DoSearch">
Then in the before show page event or before show record event
<code>
HTMLTemplate.SetVar "@AVALUE", "New button value"
</code>
"Carlos" < Carlos@forum.codecharge> wrote in message
news:640aa2ce25f06b@news.codecharge.com...
> 
> Hello,
> What Im trying to do is a multi languaje system. So what Im doing is
adding all
> labels to a DB (ie. in a form the labels: Name, Last Name, etc) and then
bring
> them back with CCDLookUp, and so far is doing great, but when I get to the
> Buttons I cant add a label to make this "translation" from the DB.
>
> I think IŽll also have the same problem with some other HTML areas, but if
I
> can find a way to deal with this Button translation I think IŽll be able
to do
> it.
>
> Any Suggestions?
>
> Carlos
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
_________________
Zolw
http://www.xlso.com |
 |
 |
|