• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 407
  • Last Modified:

How to pass spry variable to innerHTML

Hello,

I am building innerHTML for a div that will change depending on what the user selects.  Code is below.

	myStr = myStr + "<tr spry:repeat='Mailings1' spry:setrow='Mailings1'>";
  	myStr = myStr + "<td width='289' bgcolor='#B891D9' class='companyinfo' align='center' style='border-top:thick'><strong>{CompanyName}</strong></td>";
 	myStr = myStr + "<td width='216' bgcolor='#B891D9' class='companyinfo' align='center'>&nbsp;</td>";
	myStr = myStr + "<td width='319' bgcolor='#B891D9' class='companyinfo' align='center'>&nbsp;</td>";
	myStr = myStr + "</table>";

Open in new window


The Spry content {CompanyName} does not show the company name, but "{CompanyName}".  I am not sure what the correct syntax is to build the innerHTML to show this variable.

I hope I have explained it clearly...thanks in advance for your help!

Cheers,
0
cougarsy
Asked:
cougarsy
1 Solution
 
cougarsyAuthor Commented:
Hello,

I have solved my problem--

I added this after assigning the innerHTML:

Spry.Data.initRegions();

Open in new window


Cheers!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now