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

  • Home
  • SEARCH
  • 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 1838632
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:30:18+00:00 2026-05-17T06:30:18+00:00

In Dashcode you can set up a handler for a behavior in the inspector.

  • 0

In Dashcode you can set up a handler for a behavior in the inspector.

Here’s a sample handler for a button click on a button I’ve named “mybutton1” in the Inspector:

function myGetButtonName(event)
{
    var e = event.target;
    alert(e.id);
}

The problem is, when the button is clicked and the alert comes up it says the ID of the button is “DC_img1” rather than “myButton1” (which is what shows in the inspector in the id field).

I guess I’m not accessing the correct id.

Does anyone know how to get the id that shows in the attributes tab of the inspector?

Thanks!

  • 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-05-17T06:30:19+00:00Added an answer on May 17, 2026 at 6:30 am

    OK, it turns out that the “id” that you may set on the attributes tab of the Dashcode Inspector is the CSS id of the element. I didn’t realize that before.

    To get that info I used this:

    var x=event.currentTarget;
    alert(x.id);
    

    I don’t know if it’s the best way, but it gave me the correct result for each of the images that I was clicking on. I’m now getting the CSS id in the alert.

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

Sidebar

Related Questions

I am trying to set the values for a popup menu in Dashcode programmatically.
Can I use Dashcode to develop an application that can be sold in the
I'm creating an iphone webapp in dashcode for the first time and I can
I'm trying to use Dashcode to create a drop-down list for an iPhone Web
I am working with a data set that needs to be scrubbed. I am
Dashcode keeps source files in a .dcproj project file, which is really a package
How can i turn this: <? echo json_encode($myArrays); ?> ...into this: _rowData: [ {
I started to use Dashcode with a Safari Custom Project, my apps work fine,
I like using Dashcode for making quick little web apps, but it specifically targets
I have created a project in Dashcode, inserted a List control, enabled a dynamic

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.