Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

javascript error in string

Posted on 2013-05-31
2
Medium Priority
?
404 Views
Last Modified: 2013-05-31
Hi I have the code below but I keep getting "totalUsers" is not definined

Woul be grateful for any help

  Dim strType As String = "totalUsers"
            oLiteral.Text = "<a href=""javascript: //"" id=""grid_link_" + oContainer.PageRecordIndex.ToString() + """ onclick=""getTotals(this," + strType + ")"" class=""ob_gAL_Lugaso"">" + oContainer.DataItem("TotalUsers") + "</a>"

Thanks
0
Comment
Question by:Soluga
[X]
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
2 Comments
 
LVL 18

Accepted Solution

by:
Rajar Ahmed earned 2000 total points
ID: 39211287
Add single quotes to the string,
Dim strType As String = "'totalUsers'"

Open in new window

0
 
LVL 1

Author Comment

by:Soluga
ID: 39211304
It's ok I got it

Dim strType As String = "totalUsers"
            oLiteral.Text = "<a href=""javascript: //"" id=""grid_link_" + oContainer.PageRecordIndex.ToString() + """ onclick=""getTotals(this," + "'" + strType + "'" + ")"" class=""ob_gAL_Lugaso"">" + oContainer.DataItem("TotalUsers") + "</a>"
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

704 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