Page 1 of 1

line breaks

Posted: Sat 02 Jun 2012 5:26 am
by Alan
Hello there,
Could somebody please help me out with the code required to insert a line break between the following two 'document. write' codes. Of course, as it is now, the text align itself on the right of the small image. What I am really after is for the text to be on the next line. (javascript has me somewhat rattled)

<td width="25%" align="center" valign="top"><script type="text/javascript">

document.write("<img src=\"" + status_pic + "\" alt=\"test\" title=\"" + status_txt + "\" />");
document.write(status_txt);

</script>
</td>

Thanks in advance,
Alan

Re: line breaks

Posted: Sat 02 Jun 2012 7:41 am
by MickinMoulden
document.write("<br />")

Re: line breaks

Posted: Sat 02 Jun 2012 9:49 am
by Alan
Hello Michael,
I am having trouble getting your suggested code to work. Would you be please kind enough to indicate exactly where in my current code your modification rests.
Alan

Re: line breaks

Posted: Sat 02 Jun 2012 10:03 am
by beteljuice

Code: Select all

document.write("<img src=\"" + status_pic + "\" alt=\"test\" title=\"" + status_txt + "\" /><br />" +status_txt);

Re: line breaks

Posted: Sat 02 Jun 2012 10:32 am
by Alan
Michael,
I have put it through it's paces and it is just brilliant. Thank you very much for your efforts.
Alan