• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Web App item list, {tag_description} & javascript

New Here ,
Dec 27, 2013 Dec 27, 2013

Copy link to clipboard

Copied

I'm trying to use this code in a web app item list template:

var obj_{tag_counter} = {
name:'{tag_name_nolink}',
num:'{tag_counter}',
type:'{tag_type}',
desc:'{tag_description}'
}

Unfortunately the appears to be a line break which isn't in the individual web app item's description, but is always added to the end of the string when {tag_description} is used. This results in the following error:


Any idea what I'm doing wrong?

TOPICS
How to

Views

698

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Dec 28, 2013 Dec 28, 2013

Tag description will have a variety of html entities, images and more, To much for the description value so a custom field with short description will do.

You are doing inline script as well as you got the tags there, Your better off with rendered data or fetched data from the web apps and if your using html 5 data-address etc is better and have your scripts in script files.

Votes

Translate

Translate
LEGEND ,
Dec 27, 2013 Dec 27, 2013

Copy link to clipboard

Copied

May I ask what are you trying to achieve?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 27, 2013 Dec 27, 2013

Copy link to clipboard

Copied

Use Google Map's Javascript API to build markers and info windows on a map

(yes I am aware that web apps have this functionality somewhat baked into them already, but the address geocoding that it uses is complete garbage)

page content & web app item list

complete page

I was hoping to avoid having to create a generic multiline text field to duplicate how {tag_description} should behave. The other idea I had was bringing web app items in as hidden DOM elements and driving everything else off of those, but I really am not a huge fan of creating unnesscary markup.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 28, 2013 Dec 28, 2013

Copy link to clipboard

Copied

Tag description will have a variety of html entities, images and more, To much for the description value so a custom field with short description will do.

You are doing inline script as well as you got the tags there, Your better off with rendered data or fetched data from the web apps and if your using html 5 data-address etc is better and have your scripts in script files.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 18, 2014 Jan 18, 2014

Copy link to clipboard

Copied

LATEST

Ended up rendering out hidden div's with data attributes, which were looped through to create the elements that appear on the map. The various filters are applied by looking for the relevant data attribute values, toggling the visible data attribute for those particular items, and then reinitializing the map.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines