Link to home
Start Free TrialLog in
Avatar of rabbits2
rabbits2

asked on

I would like to extract data from a text file onto an htm page including hyperlinks...

I would like to extract text from a text file and display it onto an htm page..this I have managed to do, what I am having trouble with is including hyperlinks within this text from the *.txt file.


My htm file:

<body>
<table width=70% border=0 cellspacing="40">
<tr>
   <td width=50%><span class="style1"> Title:</span>
     <script src="settext.js"></script></td>
</tr>
<tr>
  <td width=50% class="style2"><span class="style1"> Body:</span>
     <script src="hyperlink.txt"></script>
</font>
   </td>
</tr>
</table>
</body>



My .txt file:

var tdContent1=""
tdContent1="<b>This text will be displayed on the .htm page</b>"
document.write(tdContent1);
ASKER CERTIFIED SOLUTION
Avatar of mark-b
mark-b
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sompol_kiatkamolchai
I guess that your error come from using " (double quote) in anchor tag. Like mark-b example. you should use ' (single code) instead.

Hope this can correct.