Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Area Question.

Status
Not open for further replies.

ddfff

MIS
Sep 27, 2002
125
0
0
US
I have a text area on my page and I have it set so that when the mouse rolls over a link on the page, it displays the related text in the text area. It works fine except...

If the text to be displayed is exceptionally long (a couple of paragraphs) it does not work. When the text is simple, without extra spacing, etc., it works great.

Any suggestions greatly appreciated.

Thanks in advance.
 
What's the problem? JavaScript Error? Or does it simply not work? Do you have a sample page? Check to make sure that there aren't any actual new lines in the text you enter or " marks that could be causing it to not work. Otherwise, post a sample, and we'll fix it up.

Thanks,
Rick

RISTMO Designs: Rockwall Web Design
Arab Church: Arabic Christian Resources
Genuine Autos: Kaufman Chevrolet & Pontiac Dealer
Rick Morgan's Official Website
 
I would say you might post in the JavaScript forum (forum216), as it could well be JavaScript related.

Hope this helps,
Dan

[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Look at the text you are trying to display. Does it have any quotes in it that may be breaking your javascript? If so... you will need to escape the offending quotes.

Example that will error:
Code:
<script type="text/javascript">
var test = "We're coming to get you!";
alert('Hello there! ' + test);
</script>

Fixed example:
Code:
<script type="text/javascript">
var test = "We[COLOR=red]\[/color]'re coming to get you!";
alert('Hello there! ' + test);
</script>

Let us know some more details... and maybe move the thread over to Javascript (if needed).

Cheers,
Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top