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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert a new line in alt tag

Status
Not open for further replies.

aSDDSasdas

Programmer
Jul 12, 2006
19
AT
hello Everyone,
is it possible to add new lines in the alt tag .. as /n doesnt seem to work inside the alt tag ..
im posting the code below


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Server</title>
<script type="text/javascript">

function writeText(txt)
{
document.getElementById("desc").innerHTML=txt
}
</script>
</head>

<body>
<img src ="Lilies.jpg" width ="545" height ="526" alt="Bratislava Server" usemap="#lilies" />

<map id ="lilies" name="lilies">
<area shape ="rect" coords ="0,0,482,426" onMouseOver="writeText('Bla bla bla')"
href ="Blue hills.jpg" target ="_default" alt="lilies /n on /n the /n mountain"/>
</map>



<p id="desc"></p>

</body>
</html>


thank u in advance

regards
sonia
 
Hi

[ol]
[li]No [tt]alt[/tt] tag exists. Maybe you are talking about [tt]alt[/tt] attribute.[/li]
[li]Line breaks in [tt]alt[/tt] attributes are not too important. Are you sure you want to use [tt]alt[/tt] and not [tt]title[/tt] ?[/li]
[li]No, you can not introduce line breaks in [tt]alt[/tt] or [tt]title[/tt]. But Explorer preserves embedded line breaks.
Code:
<area shape ="rect" coords ="0,0,482,426" onMouseOver="writeText('Bla bla bla')"
href ="Blue hills.jpg" target ="_default" alt="lilies
on
the
mountain"/>
[/li]
[li]By the way, "/n" has no meaning on any system. Maybe you thought to "\n".[/li]
[/ol]

Feherke.
 
Hi,
im supposed to have a diagram with Servers and workstations where when i have the mouse upon the Server image the Characteristics of this Server are stated (eg : server name,CPU type,MB,OS,date,RAM,....) .

i want to have the information stated one beloe the other. else its difficult to read for the user.

I found out that it could be done with the alt attribute.

is there any alternative for this ?
 
hi,

im new to this ..but plz may i know wht is this tooltip n when is it exactly used for .. as far as i understood it is also used to display messages on images,text....
In my case i have one image n in this image there are many servers...so with the help of x,y co-ordinates i should be able to point out the messages for every server .
with dhtml tooltip i find its getting more complex.i downloaded some of the scripts .n there are many javascripts combined...since i am new to javascripts ,dhtml.
if u could briefly tell me wht it does would be very helpfull

thank u in advance

regards
sonia
 

The diagram would be the data in the image map - NO
or the information in the alt attribute ? -YES this is wht i want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top