Hi there,

I am working on a chart generator application and I'm using google chat as a chart tool.
You have to pass different parameters to chart script that you want to show on chart. I want those parameters to be dynamically change.

Say there are 20 different parametes showed on chart, then I want to create say a link, which opnes a small box with all checkbox settings to select the view options.

My issue is I dont know how to generate a window (cant be popup, yes it needs to overlap current window) when someone clicks on modify view option.

I'm not good with AJAX or java script.
Can anyone help please. If anyone can share some code or link from where I can study a bit.

Hemanshu

Well first you would design the overlay window using HTML and CSS, something along the lines of:

<div id="overlay-window">
    <input type="checkbox" id="view-opt-1">View option 1</input>
    <input type="checkbox" id="view-opt-2">View option 2</input>
</div>

#overlay-window {
    position:absolute;
    top:0px;
    bottom:0px;
    left:0px;
    right:0px;
    z-index:100;
}

You can modify the top, right, bottom, left to position the window where you want.

You can then get the check state with: $('#view-opt-1').is(':checked');

The window can be 'opened' with: $('#overlay-window').show(); and 'closed' with $('#overlay-window').hide();

Setting a variable in JavaScript to pass through ajax:

var opt1 = $('#view-opt-1').is(':checked');
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.