Javascript conditional check
Hi,
See Javascript below.
I'm trying to pop-up a warning message window conditionally if P410_BOARD_GROUP_TYPE_ID = 6 and the user selects a different value in the Select List. It seems ilke I am either A) passing in the value of P410_BOARD_GROUP_TYPE_ID incorrectly, or B) choosing the wrong type of event handler. Can someone spot where I'm going wrong? It's as though the function isn't even being calling on my page when I run it.
<b>In the HTML Form Element Attributes box for P410_EMULATION:</b>
onSelect=beware('P410_BOARD_GROUP_TYPE_ID');
<b>In the HTML Header:</b>
<script language="JavaScript1.1" type="text/javascript">
function beware()
if(html_Element('P410_BOARD_GROUP_TYPE_ID')=6)
{(!(confirm('Warning! This will change all Timers to default values. Continue?')))}
{html_GetElement('P410_EMULATION').focus()}
</script>
Hello,
First you didn't make all the changes that were suggested before
this
<script language="JavaScript1.1" type="text/javascript">
function beware()
if(html_GetElement('P3_BOARD_GROUP_TYPE_ID')==6)
{(!(confirm('Warning! This will change all Timers to default values. Continue?')))}
{html_GetElement('P3_EMULATION').focus()}
</script
still wouldn't work anyway
now what you need to do is either supress or allow doSubmit in your javascript.
So first change the select to a regular select so the proper onchange is applied
Second use this javascript
<script language="JavaScript1.1" type="text/javascript">
function beware(){
if(html_SelectValue('P3_BOARD_GROUP_TYPE_ID')==6){
var answer = confirm('Warning! This will change all Timers to default values. Continue?');
if(answer){doSubmit()}
else{html_GetElement('P3_EMULATION').focus()}
</script>
You should take a quick run through this javascript tutorial http://www.w3schools.com/js/js_intro.asp and hour or two spent here is going to save you countless hours later and allow you to build more adavced (and working) functionality.
Carl
Similar Messages
-
Using javascript to check datatype
Hi again, I have a database name "cars"
name VARCHAR2(10)
model VARCHAR2(10)
year Date
price NUMBER
I have a form which staff fill in those details then save it.
I am doing a client side validation. I AM ALSO DOING A SERVER SIDE TOO.
Because the form is very long and takes about 15 mins to fill in a form. Basically I want to use javascript to check individual datatype in the database to check if whatever the user types in can fit into each datatype.
Hope that makes sense.
Thanks for your help.jquery is tightly integrated with apex. you will have to do the validation using jquery/javascript. check the following links
Documentation | jQuery Validation Plugin
jQuery Validation Plugin | Form validation with jQuery – this site is a work in progress
javascript - Data type validation using jQuery Validation plugin - Stack Overflow
[Solved] how can i do data type check validation using jquery ? - CodeProject
Regards,
Vishal -
How i can make in the same action 2 condition (check the exemple down)
how i can make in the same action 2 condition (check the exemple down)
this is an example and I really thank you for helping me(any body plz)
http://www.2shared.com/file/DPpdgC_a/Exemple_Edge.html1. make each rectangle a symbol (Symbol_1 and Symbol_2) and uncheck autoplay()
2. Delete your code on the click event and put the following code in compostion ready:
var toggle=true;
function btnPlay(){
if (toggle){
toggle=false;
sym.getSymbol('Symbol_1').play();
else{
toggle=true;
sym.getSymbol('Symbol_2').play();
sym.$('Ellipse').click(function(){
btnPlay(); -
I want to create new popup block screen in CO11N SCREEN for condition check
in standard CO11N screen after completing filling the required field , when i click the save icon I NEED TO CREATE THE POBUP BLOCK SCREEN FOR CONDITION CHECKING WHICH CONSIST
YES NO CANCEL
IS THERE ANY FUNC MODULES TO DO THIS? OR IS IT POSSIBLE BY CODING?Don't rely on 'Preview'.
Share/Export as .ibooks file and then drag that to iTunes and sync to your iPad.
Still no joy, find a pre-processing recipe ( that includes export for iPad) that doesn't spoil the quality in the process.
Just keep in mind that low quality in means low or lower quality out, in this example. -
Hi,
Is there anyway i can ensure, let's say my "net income" is larger than 2 million before the user can submit the data? is there some sort of condition checking or locking mechanism that does this?
any input on this?
cheersYou can have something like that for submission
please check into help online the follow link
http://name of your application server/osoft/help/admin/helpstart.htm#Setting_application_set_parameters.htm
It is not exactly what you want but you can do something using this approach.
You can change the work status settings for each application. Changing the work status settings involves identifying three to five 'work status dimensions,' and then defining specific members for the remaining non-work status dimensions used for validation purposes. You must determine which account you will use for validation of the data at the time the work status is changed. The validation account must be ”0u201D at the intersection of the 3-5 variable members and the members designated for the non-work status dimensions. If the account is not ”0u201D then the owner/manager cannot set the work status. This is an option feature.
The dimensions you select as the work status dimensions are the variables in your business process. For example, the entity, category, and time might change based on who is submitting data, but the account, data source, reporting currency, etc., remains static. (Typically, Time is a work status dimension since data is usually segregated based on time.)
For example, lets say that you set Entity, Category, and Timeas your work status dimensions for a given application. You then set your other current view members to the following: Account: Validation; DataSrc: TotalAdj; Intco: All_Intco; and RptCurrency: LC. In addition to assigning work status dimensions, you also specify which dimension is the 'owner dimension.' The owner dimension includes the Owner property. The owner property determines who can edit a work status setting. The following figure shows this setup, where Entity is the Owner dimension.
A user attempts to post data to the current view shown in the following table. The system checks the 'validation' account to make sure the intersection equals zero (0). If so, the data is posted, and a success message is displayed. The user can now set the work state to 'submitted' on that intersection. Subsequent submissions to that exact intersection will be rejected. Users can only send data to the same intersection if the Entity, Category, or Time member changes.
Account
<All>
Category
Actual
DataSrc
<All>
Entity
SalesNE
Intco
<All>
RptCurrency
<All>
Time
Feb.2007
To change work status settings for applications
From the Admin Console, expand the Application node.
Expand the application for which you want to change the work status setting.
Select Work Status Settings.
In the Work State column, select Yes for each dimension you want to use to control the work status settings. Select Owner for the dimension that contains the Owner property.
In the Member Validation column, select a member for each non-work status dimensions. (Use the browse button to open the Member Lookup.)
From the action pane, select Save Work Status Settings. -
Hi,
I have a textbox, Have modified that with a Jquery datepicker. It is in format 'DD-Mon-YYYY' format. I need to write a javacscript function to check the if user select the date if it is greater then the system date it must give a alert message and do not allow user to select more then system date.
How to do this have created item with this name, and the class name is give as class = AZ_DTP
select
APEX_ITEM.TEXT(7,null,10,20,'readonly=yes
class=AZ_DTP onchange= javascript:checkdate()')
from dual
Create a function like this
function checkdate()
var myDate = new Date;
if ( $('.AZ_DTP') > myDate )
alert(myDate);
Please suggest me how to modify the query. above
Thanks
SudhirAm using
<script>
$(function()
JQuery Date Picker
$('.AZ_DTP').datepicker({
showOn: "button",
buttonImage : "/i/asfdcldr.gif" ,
buttonImageOnly: true ,
dateFormat : "dd-M-yy"
Below code is for jQuery Modal
Dialog when Other options
is selected in the select
list
$('#lovForm').dialog({
autoOpen : false,
modal : true ,
height : 190,
buttons : {
Save : function(){ saveLovItem()},
Cancel : function(){closeLovForm($('#lovForm'))}
</script>
Please suggest me how to add the +0d
condition to restirct to sysdate.
Thanks
Sudhir
Edited by: Sudhir_Ness on Mar 23, 2011 10:56 PM -
Agree to terms and conditions check box
I am using a checkbox for users to indicate that they agree to the forms terms and conditions. On Submit how can I validate that the box was checked and if not block the Submit process from completing until the checkbox is selected.
Make the submit button presence 'hidden', add a second button that performs the check box validation and if the validation succeeds, call 'click' on the submit button.
// form1.page1.subform1.callSubmitBtn::click - (JavaScript, client)
if (form1.page1.subform1.cb.rawValue == "0") {
xfa.host.messageBox("Please agree to terms and conditions.","Agree",0);
else {
form1.page1.subform1.submitBtn.execEvent("click");
Steve -
I cannot do anything in my gmail account, such as reply, forward or get any drop down menu to work.
When I go to youtube it says that either I do not have javascript or it is not enabled. I checked and the box says it is enabled.
I use a mac 10.6.4https://support.mozilla.com/en-US/questions/762865#answer-115088
-
Negative Condition checking in read statement
Hi,
i have table, which i have to read, key on which i am going to read that will be determined dynamically. now i have to check the value for the key field is initial or not. i can't use a loop here as it doesn't allow me to mention where condition field dynamically.
thanks & regards,
prabhuHi use this:
DATA: BEGIN OF it OCCURS 0, "your dynamic table
field1 TYPE c,
field2 TYPE c,
END OF it.
it-field1 = '1'.
it-field2 = 'A'.
APPEND it.
it-field1 = ''.
it-field2 = 'B'.
APPEND it.
it-field1 = '2'.
it-field2 = 'C'.
APPEND it.
FIELD-SYMBOLS: <struct> TYPE ANY,
<comp> TYPE ANY.
LOOP AT it ASSIGNING <struct>. "loop at your dynamic table
ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <struct> TO <comp>. "FIELD1 is determined dynamically
IF sy-subrc = 0 AND <comp> is not initial.
WRITE <comp>. "will write out <comp> for each entry which has non initial value in <comp> (here FIELD1)
ENDIF.
ENDLOOP.
Please note that your <lfs> must hold name 'FIELD1' inside, than you can replace it with below code
ASSIGN COMPONENT <lfs> OF STRUCTURE <struct> TO <comp>.
Regards
Marcin
One thing to be added here:
You can't read table comparing its key field with negative condition NE , only comparison EQ are allowed in READ TABLE statement, that's why I chose above approach.
Edited by: Marcin Pciak on May 26, 2009 4:51 PM -
How to make a condition check on footer text in adobe forms ?
Hi all,
I have a requirement where I need to change the existing footer text in the adobe form ( text is hardcoded in the layout ) .
I need to put a condition where new text can be placed or the existing text . Is this possible in the layout only ?? Because the text is hardcoded . I dont want to do programming in the interface for such a small req . Its a urgent req . So please advise .
Thanks
BarunHi Barun,
Using Javascript in Adobe, we can hide the footer. Please find the document below.
Using Java Script in SAP Adobe forms to dynamically select Logo / Image on the basis of a field value
Regards
Rajkumar Narasimman -
Condition checking in Message Mapping
Hi
My scenario has a IDOC coming in XI and gets converted into a flat file
Idoc Structure
ControlRecord
ParentRecord
Field1
Field2
ChildRecord
Field3
Field4
Field5
Condition is Field2 = 0500 and Field5=""
If both the conditions are satisfied,then
For every occurence of child record,parent record needs to be repeated.
I used "useOneasMany" function to check ,but I am not able to check both the conditions.
Help needed on how to check these conditions
ThanksHi,
Try Like below.
Field2-----------
ChildRecord----Use One as many-->@
Field5-----------
@----equalsS("0500")----------and----if with out else---then(--@)----Target.
Field5--length--equalsS("0")--
If you required else condition then use "if" condition. As per above mapping any one condition fails target field will suppress.
Regards,
Prakasu.M -
Unable to enable JavaScript
To avoid confusion: http://kb.mozillazine.org/JavaScript_is_not_Java
See [[JavaScript]] and http://kb.mozillazine.org/JavaScript
Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]] -
Dear All,
attached is an NI that does the following.
1. The user inputs a frequency and amplitude range to drive a speaker.
2. A laser displacement sensor measure the speaker displacement, checks if it is in the desired range, and jumps on to the next frequency, if its not in the desired range it tries another drive voltage.
The program works fine, the problem is, is that the while loop checks the condition in the beginning or the middle of the loop, therefore if it is in range instead of stoping at that particular amplitude and frequency, it goes to the next amplitdue before going to the next frequency. Since at the begining of the loop execution the condition was different that in the middle.
How can I force the while loop to read the condition only after the sequence inside has completed.
Thank you
Ala
Attachments:
AmpFinder.vi 431 KBDear All,
I think this fixes the problem
Cheers,
Ala
Attachments:
AmpFinder.vi 431 KB -
Hi guys,
I've a problem: I have a condition type defined "Required" in calculation schema and the condition appear in PO with value zero. How can I do to check if the value is greater than zero ?
Regards
Albertowhen you mark a condition as "Required" , it only means that the condition type must mandatorily appear in the procedure , it however does not check the value at all , in order to check the value , you need do define Limits for conditions , you can define this under customizing for conditions in purchasing. apart from this, you can also define some routine and assign to the condition type.
If the value for that condition is based on some parameters ( e.g. plant/ p.org etc) , then you can define an access sequence and maintain condition records to default the same.
regards
Raviraj -
CSS load balancing, service dependancy condition check
Hi,
I would like to seek some advice regarding the CSS's service configuration.
Is there a way to configure the CSS such that it check for the condition/status of a independant service (not involved in the load balancing algorithm) is alive/down (using service mode keepalive port/type), before deciding whether to/not to load balance to a group of services?
Senario is as follwows:
We process incoming HTTPS request and load balance to 2 HTTPS Servers (HTTPS service SSL1 and SSL2), on condition that a independent service (HTTPS service SSL3) is alive (using the keepalive type/port check in service mode).
If the independant service (HTTPS service SSL3) is not alive, remove the HTTPS Servers (HTTPS service SSL1 and SSL2) from the load balancing algorithm.
Thanks in advance for assistance
!************************** CIRCUIT **************************
circuit VLAN1
ip address 192.168.103.35 255.255.255.192
!************************** SERVICE **************************
service SSL1
ip address 192.168.103.53
protocol tcp
port 443
keepalive type tcp
keepalive port 443
active
service SSL2
ip address 192.168.103.54
protocol tcp
port 443
keepalive type tcp
keepalive port 443
active
? This is the service condition that CSS will check before deciding to/not to load balance to SSL1 and SSL2.
? If SSL3 is down, do not load balance to SSL1 and SSL2. If SSL3 is up, load balance to SSL1 and SSL2
service SSL3
ip address 192.168.103.55
protocol tcp
port 443
keepalive type tcp
keepalive port 443
active
!*************************** OWNER ***************************
owner CISCO
content L5Rule_SSL
vip address 192.168.103.37
application ssl
protocol tcp
port 443
url "/*"
add service SSL1
add service SSL2
active
!*************************** GROUP ***************************
group SSL
vip address 192.168.103.37
add destination service SSL1
add destination service SSL2
activemaybe this?
circuit VLAN1
ip address 192.168.103.35 255.255.255.192
ip virtual-router 10 priority 100
ip redundant-vip 10 192.168.103.37
ip critical-service 10 SSL3
if I'm not mistaken the vip 192.168.103.37 will stop working when the service SSL3 goes down. I'm not sure that this is what you want though...
Maybe you are looking for
-
I just got a MSI 4200Ti 64 meg. card today. I followed the install instructions and the driver seemed to install normally. When it stopped installing I got a message that said. An error occurred during the installation of this device. The data is inv
-
Safari will not open on new Macbook
Just purchased new MacBook Pro. Used Time Machine to from old machine. Transfered went great, but Safari will not open. Crashes right away. Here is the report. Process: Safari [258] Path: /Applications/Safari.app/Contents/MacOS/Safari Iden
-
Cisco CP-78XX SIP Phone Pickup Not Work on CME
Hi, I configured some SIP phones (CP-7821, CP-7841) with pickup function. Is it the Pickup / GPickup soft keys not function as the SIP phone? If yes, then I can use the FAC to access that? And I tried the FAC std. / custom as the pickup / gpickup ..
-
Configure SMTP without authentication to share photo by email
I'm not able to share photo by email using a SMTP server without authentication. Can anyone tell me how to configure an account without authentification? Regards, Frederic
-
PO STO reconfirm ATP don't consider partly confirm ATP qty
Hi, I find an issue in our implementation about PO STO using ATP.We user SAP ECC 6.0 Here is the description of issue 1. There is stock = 1000 at (04.03.2010) 2. there is PO STO XXX out to other plant -600 (ATP confirm 600 and remaining cummulative A