How to access htmlb elements in a Tray using JavaScript?
Hi All,
I am working on a BSP app using MVC. I am trying to validate a couple of input fields, on a button click (OnClientClick) event.
I am able to validate the input fields if they are outside the tray. But i am not able to get it run through the JS code, when the input fields are in a tray.
Thanks for you time...
Regards,
Chen
Hi All,
Yes DuraiRaja - i am using the document.getElementById(' ').
In my app, I have a Main controller calling a View - Default.HTM,
This Default.HTM, in turn loads up three trays T1, T2, T3 and these tray elements in turn call up the controllers ctrl1, ctrl2, ctrl3 associated to them.
CTRL1 calls a view - View1 - V1.htm, which has the below code.
And on the below page all that i am trying to do is validate if "FieldVal" is blank or not.
I get an error on IE as "Object required"
I get a HTTP 501/505 error when i try to upload the code.
Thanks all !
Similar Messages
-
How to access the element s in a hashMap with order
Does anybody know how to access the elements in a hashMap with order.
I know set is a collection that doesn't gaurantee the order so the iterator of keySet will not gaurantee the order.
Is there any way to solve this?
ThanksIf you mean the order in which the key/value pairs where added to the
map, have a look at the LinkedHashMap class. If you mean 'natural'
order, you shouldn't be using a HashMap at all then; have a look at the
TreeMap class instead.
kind regards,
Jos -
How to access XML elements by name in Extendscript??
I'm almost done the script that I've been working on, but something has been nagging me since I started. When I did start, I looked at the JS Tools Guide CS5 that comes with the extendscript ide to check how to access XML elements, children, attributes etc. It says this:
The XML object represents an XML element node in an XML tree. The topmost XML object for an XML file
represents the root node. It acts as a list, which contains additional XML objects for each element. These in
turn contain XML objects for their own member elements, and so on.
The child elements of an element tree are available as properties of the XML object for the parent. The
name of the property corresponds to the name of the element. Each property contains an array of XML
objects, each of which represents one element of the named type.
So basically it converts the XML into JSON. And you can access the properties like so:
<book category="COOKING">
<title lang="en">The Boston Cooking-School Cookbook</title>
<author>Fannie Merrit Farmer</author>
<year>1896</year>
<price>49.99</price>
</book>
The Javascript statement bookstoreXML.book; returns the entire list of books.
The statement bookstoreXML.book[0]; returns the XML object for the first book.
The statement bookstoreXML.book[0].author; returns all authors of the first book.
A couple pages down it talks about Retrieving contained elements using children(), elements(), descendants().
So now I look through the XML Object properties and I see that I can use:
xmlObj.child (which) which A String, the element name, or a Number, a 0-based index into this node’s child array.
or
xmlObj.descendants ([name])
name Optional. A String, the element name to match. If not provided, matches all
elements.
or
xmlObj.elements (name);
name Optional. A String, the element name to match. If not provided, matches all
elements.
This is an excerpt of an XML I was working with:
<ROW xmlns="http://www.filemaker.com/fmpdsoresult"
MODID="16"
RECORDID="11128">
<Sign_Type>251.dr</Sign_Type>
<fm:Location xmlns:fm="http://www.filemaker.com/fmpdsoresult" xmlns="">5-5024</fm:Location>
<Line1>Zone
Floor
3
Patient Rooms
R532 - R436 even
Patient Rooms
R522 - R446 even
Xavier Elevators
Zone
Patient Rooms
R537 - 5757 odd
Main Elevators
Zone</Line1>
</ROW>
Extendscript will not give me an anything when I try to access elements by name. Instead I have to access by index, which works, but I'd rather search for names!
Actually the console log returns: <![CDATA[]]>
What am I doing wrong!?First, those E4X XML objects are definitely no JSON (plain data) - they have a multitude of methods, even for tasks that would easily be implemented as property (e.g. the length() function), and they also bind xml element and attribute names onto the objects, allowing to target a multitude of XML nodes with a single statement. Or did you mean your script with that "it"?
Anyway, as you found out the ExtendScript XML object handles namespaces mostly by hiding them from you.
You could play around with global namespace settings, see the JavaScript tools guide.
You could also explicitly specify a namespace. This works for me:
$.writeln(myXML["fm:Location"]);
For simple use I had most success with a brute force approach that just strips the namespaces.
function removeAllNamespace(xml)
var ns =new Namespace();
var d=xml.descendants();
for (var i=0;i<d.length();i++)
d[i].setNamespace(ns); -
How to access the value of application item in javascript
How to access the value of application item in javascript?
Hi,
One way
var myVariable = '&MY_APP_ITEM.';Br,Jari -
How to access the Text Frame, when we use scrollable frame,
Hi Friends,
How to access the Text Frame, when we use scrollable frame,
Thank you,
[ Nav ]That's the same question:
how can I access something (a page item) on a page…
Answer: you need something unique in that object you can get a handle on.
Or you use the selection a user of your script is doing and work with that selection…
A "scrollable frame" is nothing special. What it makes it a "scrollable frame" is the DPS software.
So you have to look for attached labels on the object, that identify the object for the PDS plug-in "Overlay Creator" as a "scrollable frame". That's possible with the "extractLabel("KeyString")" function. But you need to know the appropriate key-string in advance.
In another of your thread in the DPS forum, I basically answered the question how to obtain those key-strings.
When knowing the key-string you could loop through all your page items (you can skip all text frames) in the allPageItems-collection, to identify the "scrollable frame" by extracting the right label.
If you have more than one "scollable frames" you need a second unique identifier for the particular object.
That could be nearly any property.
Keep in mind, there is no "scrollableFrames" collection in the DOM !
Uwe -
How can i read XML from local drive using Javascript into Live Cycle
Hello,
I am creating PDF Form using Acrobat LiveCycle.
I want to write java script for load data into relative field and data present into xml file which is located at local drive
I have write all method for parsing xml which is required ............... but i am stuck into how to read/open/load local drive xml using javascript?sandyrock:
You'd better post this message to Adobe LiveCycle forum: http://www.adobeforums.com/webx/.3bbeda8d/
You can use postMessage method in LiveCycle JavaScript to communicate with host application,the host application can be a web brower like IE.
In IE you can use IE javascript to access local XML file. -
How can I automatically close a dialog box using Javascript after I click the OK button to submit it? I don't want to have to X out of the dialog box after I am done.
Thanks
LindaJS can not interact with open dialogs in any way, unless it's a dialog
created in JS using the Dialog object.
On Thu, Jul 24, 2014 at 11:13 PM, lindaeliseruble <[email protected]> -
How to hide a table row in pdf using javascript?
How to hide a table row in pdf using javascript?
This is only possible with LiveCycle Designer forms, not PDF forms created
in Acrobat. -
How to read data from the data provider using javascript
Hi,
Please let me know how to read the data from the dataprovider using javascript(query assigned to the data provider).
My query has filter charateristics, free charateristics, charateristics in rows and key figure in column.
Thanks a lot for your kind help
Regards
KandasamyKandaswamy,
Assign an ID to your table item , then in JavaScript , you can use ID.innerHTML and you will get the HTML code within that table for the same , then you can find out how best to get the exact value you desire from the innerHTML value which is a string with the entire HTML from within the table item.
Arun
Hope it helps.... -
How to dynamically create a treeview in sharepoint using javascript or jquery
How to dynamically create a treeview in sharepoint using javascript that displays spsites ,spweb,splist
Hi,
In SharePoint 2010, we can customize web service and use Server Object Model to get all the SharePoint sites, webs and lists, then call the web service using jQuery and using the jQuery Treeview plugin to display the data.
The following articles for your reference:
Walkthrough: Creating a Custom ASP.NET Web Service
https://msdn.microsoft.com/en-us/library/office/ms464040%28v=office.14%29.aspx?f=255&MSPPError=-2147217396
Using Jquery to call an ASMX service in sharepoint 2010
http://stackoverflow.com/questions/9035539/using-jquery-to-call-an-asmx-service-in-sharepoint-2010
jQuery-ui Treeview
https://plugins.jquery.com/btechcotree/
Best Regards,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Hi All,
This is the xml that needs to be processed.
<?xml version="1.0" encoding="ISO-8859-1"?>
<com.companyx>
<person>
<employee.data>
<employee.name>mrx</employee.name>
<employee.number>1001</employee.number>
</employee.data>
<employee.data>
<employee.name>mry</employee.name>
<employee.number>1002</employee.number>
</employee.data>
<employee.data>
<employee.name>mrz</employee.name>
<employee.number>1003</employee.number>
</employee.data>
<page>0</page>
</person>
</com.companyx>
Please tell me how to access the <employee.name> value of
the first <employee.data> element.
An early help is much appreciated.......
Thanks in Advance,
Vijay KarthikGive this a try... should do the trick
trace(myXML.person["employee.data"][0]["employee.name"]) -
How to access an element using its name or id if it is not a class variable?
I am trying to retrieve the element I added to my UI in a different function. I am using actionscript 3. I know I can put the variable into a class variable, so it can be access anywhere in the class, but I have too many elements. Is there anyway I could access them without putting them into class variable?
Thanks.
public class Test extends SkinnableContainer{
// private var image:Image; <-- I try not to do this, too messy
private function func1() {
var image:Image = new Image();
addElement(image);
private function func2() {
var image:Image = /* how to get the element from my UI without putting into class variable */Here is what works for me:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="init()"
minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import spark.components.Image;
private var image:Image;
private function init():void
image = new Image();
addElement(image);
trace(this["image"]);
]]>
</fx:Script>
</s:Application> -
How to access PPC contacts into my application using Flash
Hi,
I am new to flash lite anybody help me how to access PPC
contacts into my application.Hi,
I am new to flash lite anybody help me how to access PPC
contacts into my application. -
How to set radio button from radio group using javascript, HTMLB
Hi guys,
I am trying to set one radio button as checked, from my radio button group using javascript.
This is the code:
<hbj:radioButtonGroup id='TRAIN_SUB' columnCount="1">
<hbj:radioButton id="TRAIN_SUB0" text="Not Applicable" key="NA" disabled="true" />
<hbj:radioButton id="TRAIN_SUB1" text="SDF" key="SDF" disabled="true" jsObjectNeeded="TRUE"/>
<%
ssTrainSubsidy = new String(MAIN_FORM.getParamIdForComponent(TRAIN_SUB));
%>
</hbj:radioButtonGroup>
in javascript, i am using this:
/document.getElementById('<%= ssTrainSubsidy%>')[2].checked =true;
I also tried to access the radiobutton directly, using
ssTrainSubsidy0 = new String(MAIN_FORM.getParamIdForComponent(TRAIN_SUB0));
but it has null pointer error.
but always have error, anyone can help? thanks!!
Edited by: Feng Guo on Aug 12, 2010 3:44 PMdocument.getElementById(radioid).checked =true;
this code will work to select the radio button (set). i think there is a error in the id you placed in ID. place the Radio butoon id and check again. Check this thread on [setting a Radio button|Setting HTMLB RadioButtonGroup Selection using JS;
regards,
Mahesh -
How to display Images stored in a database using javascript
Hi.
I have some images stored in a table and I need to display them using javascript. The images are stored in BLOB columns: I would like to know if I can put them on a directory and then get it from there using BFILENAME function.
Any suggestion?
Regards,
JeannineHi All,
Yes DuraiRaja - i am using the document.getElementById(' ').
In my app, I have a Main controller calling a View - Default.HTM,
This Default.HTM, in turn loads up three trays T1, T2, T3 and these tray elements in turn call up the controllers ctrl1, ctrl2, ctrl3 associated to them.
CTRL1 calls a view - View1 - V1.htm, which has the below code.
And on the below page all that i am trying to do is validate if "FieldVal" is blank or not.
I get an error on IE as "Object required"
I get a HTTP 501/505 error when i try to upload the code.
Thanks all !
Maybe you are looking for
-
Outgoing payment to customers should not go to alternate payer
Hi all, When you do an outgoing payment run for customers (for paying rebates), the payment is going to the alternate payer set in the customer master. But we need the payment to actually go to the individual customers and not the alternate payer. Is
-
How can I get client IP address in portlet (servlet) ?
How can I get client IP address in portlet (servlet) ? request.getRemoteAddr() return server IP. May be I must use Portal API, which extend Servlet classes, but I can't find this. Can any help me?
-
Really old apple ID all of a sudden asks for a credit card and wont allow me to continue?
I've had my apple ID for about 6 years now. It asked me to review the terms to continue and poof. All of a sudden I can't continue without a credit card. Anyone know how the **** to by pass this?
-
Running Windows 7 64, when installing, I get the error, 'itunes encountered an error and could not configure'. Ideas?
-
Pagination and Reset Pagination
I do not understand what pagination means and what "reset pagination" does. I think I need an example where I can observe the difference between using or omitting a pagination reset. I created a page with a report and a search tool. Apex created auto