Definition of region dynamically by using java script
Hello
I have a parent region containing 2 subregions,
subregion 1st - is a region of bar chart showing the top 10 customers (on sale terms)
2nd subregion - on the page load its hidden, but when clicking on a point in the bar above - graph corresponding to a customer - it refreshes and view transactions associated with this client making this outstanding balance
Subregion refresh works fine and I have the following code the home page's html to achieve this,
function eventlistener_initiate(a){ AnyChart.getChartById($("#RG2_TOP_CUST_chart object").attr("id")).addEventListener("pointClick",showCustDrillDown); }; function showCustDrillDown(pEvent){ $x('P3_CUSTOMER_NAME').value = pEvent.data.Name; $x('P3_BALANCE_TYPE').value = pEvent.data.Series.Name; $('#RG3_TRX_LIST').show(); alert('Trying to set the region title dynamically'); $('#RG3_TRX_LIST h1').text(pEvent.data.Name + ' - Transaction List ( ' + pEvent.data.Series.Name + ')'); alert('Finish setting'); alert('Title stored is ' + $('#RG3_TRX_LIST h1').text()); $('#RG3_TRX_LIST').trigger('apexrefresh'); };
I can't eventlistener_initiate function on my page load so that the look for point click event on the bar chart
However I'm putting the 2nd title of subregion dynamically as follows in the code above and who does not.
alert('Trying to set the region title dynamically'); $('#RG3_TRX_LIST h1').text(pEvent.data.Name + ' - Transaction List ( ' + pEvent.data.Series.Name + ')'); alert('Finish setting'); alert('Title stored is ' + $('#RG3_TRX_LIST h1').text());
It would be great if someone can let me know what I'm doing wrong here
Thank you
S
Shas says:
Please find my application as below (authentication of guest/guest)
Thanks for the creation of the example. Makes it very easy to identify the problem...
Theme 20 is one based on the table, legacy theme quirks mode, which means that most of the time he uses tables and cells in a table of structure instead of semantic HTML markup. You assumed that the title of region is properly marked as a h1
element to header. In fact, it is a table with a cell t20RegionHeader
class attribute, which means that the picker jQuery in your function does not select the region title (it does not select anything).
Change the jQuery selector of:
$('#RG3_TRX_LIST h1')
TO
$('#RG3_TRX_LIST .t20RegionHeader')
Unless for some reason any terrible you still support IE6, I suggest to move to a more recent theme of the standards-mode (i.e. no marked with "*").
Tags: Database
Similar Questions
-
Using java script with QML, save a text in a variable of java script and showing in a label
I'm trying to find a way to take a text entered by the user into a text field and display it in a label using java script. The trickiest part is I want to be seen in the label after restarting the application.
Any idea?
Should I use a JS file with functions. If so, what are best practices?Thanks in advance!
This example uses a little bit of C++, I'm not sure if this can be done with purely JS
in your text box or label apply onTextChanged you probably want to have a Setup button to activate & deactivate the area of text, or if they delete it, the text of the label would be erased
. QML
TextArea { id: myTextArea onTextChanged: { myTextArea.text = myLabel.text; //you could also apply ^ to a button's onClicked function etc App.saveValueFor("mySavedText" myTextArea.text); } } Label { id: myLabel text: App.getValueFor("mySavedText", ""); }
App.saveValueFor (); QSettings uses will have to be reset in your ApplicationUI.cpp & .h
.cpp
App is obtained by setting a context property
qml->setContextProperty("App", this);
QString App::getValueFor(const QString &objectName, const QString &defaultValue) { QSettings settings; // If no value has been saved, return the default value. if (settings.value(objectName).isNull()) { return defaultValue; } // Otherwise, return the value stored in the settings object. return settings.value(objectName).toString(); } void App::saveValueFor(const QString &objectName, const QString &inputValue) { // A new value is saved to the application settings object. QSettings settings; settings.setValue(objectName, QVariant(inputValue)); }
all
public: Q_INVOKABLE QString getValueFor(const QString &objectName, const QString &defaultValue); Q_INVOKABLE void saveValueFor(const QString &objectName, const QString &inputValue);
You'll also need to slect the permission of files shared in the descriptor for QSettings bar to work
-
Cannot access a Web site using Java Script
Cannot access a Web site using Java Script. I'm not sure what it blocks I use Win 7, Avast free, AntimalwareBytes.
I get a pop up window with
Name: mcs
Location: http://myspeedtest02.windstream.net
say "application blocked by security settings, blocking the untrusted application.
I don't know what it blocks, but suspect it is related to the security of Windows.
I think that the Java Applet is blocked, but I would like to run this test of speed from my ISP. I tried to access the website of Google Chrome and IE, with the same result. Nobody knows what this block and how to unlock it?This is actually not JavaScript, it's Java. Despite the name, they are really very very different.
Java itself can be dangerous, especially if it is not a trusted application. It is my sincere recommendation that you do not continue.
If you want anyway, you can go into your control panel, open the Java settings and set it to allow untrusted applications.
-
get the id of the component using Java Script
I have three text fields that I am trying to reset it using Java Script in the Joint Strike Fighter. When, in short, all the text fields three triggered event calls the method below and not reset the other two fields to the point.
I need to know what text field is under discussion, so I can reset the other two.
The question that I have does not have the correct id name using evt.getSource ();. I get a big long text for txtField, that looks like: AdfRichInputText [oracle.adf.RichInputText] id = it2
I'm trying to get just "it2", how do I do this?
< af:resource type = "javascript" >
function resetFields (evt) {}
var txtField = evt.getSource ();
Alert (txtField);
If (txtField == 'it2') {}
var var1 = AdfPage.PAGE.findComponentByAbsoluteId ('it1');
var var3 = AdfPage.PAGE.findComponentByAbsoluteId ('it3');
var1. SetValue("");
var3. SetValue("");
}
}
< / af:resource >
Thank you very much.
It worked:
var txtField = evt.getSource ();
ID var = txtField.getProperty ("id"); -Returns the name of id for the event source.
-
How and where to use Java script to create a new button in the page of detail of the object
Hi all
I want to create "New/Add button" in the page of detail of the object. If I'm not mistaken I need to use the java script for this, but could you please let me know how and where to use Java script to create a new button in the page of detail of the CRMOD object.
Thanks in advance.
Kind regards
ManishAny related object on the details of the page should have an 'Add' or 'New' or the two default buttons - it of a vanilla feature and will do the required action.
If you want to change this behavior and do something delicate you will potentially have to to go for javascript. You must add the javascript code in a web custom tab on this object.
Admin--> Application Customization--> Contact--> Applet Web Contact
Now add your javascript in the code box, after selecting the type = HTML for this web applet, expose this web applet on the Contact details page layout and your javascript will be called every time this page is loaded.
Check this document online to see how javascript can be integrated into the CRM on demand http://helponmyproject.com/TTOCOD/
See you soon!
Royston -
The parameters section passes from one form to another form (using java script)
Hello
IAM two forms as A and B
in my form of results of research/B that allows to display the results on the basis.
If I call this shape A it should take the values of A and proceed to page B and run the query.
I have my VO as
Select * from cust_ont_order_details where ORDER_ITEM =: 1;
And I wrote a method called 'initQuery' and the execution of this method as a result and Iam passing here bind values.
' Public Sub SearchParams (pageContext OAPageContext, OAWebBean webBean)
{
CustAttFindASpareViewVOImpl vo = getCustAttFindASpareViewVO1();
String ItemId = "";
If (pageContext.getParameter ("ItemId")! = null & &! pageContext.getParameter("ItemId").equals(""))
{
System.out.println("0001");
StateSearch = pageContext.getParameter("ItemId").toString ();
vo.setWhereClauseParam(0,ItemId);
}
on the other
{
vo.setWhereClauseParam(0,null);
}
}
This works very well if am looking for page B, how can I pass values to a?
IAM using Java script to open the B of a form.Mahesh
If the two are OA pages have your tried using the pageContext.putSessionValue method.
Thank you
AJ -
I'm not able to get the value of an element in the region from the table using Java script
I have a fixation with two columns area, when the user tries to add a new line without having to fill in the line above, then it should throw an exception. It is the custom page and the home region is located at the end of my page so normal exception raises at the top of the page where the end user referred to in the current. I need to go with popup warning. I built a java script in PR
code:
OkButton OASubmitButtonBean = (OASubmitButtonBean) webBean.findChildRecursive ("addrow");
okButton.setOnClick ("javascript: a = document.getElementById ('prompt');" + "alert ('outside ' + (a.value));" +)
"if ((a.value)! = ") {input = alert ('check' + (a.value)) ;}} else {alert (' inside the else'+ (a.value));} ");"
The code above works for entering the message text in the header area, but it is does not make any value if the sub-region of table in advance. Kindly share your point of view on this issue.
This code will give you the same ID only.
Check the "View Source" code generated from the browser. https://support.Google.com/AdSense/answer/181951?hl=en
See you soon
AJ
-
Problem to find the Position of the cursor by using Java Script for an input TextField
Hello
I have a problem to find the position of the cursor in a field inputText component.
The following code of java script to achieve. The same functionality works fine if I run in a simple html page. But when it is used the same javascript inside the jsff does not the position of the cursor.
Please let me know what I'm missing.var adfComponent = AdfPage.PAGE.findComponentByAbsoluteId("r1:1:it3"); var adfComponentClientId = adfComponent.getClientId(); var div = document.getElementById(adfComponentClientId + '::content'); div.focus(); var docSelectionRange = document.selection.createRange(); docSelectionRange.moveStart ('character', -div.value.length); var iCaretPos = docSelectionRange.text.length; alert("iCaretPos --> "+iCaretPos); ---> This statement always returning '0'. Instead, i want the cursor position inside the text box.
For your reference, sending the sample page html that works fine with the same kind of code.
Thank you and best regards,<html> <body style="font-family: tahoma; font-size: 8pt;"> <script language="JavaScript"> /* ** Returns the caret (cursor) position of the specified text field. ** Return value range is 0-oField.length. */ function doGetCaretPosition (oField) { var iCaretPos = 0; alert(oField); if (document.selection) { // Set focus on the element oField.focus (); // To get cursor position, get empty selection range var oSel = document.selection.createRange (); // Move selection start to 0 position oSel.moveStart ('character', -oField.value.length); // The caret position is selection length iCaretPos = oSel.text.length; } // Firefox support else if (oField.selectionStart || oField.selectionStart == '0') iCaretPos = oField.selectionStart; // Return results return (iCaretPos); } </script> <form name="blah"> Text Field: <input type="text" name="nameEdit" value=""> <input type="button" value="Get Caret" onClick="document.getElementById('where').value=doGetCaretPosition (document.forms[0].elements[0]);"> <input id="where"> </form> </body> </html>
Kiran kristelle
Published by: Kiran kristelle on February 6, 2012 12:00... had the chance to look at the source code of the sample. ADF Faces renders text as HTMLTextArea fields when the value of the rows property. The JavaScript code used in the example of client works differently for FF and IE if the input is a text box. This could be a problem in IE or just used JavaScript code. The rows back to a single line (remove) property makes the text as HTML input feldworking with the JavaScript for IE and FF.
Frank
-
How to create indesign using Java Script
I am new to indesign and want to create indesign application using JavaScript.
When I use AppleScript to create the Application Indesign I use this statement
Tell application "Adobe InDesign CS5.5"
myDocument to make document with the properties of the value
tell the end
Application InDesign create successfully.
How to create the Application Indesign using JavaScript?
or what is set equivalent to (tell application "Adobe InDesign CS5.5") in Java Script.
There is a sample java script given on the forum or in the sdk. These departure example with app.
When I debug these java script using ExtendScript ToolKit 3.6 it gives error on app (application not defined). I think that this app AI application object.
How to create indesign application object app in javascript?
Although this script runs successfully when I put these script in C:\Program Files\Adobe\Adobe InDesign CS5.5\Scripts
and executing these script use the Scripts panel (choose window > utilities > Scripts), and then double-click the script name in the Scripts panel in indesign application. But in this case I have indesign application start and then choose window > utilities > Scripts, and then double-click the script name in the Scripts panel.
I want to create Application Indesign (instance), using JavaScript.When I run or (debug) my JavaScript in any javaScript tool as ExtendScript ToolKit 3.6 then Indesign application should start, as in the Apple Script.
Thank you
long story short... NO!
However, if you run the script from ESTK, you need not copy the script in the folder "Scripts". Do not know exactly if that's what you want.
-
How to disable a button using Java Script in Apex
Hi all
I tried to disable a button when the value of an element of the selection in the same page list is zero. Here are the steps that I did.
(1) created a new model of button like < table class = "t9StandardButton" id = "" #BUTTON_ID # "cellspacing ="0"cellpadding ="0"border ="0"Summary =" ">"
2) has changed the model of existing button to the newly created button model.
(3) added onchange = "javascript:fdisplay (this); "the selection list form element value
(4) added the following in the page header java script
< script type = "text/javascript" >
function fdisplay (some) {}
If {(some.value == 0)
html_GetElement (' #BUTTON_ID # "") .disabled = true;
}
on the other
{
html_GetElement (' #BUTTON_ID # "") .disabled = false;
}
}
< /script >
But the script does not work. Is there something I'm missing here. Please advice.
Thank you
VikasVikas:
In the field "attributes button" button type "id ="Ceboutonsélectionnel".
Edit the button template to include the #BUTTON_ATTRIBUTES substitution string #. This should be put in the anchor tag in the template definition.
Change your Javascript to reference the ID above as.... html_GetElement ('thisButton').disabled = true; ....
CITY
-
Change the value of the radio button using Java Script
Hi I have a radio button "Process_mode" with two 'ONLINE' and 'Offline' values.
based on the selection criteria, I will call the process_mode() function and if the user presses the ok button I want to change the proces_mode offline.
Here's my java script.
but it does not change the value of the variable.
Please suggest how to proceed.
function process_mode()
{
confirm_msg = confirm ("your search criteria is complex.") It is proposed to submit the application in offline mode. do you want offline? ») ;
If (confirm_msg is true)
{
$x('p2_process_mode').value = "out of the CONNECTION";
$x('P2_HIDDEN_PROCESS_MODE').value = "offline";
}
}
doSubmit ('BTN_FINAL_COUNT');
Alert ("your application has been submitted. Please wait until the system processes your request.') ;
Thanks and greetings
Ashok Salimath
Published by: user644340 on July 19, 2009 23:11Hey Ashok,
A Radio element generates actually individual boxes within a radiogroup (this is done by giving the same "name" attribute to each key). Each button has its own attribute 'ID', which will be the name of the option page more "_n" - where n is a number from 0 (zero) - so the first button will be, say, "P1_RADIO_0", then the second will be "P1_RADIO_1" and so on.
To set the value of the radiogroup and, therefore, article, you need to 'check' one of the buttons - this is done by setting its 'checked' true value. For example, if "Offline" is the second radio button to the P2_PROCESS_MODE element:
$x('P2_PROCESS_MODE_1').checked = true;
Andy
-
Can I select the non-rectangular regions / paintings by using a script?
I got to look at the VB script reference. Not clear if the Select-region composed of a matrix of points, can actually be anything other than a rectangle.
I'm not familiar with VB, and most of the people that script tend to use JS, because it is cross-platform. However, with js, and I'm assuming that VB you can define an array of points for a selection, and it doesn't have to be a rectangle. the Select region perhaps only for a retangular region, but you should be able to create a selection in any desired shape.
-
Calculating a due date in XI from Adobe using Java script...
I have two fields in a form. One with the current date is calculated by the following:
var f = this.getField ("Today"); f.value = new Date();
The second field, I try to add 7 days to the, but I can't understand it. What script do I need to add in the existing field is filling date and add the new field to fill out this information. I tried a lot of what I found on the internet but nothing seems to work...
"In addition, please note that I use the ' Document Javascripts" Editor-in-Chief of Adobe Pro XI.
Any help is appreciated
It is possible. To make it work as you want, the custom in the field today calculation script should be:
Custom calculation script
(function () {}
Get a reference to the DueDate field
var f = getField ("DueDate");
If (event.source & event.source = f) {}
Proceed with this script if it is triggered by a change in the DueDate field
return;
}
Update the value of this field to show the current date
var d = new Date();
Event.Value = util.printd ("mm/dd/yyyy", d);
Add seven days to the date of the day
d.setDate (d.getDate () + 7);
The DueDate field update
f.Value = util.printd ("mm/dd/yyyy", d);
})();
But first remove the DueDate field calculation script. If you do not the unalterable DueDate field, a user will be able to change, but it will reset when any field value changes.
-
Show/hide buttons using java script...
I would use a list box to select the buttons are visible. I found the following on another page script and tried to make it work for my
situationif ((getfield(class_select").value =="10th Grade English")
{
getField("competency_10").display = display.visible;
GetField ("objective 10"). Display = display.visible;
}
on the other
getField("competency_10").display = display.hidden
getField("objective_10").display = display.hidden
I nominated the list box "select class" and I have 2 sets of buttons, a set of skills and a set of objectives.
I get an error message. Basically I would like that this too happen. When I select 10th grade English in the skills/goal list for 10 grade English buttons become visible. When I select English grade 8 the jurisdiction/goal for the grade 8 English buttons become visible. I use a button with the pop-up window to populate a text field. I created buttons 8th grade and grade 10 and I would not have only one I need visible when I need it. I was going to fix the buttons on top of the other and allow the use of the same text box when it is visible. If there is another way to do it I am open to suggestions, but it seemed easier to just make my buttons visible/hidden. I don't know that I've screwed something I do not know what
OK, thanks for the clarification. If you set the drop-down list box "select value Commit immediately" on the Options tab, it should behave as you wish.
-
Color chart rename using Java script
Hi friends,
I tried to rename the shades by using the following script,
This does not work for the tinted shades. Can you please help me to solve this problem.
myDocument var = app.activeDocument;
for (i = 4; i < myDocument.swatches.length; i ++)
{
var mySwatchName = myDocument.swatches.item (i) .name;
myDocument.swatches.item (i) .name = "XX_" + mySwatchName;
}
our var = myDocument.swatches.length - 4;
Alert ("DONE and" amendments + "renowned color chart");Thanks in advance...
Hello
I copied the code and tried again, but it does not work because "Tone" was cut out by the SPACE such as 'T int' when I pasted here.
I pasted the code again, but it will be added SPACE between 't' and 'int '. ??? Sorry, please delete SPACE and try again.
{if (myDocument.Swatches.Item (i) .getElements () [0] .constructor.)} (Name==='Tint')}
It works for me on OSX 10.6.4 + InDesign CS3, CS4.
Shade of gradient swatches ==> renamed
Tint Shade ==> based on color chart
Thank you
Maybe you are looking for
-
My profile on my old laptop has become corrupted and I can't log in with my regular account (admin). I would like to add and merge bookmarks former firefox to another laptop, which already has existing bookmarks. I can not simply copy and paste the p
-
Qosmio G20-120 - disabling audio?
HY can someone pls me say how can I disable the audio chipset of my qosmio g20-120 portable? I want to buy a card its audigy pcmia for my system surround logitech... thx allot
-
It is back to LV2012 that the terminals of dynamic events are displayed by default?
Between writing the title of this question and the drafting of this body, I realized my 'mistake' - which is between a function and a bug: If you drop a handler Structure in a given range from space empty diagram, the structure fell with the Terminal
-
laptop 11: download doc files
My son's computer crashed and had to reset it. Update Windows defender set and firewall on. I can't put Norton back on it and it won't let me open the doc files. He needs it for school. Any help on download Norton and kick-off windows Defender? Any i
-
Help please w / Pavilion dv9008nr LightScribe SuperMulti 8 X drive
I inherited this PC HP and it will not read the DVD and the specs say that it has been issued with LightScribe SuperMulti 8 X drive. How can I get it works the DVD? Do I need an update of the decoder? Download Driver? From where? LightScribe is