473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

text formatting in random javascript

I'm going through some "learning by doing" of javascript through trial
and error, and admittedly have a lot to learn. But in taking various
scripts and dissecting them, I still can't figure out if what I want to
do is possible, and that is this:

I'm trying to include a paragraph on my page that is randomly chosen
each time the page loads. This I can do. But in this paragraph I'm
trying to include varied text formatting (parts bold, parts different
color, etc), and make part of it a link.

If I use unformatted, un-linked text, it works fine, but that's not my
goal. When I try including html in the items from which to be selected
randomly, whether by directly specifying the attributes or using CSS
class references, nothing displays, which makes me wonder what of all
this is the problem.

Any tips? Any scripts I should look at that do this successfully?

Jul 23 '05 #1
1 1549
bne
Do you have any code you could show us?

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: tgiles | last post by:
Hi, all. I'm YAPN (Yet Another Python Newbie), started messing with it last night and so far, so good. Documentation exellent and the people seem friendly enough ;) Ok, I started playing...
3
by: Jennie Friesen | last post by:
Hello-- I would like to display a different line of text (32 different messages) on refresh, BUT with no repeats. The script I am currently using is: <script language=javascript...
4
by: Kaustubh | last post by:
Well Hie, i need all you genius guys help. Well i have databse of quotes in TXT format i want the javascript which ll radomize that database means everytime when user come on my page then script...
4
by: frogman042 | last post by:
My daughter is playing around trying to learn JavaScript and she wrote a small program that prints out a message in increasing and decreasing font size and color changes. She is using document...
3
by: gooderthanyou | last post by:
I have a textfield and you of course you can select text... When they hit the bold button I want it to obtain the selected text and bold it, the hard part is trying to figure out if javascript...
20
by: cwdjrxyz | last post by:
There have been fancy dhtml text effects since the early days of javascript. The rainbow text effect was one of the early ones. While some such effects may be fun on private pages, they can easily...
8
by: Primal-oooze | last post by:
In most newer browsers, would the following methods successfully write to the <div>s below? ------ <script> document.all.div1.innerText = "Some random text."; document.all.div2.innerHTML =...
10
by: korund | last post by:
We can use special characters ('\n') to add line breaks in text in JavaScript popup Alert boxes. there is also few additional special characters: \' single quote \" double quote \&...
1
by: sven.daems | last post by:
Hy I want to add a sort of news service to my site. I've a number of messages, wich I want to be shown in a <marquee> tag. I've found a simple scrit that generates an random message (wich I've...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.