Set Checkbox Stype with JavaScript
Hi..
I have an issue in setting the checkbox style to "Cross" when the form load happens.
Can anybody tell me how to write the script and what event to use in order to see the checkbox as crossed in the preview.
Hi,
First off, it would be better to set this at design time in Designer. See the Object > Field palette.
If you need to dynamically change the mark style, then there is an example here where you can set the mark style of the checkbox using script: http://assure.ly/kp60nk (see the third set at the bottom of the page).
The docReady event would be a good event to use for this.
this.ui.oneOfChild.mark = "cross";
Hope that helps,
Niall
Similar Messages
-
Setting User Preferences With Javascript In Acrobat X
Hi All,
Is there a way thru Javascript to programatically set a value in the User Preferences?
I am trying to create a batch sequence that exports PDFs to HTMLs. In the Acrobat X preferences, there is a conversion option that sets the option of "Run OCR If Needed" to true or false.
Edit --> Preferences --> Convert From PDF --> HTML --> Run OCR if needed (True|False)
Depending on conditions, I need to programtically set the value of this preference during the batch sequence before I export the document to HTML. Is this possible? Any help would be greatly appreaciated.
Thank you,
TeriThere are very few user preferences that can be controlled with JavaScript, and this isn't one of them.
-
Set multiple items with javascript function in chart link
Hi Folks
I am able to use the javascript $s function to set the value of one item from a chart link. I need to pass values to multiple items.
Is there a way to use javascript function to pass values for multiple items on a page from a chart link
Appreciate your responses
Thanks
GopalHi Arnau,
You need to surround your JavaScript code like this (without the spaces before and after script):
< script language="Javascript">
window.open("<%=ABAP_VARIABLE%>").focus();
</script >
Regards,
Patrick. -
Set checkbox session state using Jquery / dynamic action
Hello Folks,
I'm trying a simple dynamic action to disable & set element value upon making a radio box selection.
What I'd like is:
a) if i chose "Vendor" as "Traditional" (default value) I would like to set the "SNAP" flag as Checked and "Status" textbox to "test for static value" (SNAP flag is not set, only works on Page load)
b) if i chose "vendor" as "Isilon" then "SNAP" flag should be greyed out (disabled) and "Status" textbox should be disabled. (Working as Expected)
Link to the page:
http://apex.oracle.com/pls/apex/f?p=73069:6:0::NO:::
Workspace: wksp_chandu
Username: test
Password:test
Dynamic Action
Identification
Page:
6. Check Disable radio
*Name(Value Required)
*Sequence(Value Required)
When
*Event(Value Required)
- Select Event -
Change
Click
Double Click
Get Focus
Key Down
Key Press
Key Release
Lose Focus
Mouse Button Press
Mouse Button Release
Mouse Enter
Mouse Leave
Mouse Move Page Load
Page Unload
Resize
Resource Load
Scroll Select
After Refresh
Before Page Submit
Before Refresh
Change Order [Shuttle]
Custom
Show unsupported...
*Selection Type(Value Required)
- Select Selection Type -
Item(s)
Button
Region
DOM Object
jQuery Selector
*Item(s)(Value Required)
Condition
- No Condition -
equal to
not equal to
greater than
greater than or equal to
less than
less than or equal to
is null
is not null
in list
not in list
JavaScript expression
*Value(Value Required)
True Actions
The following actions will be fired when the 'When' condition is met, or when it is 'No Condition'.
Edit
Sequence
Action
Fire On Page Load
Selection Type
Affected Elements
10
Clear
Yes
Item(s)
P6_SNAP
P6_STATUS
20
Disable
Yes
Item(s)
P6_SNAP
P6_STATUS
Add True Action
False Actions
The following actions will be fired when the 'When' condition is not met.
Edit
Sequence
Action
Fire On Page Load
Selection Type
Affected Elements
10
Enable
Yes
Item(s)
P6_SNAP
P6_STATUS
30
Set Value
Yes
Item(s)
P6_STATUS
40
Execute JavaScript Code
No
Item(s)
P6_SNAP
Add False Action
Thanks!
ChanduOops...I just got it working.. Thanks for your time. I was trying to set checkbox value via javascript code and somehow that wasn't working...Finally changed the setvalue to be based on "PL SQL expression" nvl(:P6_SNAP,1)...that seem to have worked.
Thanks again ! -
Setting shadow with Javascript
For some odd reason, none of the Indesign's VBA-scripts works with InDesign CS5 anymore, maybe then reason is Office 2010 64-bit.
Anyway, Javascript works just fine, but I'm having difficulties to write following script with JavaScript. Can anybody help?
Simply script by setting up drop shadow for an active object.
Set myInDesign = CreateObject("InDesign.Application")
Set myObject = myInDesign.Selection.Item(1)
myObject.transparencySettings.dropShadowSettings.angle=135
myObject.transparencySettings.dropShadowSettings.opacity=33
myObject.transparencySettings.dropShadowSettings.distance=1
myObject.transparencySettings.dropShadowSettings.mode=2020623440
myObject.transparencySettings.dropShadowSettings.blendMode=1852797549Hey!
Here is the same code in JavaScript:
var myObject = app.selection[0];
with(myObject.transparencySettings.dropShadowSettings){
angle = 135;
opacity = 33;
distance = 1;
mode = ShadowMode.DROP;
blendMode = BlendMode.NORMAL;
Hope that helps.
tomaxxi
http://indisnip.wordpress.com/
http://inditip.wordpress.com/ -
Setting own security handler with JavaScript
Hi,
I build the security handler plugin example (SecurityHandler.api) and installed it. Then I wanted to set this handler via JavaScript to a document but I have no access to it. If I list all handlers (security.handlers) in a trusted function only the standard handler occur. If I change the security settings via Adobe I have the handler listed in the drop down box. I am using Acrobat 8 Professional.
Many thanks for your advice in advance!
Regards
JörgIan,
As a general statement, wireless networks are inherently insecure.
"I have now switched off the broadcasting of the name.
What level of security is this?
If this is all you have done, roughly speaking, your network is just as
(in)secure as it was when you plugged in the router.
Do you have file or printer sharing turned on? Are your Mac firewalls
stealthed and refusing UDP packets? Will the router accept any inbound
request for an internet connection? Have you changed the default password
on the router?
The answers to these questions speak to the relative (in)security of your
Macs.
Is your son using any form of encryption, say, WEP, or, preferably, WPA?
If not, your network is less secure.
"We live in a quiet cul-de-sac where any strange people or cars would be noticed immediately, so we are probably not so vulnerable to wireless-hackers as others might be. Or am I living in a "fool's paradise"?"
Yes, and here's why.
"Does anyone know where I might be able to get hold of some reasonably simple, step by step instructions."
I was going to suggest reading the router's manual, but it is pure and utter
fertilizer. Looks as though a marketroid (who knows some buzzwords but
not their meanings) patched that monstrosity together using the user
menu storyboard walk-through and a lot buzzword-laden filler "lifted"
from the Web.
Would it be humanly possible to run an ethernet cable from your router to
where your son computes and turn off the wireless?
Since I don't own one, I can't help with a primer on securing it. Sorry.
-Wayne -
Dynamically set y axis (position) with javascript
Hello
I wonder if it is possible with javascript to set a y position of flowed subform in non interactive adobe form?
For example: For a certain subform which is inclued in (flowed) main I want to be shown at certain vertical (y) position but only in the last page at bottom of main.
Last page I can find with
if(xfa.layout.page(this) == xfa.layout.pageCount())
but when changing
this.y = "100 mm"
it doesn't changes subform position.
I also tried with this.y = "100in", but result is the same.
Does anybody now a solution?It's not a field, it's a complete subform with a table and some texts fields, which I want to show only in last page.
I tried changing subform to a positioned already before and changing it's y axis in javascript (tried in all events) doesn't work.
Could it be that syntax posted in first post isn't correct?
In that case (positioned subform) I have blank space on all pages but last one. For example, if a complete layout of a page is 100%, main 70% and subform 30%, I get 30% of blank space on all pages before last one, which I would like to avoid, so that main would be 100% in every page but last one and in the last one main should be only 70% and subform 30%. -
Dynamically set checkbox with actionscript
I'm trying to set checkboxes to selected/unselected based on
variables pulled from a database.
Problem is when the script is run is stops at this code
(where cb is the id of a checkbox):
cb.selected = true;
The code compiles fine with no errors or warnings.
Why isn't it possible to set the selected value of checkboxes
through actionscript? Anyone have any ideas or workarounds?
Thanks in advanceFound a solution - here for anyone else who needs it:
http://www.brucephillips.name/blog/index.cfm/2006/11/16/Dynamically-Create-CheckBoxes-Thei r-Labels-And-Their-Select-Values-In-Flex -
Open and Close Popup With Javascript
Using Apex 3.2
I have probably done this loads of times in my old job, but do not have access to the code and today I just can't get it to work properly.
I have opened a pop up window with javascript
Now I need to close it and refresh the calling page, but only if it passes the validation on the popup.
I have a hidden item on my pop up called P7_FLAG.
I have a page process after validation that sets P7_FLAG to (only set to 1, if passes validation).
I also have a SUBMIT button.
So once I click my SUBMIT button the page should look at the validations, if ok, set P7_FLAG to 1, then close the popup and refresh the calling page.
My current javascript look like this
<script type="text/javascript">
function saveChanges(){
doSubmit('SUBMIT');
var test = $x('P7_FLAG').value;
if(test == '1')
window.close();
window.opener.doSubmit('REFRESH');
</script>On my button
javascript:saveChanges();The problem is that I need to click the SUBMIT button twice.
First time it sets P7_FLAG
Second time it closes page and refreshes.
I have probably made some basic error, but today I cannot see it.
Cheers
Gus
Edited by: Gus C on May 10, 2012 12:48 AM<script type="text/javascript">
function saveChanges(){
doSubmit('SUBMIT');
var test = $x('P7_FLAG').value;
if(test == '1')
window.close();
window.opener.doSubmit('REFRESH');
</script>javascript does not wait for the current action to complete and then perform the next line.
means in your function call
doSubmit('SUBMIT');is triggered and it carry on's to next line that is
$x('P7_FLAG').value;this will not be set because you are setting the value of P7_FLAG to 1 in plsql and trying to check in javascript, which will not work.
what you need to do is amend your js function like below
<script type="text/javascript">
function saveChanges(){
doSubmit('SUBMIT');
</script>create a page branch to procedure and make it conditional to when P7_FLAG = 1
and set the branch source to below
htp.p('window.close();');
htp.p('window.opener.doSubmit(''REFRESH'');'); -
How to get real value from selectOneChoice with javascript?
Hi,
How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
JSF page:
<af:resource type="javascript">
function parseAddress(event)
alert("new value: " + event.getNewValue());
</af:resource>
<af:selectOneChoice label="Location:" value="" id="soc4">
<af:clientListener type="valueChange" method="parseAddress" />
<f:selectItems value="#{Person.locations}" id="si7"/>
</af:selectOneChoice>
HTML :
<option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
<option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
Thanks a lot.Something I was missing ,
You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1">
<af:form id="f1">
<af:panelBox text="PanelBox1" id="pb1">
<af:selectOneChoice label="Set Log Level" id="soc1"
value="#{SelectManagedBean.loggerDefault}"
valuePassThru="true">
<af:selectItem label="select one" value="First" id="s6"/>
<af:selectItem label="select two" value="Second" id="s56"/>
<af:clientListener method="setLogLevel" type="valueChange"/>
</af:selectOneChoice>
<af:resource type="javascript">
function setLogLevel(evt) {
var selectOneChoice = evt.getSource();
var logLevel = selectOneChoice.getSubmittedValue();
// var logLevelObject = AdfLogger.NONE;
alert("new value is : " + logLevel);
//alert(evt.getSelection);
//alert(logLevelObject);
evt.cancel();
</af:resource>
</af:panelBox>
</af:form>
</af:document>
</f:view>
</jsp:root> -
How to Set Field value using javascript?
I have a Field in First Page called 'SO'. I want to populate this field from the field value of SD_ITEMS.DATA.VBELN first row in the each page. Please help me with javascript to set this value.
Thank you.
RanjiI have a Field in First Page called 'SO'. I want to populate this field from the field value of SD_ITEMS.DATA.VBELN first row in the each page. Please help me with javascript to set this value.
Thank you.
Ranji -
The combination of report with javascript
Hi guys,
I want to use report combined with javascript as follows:
<APPLET NAME="ASMGridAppAssembly" ...
PARAM NAME="QueryTemplate" VALUE="..../Reports/PTSD/AsmNCMFRXQuery">
<PARAM NAME="DisplayTemplate" VALUE=".../Reports/AsmGrid">
<param name="Param.1" value=>
<param name="Param.2" value=>
</APPLET>
document.ASMGridAppAssembly.getQueryObject().setParam(3,Param3);
document.ASMGridAppAssembly.getQueryObject().setParam(4,Param4);
Can I achieve this?
Thanks,
Tony.
Edited by: Tony Hu on Aug 8, 2008 7:07 PMMike - Huh? If javascript is called to an active applet on the page that received Param.1 and Param.2 through param overrides in the html (like shown in Tony's post) they will absolutely override any static ones that are in the query template itself.
Tony - you need to instruct the applet to run the query with your 2 new parameters, so add this line after setting param 3 and 4:
document.ASMGridAppAssembly.updateGrid(true);
Regards,
Jeremy -
XML IDOC post to R/3 Via WAS - want to see error content with JavaScript
Hi,
I am posting XML IDOCs to our R/3 system via a webpage that I have built with JavaScript. I am posting to the WAS, which is configured to read the XML IDOC with SAP's standard class handler CL_HTTP_IDOC_XML_REQUEST. We are on basis 620 support pack SAPKB62041.
In my webpage, I have the JavaScript code set to read the status and statusText so I can see the response from WAS when I post my XML IDOC. However, I am getting back very generic information when I encounter a 409 error. THe statusText is always "input_not_found". So I debugged the class handler code and found that SAP is returning back the more descriptive error info in HTML format.
I ran a packet sniffer to see what WAS returns and the info looks like this:
<html><head><title>IDoc-XML-inbound not ok</title><h1>IDoc-XML-inbound not ok</h1></head><body>
E:Table Lookup Error:300 Cannot map value for field MESCOD in table ZFI_IF_IDOCORG using values
SNDSAD = |TE| and RCVLAD = |GL| and MESTYP = |ACC_DOCUMENT|</body></html>
I want to know how I can get my webpage to read this HTML info and store that into an alert so I can read this text that I'm returning back to the HTTP post.
This is how my script looks. I'm using IE6.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Test XML</title>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function XMLHTTPButton_onclick(DataToSend) {
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.Open("POST","http://some_server:1089/sap/bc/zxml_idoc?sap-client=200&sap-language=EN",false);
xmlhttp.setRequestHeader("Content-Type", "text/xml");
xmlhttp.send(DataToSend);
alert(xmlhttp.Status);
alert(xmlhttp.statusText);
alert(xmlhttp.responseXML.xml);
//-->
</SCRIPT>
</head>
<body>
<BR>
This page posts to
<BR>
http://some_server:1089/sap/bc/zxml_idoc?sap-client=200&sap-language=EN
<FORM name=xmlform method=post >
<P><TEXTAREA style="WIDTH: 623px; HEIGHT: 369px" name=xmlData rows=23 cols=77>
</TEXTAREA>
<P>
<INPUT type="button" value="Submit XMLHTTP" id=XMLHTTPButton name=XMLHTTPButton
LANGUAGE=javascript onclick="return XMLHTTPButton_onclick(document.xmlform.xmlData.value)">
</form>
Previously with this class handler, SAP returned the detailed info back to the "alert(xmlhttp.statusText)" and I had no problem seeing the return info. But now they have decided to format it in HTML and I don't know how to view this text since it has no ID on it to pull this into an alert box.
If anyone has any ideas, please let me know.
Thanks,
AndreaOk!
I have solve the problem. So, I was trying to connect via SSO within an user that was not registered in R/3 and I forgot it.
Sorry for the inconvenience. -
Printing PDF attachments with Javascript?
I am very new to Javascript (and not a programmer) so please excuse my basic or un-correct terminology here! I've created an interactive pdf, and have set buttons (with javascript code) to print specific ranges of pages from the document. I've now been asked to have said buttons print attachments (which are also pdf's) in the same style... is this possible, and if so, does anyone have example code? The code that I used to print the page ranges, for example:
print ({nStart: 0, nEnd: 5});
Any assistance/guidance/help would be greatly appreciated!The document first has to be opened. You can do this via JavaScript with the doc.openDataObject method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.509.html
This method returns a doc object, which you can use with the print method to print the document. You should then use the closeDoc method to close the document, as mentioned in and demonstrated in the documentation linked to above. -
C# control event handling with javascript
How can I get javascript to execute for "onchange" / "OnSelectedIndexChanged" event instead of a CodeBehind method? I think "OnSelectedIndexChanged" event has to be handled by CodeBehind; but how can I replace that (or onchange) with
a javascript event handler?
I have the following in my xyz.ascx file:
<asp:DropDownList ID="ddlTypeCar" CssClass="BatsRefAddressTypes" runat="server"
onchange="javascript: testAlert();"
OnSelectedIndexChanged="ddlTypeCar_SelectedIndexChanged"
AutoPostBack="True" />
I could not get the javascript to execute, even though I removed OnSelectedIndexChanged="ddlTypeCar_SelectedIndexChanged" and/or set AutoPostBack="false".
Additionally, I tried added the following in xyz.ascx.cs Page_Load() method.
ddlTypeOfAddress.Attributes.Add("onchange", "javascript: testAlert();");
which didn't help.
Thanks for your help in advance.Hi,
you can control client events instead of server events with javascript
look this url for more information
http://www.w3schools.com/js/js_events.asp
Regards
Maybe you are looking for
-
Adobe Bridge CS4 causes Blue Screen of Death! Help?
Can anyone help? I keep getting a Blue Screen of Death every so often when I am using Adobe Bridge CS4 and another program, either Photoshop or Bryce or Cinema4D. When I have been working in the other program for a while and attempt to return to Brid
-
Why can I not attach multiple files on iPad ???
Why does iPad not allow multiple files to be attached. This is one of the very basic feature all computers must have...why is apple trying to complicate the like of people without this simple feature ??????? Please add this feature in your iOS update
-
Hi , I have a portal deployed in a solaris server.If I have to get the exact copy in another portal server deployed in another machine , can I adopt the following steps - The directory tree in both the servers are different. Shall I export the portal
-
Hi all, is there any rman scripts that I can download and put to production? thanks andrew
-
Aggregation in column expression is not working in 11.1.1.7.1
Hi Guru's, After upgrading the application from 11.1.1.6.8 to 11.1.1.7.1 Aggregations in the column expression is not working. I was using the below formula in the column expression 100.0* (Sum((CASE WHEN Service Level >= 60 THEN 1 ELSE 0 END)) / COU