Jump to content

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>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.