php - Line breaks with javascript and HTML -


i have problem javascript , html. i'm using form user submits. if credentials wrong, script shows text message next input field.
message contains email want clickable.
things that:
when message string, ok.
when add <a href=\"mailto tag, line breaks.

<div id="message_box"> <span id="msgbox" style="display:none"></span> </div> 

ok:

$("#msgbox").fadeto(200,0.1,function()         {             var msg = ("ooops, number enterd not valid<br /> please contact: some@mail.com solve problem").replace(/[\r\n]/g, '');           $(this).html(msg).addclass('messageboxerror').fadeto(900,1);         });  

(edit)shows:
ooops, number enterd not valid
please contact: some@mail.com solve problem
lines ok, email not clicakble

not ok:

$("#msgbox").fadeto(200,0.1,function()         {             var msg = ("ooops, number enterd not valid<br /> please contact: <a href=\"mailto:some@mail.com\">some@mail.com</a> solve problem").replace(/[\r\n]/g, '');           $(this).html(msg).addclass('messageboxerror').fadeto(900,1);         });  

(edit)shows:
ooops, number enterd not valid
please contact:
some@mail.com
solve problem
lines broken, email clickable

the css:

#message_box {     width:370px;     height:30px;     padding-top:15px; }       .messagebox{  position:relative;  width:100px;  margin-left:0px;  padding:290px;  font-size:14px;  color: #647a03; } .messageboxok{  position:relative;  padding:0px;  width:100px;  color:#f00;  font-size:10px;  } .messageboxerror{  position:relative;  width:100px;  padding:0px;  color:#cc0000;  font-size:12px; } 

can me remove these annoying linebreaks??

thanks!

from comments:

given complete css code requested several commenters, a tag set display: block. needs set inline anchor tag.

w3c resources:


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -