Q

Click checkbox and change font of the page

I have used one rtf field to input some details that are in both English and Tamil. When I copy and paste the details from some other file (doc file) it displays it as is (if it is English, English or if it is Tamil, Tamil) in Notes client.

I am using another form to display this content on the Web. English is displayed well, but Tamil takes some other font display as unknown characters. If I use a font tag before this field then it is ok, but I have check English and Tamil. If I select English, the content should be in English .If select Tamil, the content should be in Tamil. How can I do this?

If I understand your question correctly, I believe you want users to be able to click a checkbox and change the font of the page.

You should be able to do this with Dynamic HTML (DHTML) on the page, using JavaScript and CSS.

Below is a sample function that changes fonts when a link is clicked. To adapt it for your use, change the function calls in the links to pass the name of the fonts that you need to use. Also, make sure the text is enclosed in a DIV or SPAN tag with the ID "Content" (or change the JavaScript function to point to a different HTML element name).

<HTML>
<HEAD>
<SCRIPT>
function SetFont (FontName) {
 document.all.Content.style.fontFamily
 = FontName;
}
</SCRIPT>

</HEAD>
<BODY>

<A HREF="#" onClick=
"SetFont('Arial')">Set font to Arial</A>
<BR>
<A HREF="#" onClick=
"SetFont('Verdana')">Set font to Verdana</A>
<BR><BR>

<DIV ID="Content">
The font of this text will
 change when a link above is clicked.
</DIV>

</BODY>

Do you have comments on this Ask the Expert question and response? Let us know.

This was first published in February 2005

Dig deeper on Lotus Domino Designer

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close