Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9022781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:36:12+00:00 2026-06-16T05:36:12+00:00

I need to create a modal dialog (just click OK) in a Backbone.js template

  • 0

I need to create a modal dialog (just click OK) in a Backbone.js template file. It is in a loop like this, in show_template.jst.ejs:

<% for(var i = 0... all words %>
<% var word = get the ith word %>
<td><span class="synonyms"><%= I18n.t("Synonyms") %></span></td>

I want the user to be able to click on “Synonyms” (in her chosen language) and have a modal dialog box pop up, and show the synonyms from the database, in her language.
To sum up, I want Synonyms to be clickable.

Could someone point me in the right direction? (I am a Javascript/Backbone.js noob)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:36:14+00:00Added an answer on June 16, 2026 at 5:36 am

    Basically I see two options for making Synonyms clickable and knowing which one was clicked

    One View option – put your data on the dom and read it upon a click action: (notice the data-kind attribute)

    <% for(var i = 0... all words %>
    <% var word = get the ith word %>
    <td>
        <span class="synonyms" data-kind='<%= I18n.t("Synonyms") %>' >
            <%= I18n.t("Synonyms") %>
        </span>
    </td>
    

    And the event part of the view will look like this

    events: {
       "click .synonums" : "synonyms_event"
    },
    
    synonyms_event: function(e) {
        var kind =  $(e.target).data("kind");
        alert(kind + " was pressed");
    }
    

    The other option is to create views for each word and let it take care of the click event

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At http://jqueryui.com/demos/dialog/#modal-form , there is a sample modal dialog; when you click on Create
I need to create an modal dialog, which is to loaded from a nib
I need to create a non-modal popup dialog, which can be dragged and resized
I need create custom dialog and put JPanel into it. Is it possible?
I'd like to create/update a sub-object within an admin edit dialog. I have a
I have followed this question to make a non-modal/modeless dialog: How to display a
Basically, I referred to some sources, and found this: Yah, that's easy, just create
i am new in Cassandra db. need help to create data model. i have
I need to display a multiply sign (×) in a modal being created by
i need create an email list sending to many emails. what is best solution

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.