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 8284939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:17:35+00:00 2026-06-08T11:17:35+00:00

<a data-role=button data-transition=flip href=#feedbackmain inline style=height:120px type=button name=feedbackLink> <img src=icons/report.png inline style=height:80px/><br/>Feedback </a> So

  • 0
<a data-role="button" data-transition="flip" href="#feedbackmain" inline style="height:120px" type="button" name="feedbackLink">
        <img src="icons/report.png" inline style="height:80px"/><br/>Feedback
</a>

So I have this button as shown above and I am trying to trigger it to open a pie chart for me. Problem is that I can’t seem to get the button to work. I can also create the piechart upon webpage load if possible but haven’t been able to figure out how to do that either. My pie chart is made in jQplot and is generated like this:

function drawChart(data) {
     var data = data;

      var options = {
          title: 'Pie Chart',
          seriesDefaults: {
            renderer: jQuery.jqplot.PieRenderer,
            rendererOptions: {
              showDataLabels: true,
              dataLabels: 'value',
              fill: false,
              sliceMargin: 5,
              lineWidth: 5,
              startAngle: 45
            }
          },
          legend: { show:true, location: 'w' }
        };

      $.jqplot('chartDivId', data, options);
    }

Now, I tried calling the function like this:

$(document).ready(function()
    {
    drawChart([[["data1",6],["data2",5],["data3",2]]]);
})

I get a transparent box where the chart is supposed to be drawn, but … it’s transparent. I can make a button with an onClick function on the same div with data-role: page and get that to work, but I’d rather have it load on startup as I need the data1,data2,data3 parameters loaded from MySQL via PHP. I can’t even get contact with the button shown in the first snippet with the following code:

$("#feedbackLink").click(function()
        {
        alert("2");
        })
    });

Anyone know how to fix this? Either get the button to do it for me OR have the chart load automatically with the rest of the script.

EDIT: I even stripped it down to this:

$(document).ready(function()
    {
        $("#test").click(function()
        {
            alert("2");
        })
})

And the button:

<div data-role="page" id="page1">
    <input type="button" id="test" value="test"/>
</div>

I deleted basically everything else in the whole page, and still no damned contact :U

  • 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-08T11:17:36+00:00Added an answer on June 8, 2026 at 11:17 am

    You need to add the id attribute to the anchor so you can handle the click event with JQuery

    <a data-role="button" data-transition="flip" id="feedbackLink" href="#feedbackmain" inline style="height:120px" type="button" name="feedbackLink">
        <img src="icons/report.png" inline style="height:80px"/><br/>Feedback
    </a>
    

    also you need to make sure that your event handler is written in the $(document).ready()

    $(document).ready(function(){
        $("#feedbackLink").click(function(){
          alert("2");
        })
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using this call <a href=deleteDialog.html data-rel=dialog data-transition=pop data-role=button id='deleteDialog'>Delete</a> to get the following dialog
For example, <input type=button id=one value=o data-role=button data-inline=true class=game/> I want to use it
I am opening a pop-up dialog like- <a href=routeEdit.php data-role=button data-icon=gear data-inline=true data-theme=b data-transition=pop
I have the following template in Backbone, all gets rendered perfectly. <a href=#list data-role=button
I have this: <div data-role=header > <div data-role=controlgroup data-type=horizontal > <div id=b1 data-role=button >b1</div>
With rails version 2.3.8 I'm trying to get HTML output like: <a href=/product/list data-role=button>Product
Say I have a something like this: <div id=myTop> <a href=# data-role=button data-theme=a>one</a> <a
This is my code: <div data-role=content data-theme=b> <div data-scroll=y> <ul> <li data-role=button data-icon=arrow-r onclick=redirectPage(1);>All
I want to add or remove jquerymobile attribute data-role=button from anchor tag on window
How to disable the button in coding using jquery mobile? <div data-role=button id=val>Value</div> [Note

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.