Solved

How to pass spry variable to innerHTML

Posted on 2012-03-20
1
365 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
spacing 5 32
Element alignment and word wrapping 9 28
Test ddwrt:UserLookup 1 24
Glyph icons in Bootstrap 3 4 16
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now