Jump to content

Please help adding html to JS


lingo5

Recommended Posts

Hi,

I need to modify the following JS to include more advanced HTML formatting such as tables, font colors and even a style sheet....

The problem is I et plenty of syntax errors when I try to insert html code in the html section of the JS.

Please help...thanks

 

 

	// Template definitions.
templates :
	[
		{
			title: 'My Template 1',
			image: 'template1.gif',
			description: 'My description here.',
			html:
				'<h2>Type your text here.</h2>' +
				'<table><tr></table>'

		},
		{
			title: 'My Template 2',
			image: 'template2.gif',
			description: 'My description here.',
			html:
				'<h3>Template 2</h3>' +
				'<p>Type your text here.</p>'
		}
	]
});

Link to comment
https://forums.phpfreaks.com/topic/253381-please-help-adding-html-to-js/
Share on other sites

For example, how would I add this html code to the previous JS script?

 

<table width="100%" border="0" cellspacing="0" cellpadding="1">
  <tr>
    <td>TITLE HERE</td>
  </tr>
  <tr>
    <td>Name of client</td>
  </tr>
  <tr>
    <td>body of the message goes here</td>
  </tr>
  <tr>
    <td>signature and contact</td>
  </tr>
  <tr>
    <td>details go here</td>
  </tr>
  <tr>
    <td><p>and more details</p></td>
  </tr>
  <tr>
    <td>etc...etc....</td>
  </tr>
</table>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.