AnyChart: Dynamically add/remove series using javascript
Hi all,
The examples on the following page they dynamically show/hide series using javascript without any server side action.
http://www.anychart.com/products/anychart/docs/users-guide/livesamples/js-series/index.html
It seems they can do this because they add the chart to the page using javascript and so other js scripts can access a reference to the chart object. Looking at the code generated when you add a flash chart using Apex, it appears they are embedded flash. Does this stop us from using javascript to manipulate the chart object?
Has anyone managed to do something like the example in the page above using the built-in charting of Apex?
Between me and another poster we've sort of worked out a solution here - Re: Apex 4.0.2 Manipulate Flash Charts using Javascript?
Similar Messages
-
Add multiple people using Javascript Client Object Model
I am trying to add multiple people to a SP column of type Person/Group i.e. people picker. I am able
to add one successfully using their userId, but HAVE no clue how to do that for multiple people. Here is the code for one user:
function UserDrop(e, toElement, listGuid, columnName) {
//EcmaScript Client Object Model
var ctx = new SP.ClientContext.get_current();
var list = ctx.get_web().get_lists().getById(listGuid);
var item = list.getItemById(elementId);
//columnName is of type person/group and I am adding user //whose userId is 7
item.set_item(columnName, 7);
item.update();
// asynchronous call
ctx.executeQueryAsync(
function () { toElement.innerHTML = userLinkHtml; },
function () {alert ("Error")}
return false;
This works great and I can add user whose userId is 7, however I want to add multiple people like let's say users of user Ids 7 and 8.
Any ideas or help will be greatly appreciated.
There is a thread on this one but that's from .net COM which could accessed here: http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/5183e87c-ee1d-4594-9492-0dfdf6616cce
7929Hi ,
Can somebody let me know how the same(assigning the array values to lookup value field) can be achieved with multi-select lookup value. SP.FieldLookUpValue do not have any such methods like fromUser. Please help. Please find my code block below
clientContext = new SP.ClientContext.get_current();
if (this.clientContext != undefined && clientContext != null) {
var webSite = clientContext.get_web();
oList = webSite.get_lists().getByTitle("Add New User");
$.urlParam = function(name){
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
return results[1] || 0;
var itemid = parseInt($.urlParam('ID'));
var item = oList.getItemById(itemid);
var users = new Array();
users.push(SP.FieldLookupValue.set_lookupId(1));
users.push(SP.FieldLookupValue.set_lookupId(2));
item.set_item('Responsibility', users);
item.update();
clientContext.executeQueryAsync(Function.createDelegate(this, this.success), Function.createDelegate(this, this.failed));
also i cant use managed client object model.. so pls let me know how to achieve the same using javascript client object model
Ranjani.R -
Dynamically validating datatable elements using javascript
Hai, iam using jsf, and having Xml mapping to the form elements to display the data . Iam using <h:datatable> inside which iam haveing repeated elements, i need to do a javascript validation before displaying the form element present inside the <h:datatable> columns.Iam also using <j4j:idproxy> , the java script is working for 1 iteration but it is the dataof the form element is not getting overridden in the 2nd iteration, It is somethinglike this below.
<TR id="buiCoverRowId" style="display:none;">
<TD height="9" width="200"></f:verbatim> <h:outputText
styleClass="outputText" id="text7"
value="Buildings Cover"></h:outputText><f:verbatim></TD>
<TD height="9" width="516"></f:verbatim> <h:outputText
styleClass="outputText" id="buildCoverId"
value="#{pathPart.xpathMap['./BuildingsCover/CoverDetail/SumInsured/Amount']}">
</h:outputText> <f:verbatim></TD>
</TR>
<TR>
<TD></f:verbatim><f:verbatim>
<h:inputHidden id="hidBuiCoverId"
value="#{pathPart.xpathMap['./BuildingsCover/CoverDetail/SumInsured/Amount']}">
<j4j:idProxy id="hidBuiCoverId_" />
</h:inputHidden>
</f:verbatim><f:verbatim></TD>
<TD></f:verbatim><f:verbatim>
<h:inputHidden id="hidExBuiCoverId"
value="#{pathPart.xpathMap['./BuildingsCover/ExcludedInd/Value']}">
<j4j:idProxy id="hidExBuiCoverId_" />
</h:inputHidden>
</f:verbatim><f:verbatim></TD>
</TR>
<SCRIPT>
alert("HAI");
var buidcover = document.getElementById('hidExBuiCoverId_').title;
var buidcoverR =document.getElementById(buidcover).value;
alert("the value of buildcover----->"+buidcoverR);
var buId =document.getElementById('hidBuiCoverId_').title;
var entitybuId1 = document.getElementById(buId).value;
entitybuIdT1 = trim(entitybuId1);
alert("entitybuIdT1"+entitybuIdT1);
var buExId = document.getElementById('hidExBuiCoverId_').title;
var entitybuExId1 = document.getElementById(buExId).value;
entitybuExIdT1 = trim(entitybuExId1);
entitybuExIdU1 = entitybuExIdT1.toUpperCase();
alert("entitybuExIdU1"+entitybuExIdU1);
if(!(entitybuIdT1 == null || entitybuIdT1 == '') && ((entitybuIdT1 == "0")) && (entitybuExIdU1 == 'FALSE'))
document.getElementById("buiCoverRowId").style.display="block";
</SCRIPT>
The form element is mapped to the xml. the above code is written within a datatable, iam using javascrpt within this to display the datat or not, it is working for first iteration but its not working for second iteration. Plz help me with this . Is there any way that i can use javascript so that it vvalidates the form elements even for the 2 iteration of the datattable. I am having thesame values (of the 1iteration) even during the 2 iteration. Plz help me with this asap.Got the solution.
$("div.ms-acal-rootdiv div div div a").html().replace('Replace this text only.','Replaced Text'); -
I have an old iPod that was associated with a PC that has been destroyed (I didn't unload iTunes from it before it was damaged). I know that if I plug the iPod into my new PC, it will erase all of my old material.
Is there a way to extract the material from my old iPod, load it onto my new PC, and be able to manage my music & keep it on my iPod?
I have an iPhone, but do not want to load all of the music onto that; my iPod (though older) still works perfectly fine. I just need to be able to add/ remove songs, etc.
Thanks in advance.I have an old iPod that was associated with a PC that has been destroyed (I didn't unload iTunes from it before it was damaged). I know that if I plug the iPod into my new PC, it will erase all of my old material.
Is there a way to extract the material from my old iPod, load it onto my new PC, and be able to manage my music & keep it on my iPod?
I have an iPhone, but do not want to load all of the music onto that; my iPod (though older) still works perfectly fine. I just need to be able to add/ remove songs, etc.
Thanks in advance. -
Hi,
I have a ribbon (done using ribbon XML) with menu options. I need to remove few buttons from the menu dynamically based on some condition. Also, I want to change the label of another button. How to achieve this programmatically? (C#)
Thanks in advance.
Thanks PrasadHello Prasad,
Use callbacks for populating Ribbon controls such as menu, dropDown, gallery and etc. Then you can use the
Invalidate or
InvalidateControl methods of the
IRibbonUI interface to get your callbacks invoked when required. Thus, you will be able to delete the required item(s).
You will find the following articles in MSDN helpful:
Chapter 11: Creating Dynamic Ribbon Customizations (1 of 2)
Chapter 11: Creating Dynamic Ribbon Customizations (2 of 2)
To change the label of your controls at runtime you need to use the getLabel callback and call the Invalidate or InvalidateControl methods of the IRibbonUI interface. The following series of articles describe the Fluent UI in depth:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3) -
Does devpoll support dynamic add & remove of fd
I am trying o use devpoll interface to improve the program
efficiency. I used devpoll interface to add fds as they
are created and to remove dynamically, since the program I used
creates sockets dynamically. When I ran the program, the
devpoll interface failed to report that sockets have data.
Any idea?
some errors are:
etNextBtsMsg(): Unexpected event rcvd. scktnum =3 revents = 0x 8
getNextBtsMsg(): Unexpected event rcvd. scktnum =4 revents = 0x 8
Thanks
K.Gnanaratne
#### here is teh code that add soocket number to dev poll list
struct pollfd pollBuf;
if ( scktNum >= k_maxScktNum ) {
cout << "addToPollList(): scktNum exceeds the max limit. scktNum =" << scktNum;
cout << " Qname "<< s_QnameSet[qType & 0x01] << endl;
return -1;
// add to poll list
pollBuf.fd = scktNum;
pollBuf.events = POLLIN|POLLRDNORM;
pollBuf.revents = 0;
if ( ::write(m_pfd[qType], &pollBuf, sizeof(pollBuf) ) != sizeof(pollBuf) ) {
cout << "addToPollList(): write to dev/poll failed. scktNum =" << scktNum;
cout << " error = " << strerror( errno );
cout << " Qname "<< s_QnameSet[qType & 0x01] << endl;
return -1;You say it's not reporting events, but your errors show events being reported. It sounds like your code doesn't know how to handle things like POLLERR and POLLHUP.
-
Is it possible to add sticky note using Javascript?
hi,
I want to add some comments to acrobat file using Stcky note. I automated the text to be dynamic. And now, I wanted this text to be placed in sticky note.
How it can be done? Would someone please suggest me?
thanks in advance,
shivaUse the doc.addAnnot method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.434.html
with a type of "Text" and the "contents" set to the text you want to show: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.32.html -
To dynamically generate text box using javascript
hi...
i want to have a button such that if he clicks that button 2 textboxes be generated side by side.
i want the textboxes to be added just above the button so that the button is always below the newly created textboxes.
its not only once i want this ..i want that whenever he clicks the button 2 textboxes gets added everytime...
how can i achieve this?
thanksOk, so this is a complete thread hijack - probably would have been worth a new thread.
The initial solution involved javascript completely.
The problem breaks down to
1 - identify when we should move focus
2 - identify which field focus should move to.
Here is one version. This approach gives each textfield an individual name/number so you can find its "matching" pair.
<html>
<head>
<script>
var numLinesAdded = 0;
function focusNext(tBox){
var name = tBox.name;
var index = name.substring(name.indexOf('_')+1);
var brother = eval("document.all.txt2_" + index);
var l = tBox.value.length;
if (l >= tBox.maxLength){
brother.focus();
function generateRow() {
var d=document.getElementById("div");
d.innerHTML+="<input type='text' maxlength='5' name='txt1_" + numLinesAdded + "' onkeypress='focusNext(this)'>";
d.innerHTML+="<input type='text' name='txt2_" + numLinesAdded + "'><br>" ;
numLinesAdded++;
</script>
</head>
<body>
<form>
<div id="div"></div>
<input type="button" value="Add" onclick="generateRow()"/>
<input type="submit">
</form>
</body>
</html> -
Dynamically add remove table from a scrollpane
Hi,
I have a tree of different objects. And have tables for presenting the information of those objects. When i click on the tree node i want the corresponding table to be loaded in the jscrollpane. Is this possible.
Till now this is my code.,
tableModel.setObj1(obj1);
scrollPane.removeAll();
repaint();
scrollPane.add(table);
validate();
But this does not show up the table, it is blank.
Any thoughts is greatly appreciated
Thanksforget this post,
I got the answer
Thanks -
Add and remove subform using API
Hi,
I have a document which add and remove subsform using javascript. I need to fill out the fields and add or remove subform using the java API. Is it possible?
Thanks,Hi Snehasis,
Tom is correct, there is no T-SQL command to add a publisher to Replication Monitor. However, the server from which you launch Replication Monitor will automatically be added to Replication Monitor if it is a Publisher. Also, you can add additional
Publishers using the Add Publisher dialog.
This is covered in
Add and Remove Publishers from Replication Monitor
Brandon Williams (blog |
linkedin) -
Building a dynamic dialog in Acrobat with Javascript
I am attempting to figure out how to build dynamic dialogs within Acrobat using Javascript.
I am attempting to write a generalized PDF page splitter. The user selects a PDF document, and then the script analyzes the open document and determines that there are N pages in the document. I am going to run through the document and make each page its own PDF. Each page will be considered a certain kind of page, for example, Cover, Article, Ad, etc. and the type of page it is will affect the naming convention I use when making the new, one-page file. For example, let's say that pages 36, 37 and 38 are page, ad and article, respectively. Then the names I will be using for each output file will be as follows:
P12345Pg_036.pdf
P12345Ad_037.pdf
P12345Ar_038.pdf
But there is no way for my code to actually look at a given page and decide that it is page, article, ad, or one of four cover types, etc. So I want to build a dialog that looks something like this (assume a O is meant to be a radio button):
Page Pagetype
1 O Page O Inner cover Front O Outer cover Front O Ad O Article
2
O Page
O Inner cover Front
O Outer cover Front
O Ad
O Article
3
O Page
O Inner cover Front
O Outer cover Front
O Ad
O Article
4
O Page
O Inner cover Front
O Outer cover Front
O Ad
O Article
N
O Page
O Inner cover Front
O Outer cover Front
O Ad
O Article
Beacuse each document varies in length, that means the dialog will need to be dynamic.
I have looked at the Acrobat API and determined that defining a dialog looks something like this:
var DialogABC = {
initialize: function(dialog){},
commit : function(dialog){},
description:{}
app.execDialog(DialogABC)
What I do not know how to do is create the dialog specification on the fly. Do I treat it as a string or is there some other way of making this happen? How can I make a dynamic description that allows for a variable number of rows?
Please let me know if you have any thoughts. A good reference or example would serve just as well.
TIA!
JohnThere are two approaches to this:
1. Treating the dialog object as a literal object
2. Treating it as a string
If you treat it as a literal object you can manipulate it like any other object. Each function can be defined separately, and the items in the various arrays can be added or removed as you please.
If you treat it as a string then you can construce that string in a dynamic way, using loops or if-conditions, as you please, and then use the eval() command to convert it to an object when done.
Both approaches are quite complex and require a lot of scripting experience to implement correctly. -
Dynamic Entry Subform fails to Add/Remove lines.
Hello,
I have created a form that uses a dynamic entry subform which adds new lines or removes existing lines per button clicks.
The dynamic entry subform functions correctly if the subform is set as VISIBLE upon opening the form.
However, if I start this dynamic entry subform as HIDDEN and use 2 radio buttons to hide or show the subform objects (subform default is set to hidden), the dynamic entry subform that adds new lines will fail when clicking on the ADD button.
The ADD button uses this javascript:
SubformName.instanceManager.addInstance(1);
The REMOVE button uses this javascript:
this.resolveNode("SubformName").instanceManager.removeInstance(this.parent.index);
xfa.form.recalculate(1);
The show and hide radio buttons use these scripts:
HIDE:
{SubformName.presence = "hidden"
SubformName2.presence = "hidden"
SubformName3.presence = "hidden"
SHOW:
{SubformName.presence = "visible"
SubformName2.presence = "visible"
SubformName3.presence = "visible"
HIDE is the default radio button setting. SubformName is the dynamic entry subform. Name2 & Name3 are other subforms that are hidden or visible.
I can attach the example form if that would help with debugging of the script(s).
Any suggestions would be appreciated.
Thanks,
EricEric,
I looked at your form.. Follow the below steps to resolve your issue..
1) Wrap the "item2" subform within another subform. (for example "Subform_Item2").
2) In the item2 properties, change the presence setting to "Visible" instead of "Hidden".
3) In the Subform_Item2 properties, change the presence setting to "Hidden".
4) In the radio button change events ( for 3 bids and 6 bids), change the reference from "item2" to "Subform_Item2" (to the newly wrapped subform).
Subform2.presence = "visible";
Subform_Item2.presence = "visible";
TotalsSection2.presence = "visible";
5) In the Add Another Row button click event, change the code to the below.
Subform_Item2.item2.instanceManager.addInstance(1);
This resolved the issue in my system.
Let me know if you still have issues.
Thanks
Srini -
How to dynamically add new line series to the line chart in flex?
i need to add line series dynamically..and each line series should have a different data provider...
A chart can have only 1 dataProvider which in my case is an ArrayCollection.
The chart will update every time the dataProvider changes if you use binding.
So you have to write a function that periodically populates the ArrayCollection with data from the server and the chart will update automatically.
'Using line charts' tutorial from Adobe: http://livedocs.adobe.com/flex/3/html/charts_types_08.html#243339 -
How to add line series dynamically to a line chart in flex?
hi..i need to add line series dynamically to a line chart..depending on an array..the application is this..i have an array which stores the details of the users connected to an fmi server..the chart should display the bandwidth of each client..so the users should be added and removed from the chart dynamically...
Hi
1.I am giving you solution for dynamically adding values to the dropdown
public void addValue( ) //Method Name in Component controller
//@@begin addValue()
IWDNodeInfo nodeinfo = wdContext.nodeNodeTestData().getNodeInfo();// Node should be map to the view's Node
IWDAttributeInfo att = nodeinfo.getAttribute("VechileTypes");// Attribute by which dropdown in bound//
IModifiableSimpleValueSet svSet = att.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
svSet.put(wdContext.currentNodeTestDataElement().getInpAtt(),wdContext.currentNodeTestDataElement().getInpAtt());
//@@end
2. wdThis.wdGetLangCompController().addValue(); // call this method in the point where u want to add values to the dropdown. -
Is it possible to add/remove a person from a group using workflow?
Hi All,
Is it possible to add/remove a person from a group using workflow?What version of SharePoint are you using?
There is CodePlex project that adds additional work flow steps that would help you out. These include
Create Site
Create Group
Add users to group
The link is http://ilovesharepoint.codeplex.com/releases/view/89201
Steven Andrews
SharePoint Business Analyst: LiveNation Entertainment
Blog: baron72.wordpress.com
Twitter: Follow @backpackerd00d
My Wiki Articles:
CodePlex Corner Series
Please remember to mark your question as "answered" if this solves (or helps) your problem.
Maybe you are looking for
-
Opening Stock+InwardQty+OutwardQty-Closing Stock from OINM
Can any SQL Expert can rectify my following query Select DocDate,Dscription,SUM(InQty) as 'Inward Quantity',SUM(OutQty) as 'Outward Quantity', (Select SUM(InQty)-SUM(OutQty) from OINM where Itemcode='ACID BOTTLE - HCL' And DocDate BETWEEN '2008-03-01
-
Hey, is it anyhow possible to connect 2 devices to sound card? (only fatalty pro) I mean repro + headset
-
How do i get rid of type error null is an object on my iphone ? It keeps popping up on my yahoo, its driving me mad, please help.
-
Printing Keynote presentation-scale to fit
is there a way to print a keynote presentation to scale to fit different paper sizes? E.g. I have a 800 x 600 presentation and I want it to print to the maximum size on a tabloid page (same for 1024x720, 1920 x 1080, custom, etc). Ideally this would
-
Control display fo custom field
Hi, We are on SRM 7.1 ECS. We ahev a requirement to create a custom field under BASIC DATA tab in shopping cart screen but we would like to display this field only if the item is a service item. In SRM 5,we had to implement the badi BBP_CUF_BADI_2 fo