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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:28:30+00:00 2026-06-04T14:28:30+00:00

var chart; var d = new Array(); function click() { d = document.getElementById(‘graph:hi’).value; alert(d);

  • 0
var chart;
var d = new Array();

function click() {
    d = document.getElementById('graph:hi').value;
    alert(d);
}
var c = new Array(66, 15, 2.5, 21.9, 25.2, 23.0, 22.6, 21.2, 19.3, 16.6, 14.8);
alert(c);
jQuery(document).ready(function (e) {
    chart = new Highcharts.Chart({
        chart: {
            renderTo: 'container',
            defaultSeriesType: 'spline',
            ignoreHiddenSeries: false
        },
        title: {
            text: 'Height Report'
        },
        subtitle: {
            text: ''
        },
        xAxis: {
            categories: ['0', '0.5', '1.5', '2.5', '3.5', '4.5', '5.5', '6.5', '7.5', '8.5', '9.5', '10.5', '11.5', '12.5', '13.5', '14.5', '15.5', '16.5', '17.5', '18.5', '19.5', '20.5', '21.5', '22.5', '23.5', '24.5', '25.5', '26.5', '27.5', '28.5', '29.5', '30.5', '31.5', '32.5', '33.5', '34.5', '35.5']
        },
        yAxis: {
            title: {
                text: 'Percentage'
            },
            labels: {
                formatter: function () {
                    return this.value + '%';
                }
            }
        },
        tooltip: {
            formatter: function () {
                return '' + this.x + ': ' + this.y;
            }
        },
        plotOptions: {
            spline: {
                marker: {
                    radius: 3,
                    lineColor: '#666666',
                    lineWidth: 1
                }
            }
        },
        series: [{
            name: 'Pecentile 3',
            data: c
        }, {
            name: 'Pecentile 10',
            data: d
        }]
    });
});

from XHTML i get regularvalue and getted in click() function. jQuery(document).ready(function(e){}) is a graph plotting code..i want to pass d value from click() to jquery function.but i can’t get the values in jquery function.thank you

  • 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-04T14:28:33+00:00Added an answer on June 4, 2026 at 2:28 pm

    Your code is conceptually weirdly written.

    Why do you execute some code before the document is ready and some code inside the jQuery(document).ready(); ??

    If you put everything inside the latter function, with the proper modifications, averything can work.

    I suggest to:

    1. insert everything into the Query(document).ready(); function
    2. instead of using the function click(...) I would use a more jquery style, that is to say: $('graph:hi').click(function(){WRITE THE CODE});

    3. when you do this, d will b a global var inside your scope, so you will not have the problem you are experiencing

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

Sidebar

Related Questions

var thumbs = document.getElementsByTagName(img); for (var i=0; i<thumbs.length; i++) { Core.addEventListener(thumbs[i], click, function() {alert(i);});
this is the JS <SCRIPT type=text/javascript> $(function() { var ids = new Array(); for(var
I am using the following code... var Graphs:Array = new Array(contentMain.graph1, contentMain.graph2, contentMain.graph3, contentMain.graph4,
Ok code so far: var Graphs:Array = new Array(contentMain.graph1, contentMain.graph2, contentMain.graph3, contentMain.graph4, contentMain.graph5, contentMain.graph6,
I have a simple function that passes a variable var as a u_char array.
var UI$Contract$ddlForm_change = function() { //'this' is currently the drop down that fires the
I'm new to Flex. I've been graphing multiple series in a line chart where
I'm finalizing a new chart that uses a Category Axis as my horizontal, and
The data provider for the chart contains an array of facility objects. A facility
def var cList as char no-undo. assign cList = one,two,three,four. <Loop> cList logic... </Loop>

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.