Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to pass spry variable to innerHTML

Posted on 2012-03-20
1
379 Views
Last Modified: 2012-03-20
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
Comment
Question by:cougarsy
1 Comment
 

Accepted Solution

by:
cougarsy earned 0 total points
ID: 37743353
Hello,

I have solved my problem--

I added this after assigning the innerHTML:

Spry.Data.initRegions();

Open in new window


Cheers!
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question