Help with validating radio buttons
I would like to set my radio button so they can only click it after they have entered text into the 2 previous text fields. Can someone help me out with a script how to do that?
Thanks
Please try the following Script :
// Function to enable form fields function
EnableFormField (cFieldName) {
// First acquire the field to be enabled
var oFld = this.getField(cFieldName)
// Next acquire the hidden field with the normal colors
var oNmlFld = this.getField("NormalColorsFld");
if(oFld) {
// Make field interactive
oFld.readonly = false;
// Restore Normal Colors
oFld.fillColor = oNmlFld.fillColor; oFld.borderColor = oNmlFld.borderColor; oFld.textColor = oNmlFld.textColor;
// Function to disable form fields function
DisableFormField(cFieldName) {
// First acquire the field to be disabled
var oFld = this.getField(cFieldName)
if(oFld) {
// Make field Read-Only
oFld.readonly = true;
// Set Grayed out colors
oFld.fillColor = ["G", 0.75]; oFld.borderColor = ["G", 2/3]; oFld.textColor = ["G", 0.5];
Similar Messages
-
Help with cfinput radio button and text fields
I have a series of radio buttons that allow a user to select
monetary values but I also want them to be able to define an amount
if they choose so. I was planning on doing this by providing a
radio button with the value of other and then using a text field to
allow the user to enter the monetary value. The problem with this
is that they might enter a user defined monetary value but forget
to set the radio button to "other".
I was hoping that I could set the "other" text input field to
read only until the point that the user selects the "other" radio
button. Is there a way to do this using onSelect or another method.
Or is there a better way to approach this problem? Thanks for any
help or advice in advance.Hi,
You could call a js function which will select the radio
button "other " when the user types something in(there are various
events on cfinput). This way the user will not have to worry about
selecting the radio button and your requirement will be satisfied.
Hope this Helps.
Thanks,
Bhakti -
Help with styling radio buttons
Hi can anyone tell me if its possible to add a vorder colour and a background to the selected radio button and text on this website http://62.6.176.22/products/leaflets.aspx?Id=145399&Key=F8FA69A7-4AC5-4986-97F3-6C8C9520FA 87. This is a site which is supplied to us and we can only edit the CSS with our own styles but not the code. Any pointers will be much appreciated
Actually...
I may have spoken too soon.
I've been doing some playing around and came up with this. Is this kind-of what you're looking for?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
input[type="radio"] {
display:block;
float:left;
height:20px;
width:20px;
label {
display:block;
background-color:#bbb;
padding:5px 10px;
font-family:Verdana;
font-size:12px;
border:1px solid #bbb;
input[type="radio"]:checked + label {
background-color:#6F6;
border:1px solid green;
</style>
</head>
<body>
<div style="margin:auto; width:552px;">
<div>
<input type="radio" id="radio1" name="radios" value="value1" checked>
<label for="radio1">Button1 - Notes would go here (this is the radio button Label)</label>
<input type="radio" id="radio2" name="radios" value="value2">
<label for="radio2">Button2 - Notes would go here (this is the radio button Label)</label>
<input type="radio" id="radio3" name="radios" value="value3">
<label for="radio3">Button3 - Notes would go here (this is the radio button Label)</label>
</div>
</div>
</body>
</html> -
PHP Form Validation: Radio Buttons
Hey everyone -
I'm trying to do two things here with an addition to one of
my forms using
PHP.
1. Attempting to validate if one of the radio buttons has
been selected.
2. Displaying which radio button is selected once the page is
reloaded
(checking for validation errors). That is - if they've
selected a radio
button but didn't fill in the other area - I want the radio
button they've
already selected to be actually "selected" once the page
reloads.
Here is the series of radio buttons:
<input type="radio" name="subject" id="subject1" value="1"
/>
<label for="subject1" class="labelbold">I wish to
contact you regarding
website design</label><br />
<input type="radio" name="subject" id="subject2" value="2"
/>
<label for="subject2" class="labelbold">I wish to
report a technical
error</label><br />
<input type="radio" name="subject" id="subject3" value="3"
/>
<label for="subject3" class="labelbold">I wish to
report an error with the
copy</label><br />
<input type="radio" name="subject" id="subject4" value="4"
/>
<label for="subject4"
class="labelbold">Other</label><br />
This is how I'm validating my checkboxes:
if($_POST['confirmbox'] == false) $error[] = "Check the
Privacy Policy
Agreement Box";
However, using "false" doesn't seem to matter with the radio
buttons. So,
how can I get the radio buttons to validate that ONE was
selected and how
can I show that selected button on a page reload (I'm
thinking I may need to
dynamically generate the value=""....<?php...?>....?).
Thanks!
Shane H
[email protected]
http://www.avenuedesigners.com
=============================================
Proud GAWDS Member
http://www.gawds.org/showmember.php?memberid=1495
Delivering accessible websites to all ...
=============================================Hello there -
After no replies - I decided to strain my brain (ha-ha) - and
finally
figured out the solution to the problem.
For the curious - I added this to each <input...>
field:
<?php if($_POST['subject'] == "1") echo'
checked="checked"';?>
And then for each <input...> I changed the "1" to the
corresponding value
each field was given.
Have a wonderful night. :)
Shane H
[email protected]
http://www.avenuedesigners.com
=============================================
Proud GAWDS Member
http://www.gawds.org/showmember.php?memberid=1495
Delivering accessible websites to all ...
=============================================
"Shane H" <[email protected]> wrote in
message
news:[email protected]...
> Hey everyone -
>
> I'm trying to do two things here with an addition to one
of my forms using
> PHP.
>
> 1. Attempting to validate if one of the radio buttons
has been selected.
>
> 2. Displaying which radio button is selected once the
page is reloaded
> (checking for validation errors). That is - if they've
selected a radio
> button but didn't fill in the other area - I want the
radio button they've
> already selected to be actually "selected" once the page
reloads.
>
> Here is the series of radio buttons:
>
> <input type="radio" name="subject" id="subject1"
value="1" />
> <label for="subject1" class="labelbold">I wish to
contact you regarding
> website design</label><br />
>
> <input type="radio" name="subject" id="subject2"
value="2" />
> <label for="subject2" class="labelbold">I wish to
report a technical
> error</label><br />
>
> <input type="radio" name="subject" id="subject3"
value="3" />
> <label for="subject3" class="labelbold">I wish to
report an error with the
> copy</label><br />
>
> <input type="radio" name="subject" id="subject4"
value="4" />
> <label for="subject4"
class="labelbold">Other</label><br />
>
> This is how I'm validating my checkboxes:
>
> if($_POST['confirmbox'] == false) $error[] = "Check the
Privacy Policy
> Agreement Box";
>
> However, using "false" doesn't seem to matter with the
radio buttons. So,
> how can I get the radio buttons to validate that ONE was
selected and how
> can I show that selected button on a page reload (I'm
thinking I may need
> to dynamically generate the
value=""....<?php...?>....?).
>
> Thanks!
>
> --
> Shane H
> [email protected]
>
http://www.avenuedesigners.com
>
> =============================================
> Proud GAWDS Member
>
http://www.gawds.org/showmember.php?memberid=1495
>
> Delivering accessible websites to all ...
> =============================================
>
>
> -
When installing my new HP printer I received the following error message when I inserted the software install disk: "The disk you inserted was not readable by this computer" with 2 radio buttons "Ignore" or "reject" I was able to eject the disk but the message remains. Now every time I start up the printer this error message pops up on my computer. I have since used the disk drive successfully for music CD's etc. How can I get rid of this message?
PRAM RESET
Zap the PRAM
Shut down the computer.
Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
Turn on the computer.
Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
Hold the keys down until the computer restarts and you hear the startup sound for the second time.
Release the keys. -
Need help with Flash CS4 buttons/can't get buttons to control anything
Hello,
I need help with Flash CS4. I am making a banner with an animation (Image change into movie clip "3D Spiral") and added buttons but I cannot get the buttons to control the animation. Please help I am frustrated! If someone could help I would be most appreciated.Thank you.
Regards,
Michael J. Sheehan allelois
Date: Mon, 17 Aug 2009 18:48:09 -0600
From: [email protected]
To: [email protected]
Subject: Need help with Flash CS4 buttons/can't get buttons to control anything
Hi there
I'm not sure how you wound up where you did. But you wound up in the Adobe Captivate forums. Please stand by as I move your thread to the Flash forums.
Cheers... Rick
> -
Disable an Input field with the help of a radio button selection.
Hi Guys,
I know it is a very basic question and also has many threads for the mentioned query. None of the threads gave me a real clue about the problem. It is as follows:
Simply, I have an input field and there are two more radio buttons on the screen, say rd1, and rd2.
Initially Rb_gtgr is active and input field is blank and disabled, and when i select Rb_selgr, input field should be active and mandatory. It means when i try to execute the code with out entering any value after it is enabled, an error message should appear. For this the code is as follows:
AT SELECTION-SCREEN OUTPUT.
PERFORM screen_grace_on.
AT SELECTION-SCREEN ON p_grace.
PERFORM check_grace_days.
FORM screen_grace_on .
DATA: l_v_grace TYPE char2.
CONSTANTS: l_c_grace TYPE char7 VALUE 'P_GRACE'.
l_v_grace = p_grace.
CLEAR p_grace.
IF rb_selgr EQ c_x.
LOOP AT SCREEN.
IF screen-group1 = 'ABC'.
screen-required = 1.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'ABC'.
screen-input = 0.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDFORM. " SCREEN_GRACE_ON
FORM check_grace_days.
IF rb_selgr EQ c_x AND p_grace EQ 0.
PERFORM screen_grace_on.
MESSAGE e492(/ams/ramfcmess1). " Enter the number of Grace days
ELSEIF rb_selgr EQ c_x AND p_grace GE 0.
PERFORM screen_grace_on.
ENDIF.
ENDFORM.
Ideally this code should work since in the PBO i.e., At selection screen output i am enabling the fields, and also when i select the second radio button i am also checking for the value too..
I am working on 4.7 version of SAP. The Most interesting observation is it works fine for few variants, and not with others.
Thank youHi,
Go through this following code,
selection-screen begin of block B2 with frame title TEXT-005.
selection-screen begin of line.
parameters: P_BIRPT type C radiobutton group RAD1 default 'X' user-command UCOMM.
selection-screen comment 3(20) TEXT-002 for field P_BIRPT.
selection-screen end of line.
selection-screen begin of line.
parameters: P_COLRPT type C radiobutton group RAD1.
selection-screen comment 3(20) TEXT-003 for field P_COLRPT.
selection-screen end of line.
selection-screen begin of line.
parameters: P_PAYRPT type C radiobutton group RAD1.
selection-screen comment 3(20) TEXT-004 for field P_PAYRPT.
selection-screen end of line.
selection-screen end of block B2.
selection-screen begin of block B1 with frame title TEXT-001.
select-options: SO_KTOKD for KNA1-KTOKD modif id M4,
SO_BLART for BSIS-BLART modif id M2.
parameters: P_PAID type ZCLEAR modif id M3 as listbox visible length 20.
selection-screen end of block B1.
at selection-screen output.
loop at screen.
if P_BIRPT eq 'X'.
if SCREEN-GROUP1 = 'M2' or SCREEN-GROUP1 = 'M3' .
SCREEN-INVISIBLE = '1'.
SCREEN-ACTIVE = '0'.
modify screen.
endif.
elseif P_COLRPT eq 'X'.
if SCREEN-GROUP1 = 'M3'.
SCREEN-INVISIBLE = '1'.
SCREEN-ACTIVE = '0'.
modify screen.
endif.
elseif P_PAYRPT eq 'X'.
if SCREEN-GROUP1 = 'M2'.
SCREEN-INVISIBLE = '1'.
SCREEN-ACTIVE = '0'.
modify screen.
endif.
if SCREEN-GROUP1 = 'M4'.
SCREEN-INVISIBLE = '1'.
SCREEN-ACTIVE = '0'.
modify screen.
endif.
endif.
endloop.
Thanks
Anil D -
Creation of selection screen with 2 radio button groups
Hi All,
I have following selecton screen to be created:
1. Radio Button for File
A. Radio Button for PC File
- Parameter for PC File Input
B. Radio Button for UNIX File
- Parameter for Unix File Input
2. Radio Button for Material
- Material Select-Option
As per above Either of Radio Buttons 1/2 File/Material will be selected.
If 1(File) Selected Radio Button for PC File/Unix File will be selected, No other radio buttons will be active.
If 2(Material) Selected Material Select-option input will be given, No other radio buttons will be active.
How can we write the selection screen code for above design.
Thanks in advance.
Thanks,
Deep.Hi,
go through the following example-----
**************************************INTERNAL TABLE DECLERATION**************************************
DATA: BEGIN OF ITAB2 OCCURS 0,
VALUE(250) TYPE C,
END OF ITAB2.
**************************************DATA DECLERATION************************************************
DATA: PATH LIKE DYNPREAD-FIELDNAME.
DATA : P TYPE STRING,
D TYPE STRING.
DATA : V_DATASET LIKE FILENAMECI-FILEEXTERN.
**************************************SELECTION SCREEN***********************************************
PARAMETERS: V_PATH TYPE RLGRAP-FILENAME DEFAULT 'C:\Documents and Settings\vchaturvedi\Desktop\vijay.txt'.
PARAMETERS: D_PATH TYPE RLGRAP-FILENAME.
SKIP 5.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
PARAMETERS: PC_ONE RADIOBUTTON GROUP RAD1 DEFAULT 'X',
PC_OTHER RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR V_PATH.
HELP FOR SEARCHING FILES PATH************************************************
IF PC_ONE = 'X'.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = 'Z8VIJAY_SHADOWER_COVERSIONDATA'
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = PATH
IMPORTING
FILE_NAME = V_PATH.
*******CONVERT IN TO STRING************
P = V_PATH.
ENDIF.
**************************************SELECTION SCREEN VALIDATION***********************************
AT SELECTION-SCREEN.
IF V_PATH = ''.
MESSAGE E014. "FILE PATH NOT FOUND!!!!!!!
ENDIF.
IF D_PATH = ''.
MESSAGE E016. "TARGET FILE NOT FOUND!!!!!!!
ENDIF.
*******************FOR DOWNLOAD**********
AT SELECTION-SCREEN ON VALUE-REQUEST FOR D_PATH.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = 'Z8VIJAY_SHADOWER_COVERSIONDATA'
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = PATH
IMPORTING
FILE_NAME = D_PATH.
***************CONVERT INTO STRING***********
D = D_PATH.
*******************************************MAIN LOGIC************************************************
START-OF-SELECTION.
IF P = ''.
P = 'C:\Documents and Settings\vchaturvedi\Desktop\vijay.txt'.
ENDIF.
******************UPLOAD DATA FROM OTHERS TO INTERNAL TABLE****************
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = P
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = ITAB2
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc = 1.
MESSAGE E014. "FILE PATH NOT FOUND!!!!!!!
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
******************************DOWNLOAD DATA FROM INTERNAL TABLE TO OTHERS******************************
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = D
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = ITAB2
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF PC_OTHER = 'X'.
****************************8FOR ONE SERVER TO ANOTHER************************************************
OPEN DATASET V_DATASET FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
DO.
READ DATASET V_DATASET INTO ITAB2.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
APPEND ITAB2.
ENDDO.
ENDIF.
ENDIF.
*********************************PRINTING DATA *********************************************************
LOOP AT ITAB2.
WRITE :/5 ITAB2-VALUE.
ENDLOOP.
****do reward if usefull
Regards,
vijay -
Authorization issue with VA02 radio buttons
Hello All,
We are stuck at one authorization issue. The user navigates using tcode VA02.
1) Execute Tcode -VA02=>
2) 2) puts order number # 100001 =>
3) press enter =>
4) press enter =>
5) Screen: Change (Company Name) Return 100001: Overview =>
6) Option: Display doc. Header details (looks like a magnifying glass beside PO_date) =>
7) This bring us to Change (Company Name) Return 100001: header Data =>
8) select status tab =>
9) on Status tab lower end there is a button u201CObject Statusu201D =>
10) Press it =>
11) Come to Change Status :
12) On this screen There is Status with status no. on the right side with 7 options
e.g:
u2022 1 BLK Approval Required for,
u2022 2 BL1 Approval for Credit,
u2022 3 BL2 Approval for material Replacer
We need to restrict the radio button access for user for which we are unable to find the authorization object.
Could any one help.
Thanks & Regards
gabHi,
Use ST01 to trace the user activities and check which objects its hitting when you click on those buttons, then you can restrict radio buttons using those objects.
I have'nt run the tcode myself and performed the steps you mentioned, but if you think its calling other transaction from those buttons you can manage tht in SE97, or add the t-code VA02 in the S_tcode auth object in PFCG.
Hope this should get you going
Thanks,
Vijay -
Report With Multiple Radio Button ,How to reset the values of when selected
Reaching out to the experts here. I have a report which i created a radio group which saves the value rownum when the radio buton is selected to a hidden item based on an on click event. There are currently 3 radio button , i need to be able to "reset" the value of the other items when more than of the button are selected .I.E. There are 3 buttons, user clicks button one , but then decides they need to click button two , then realizes they really wanted to perform button 3 , I want to be able to "reset" the value of the 1st two hidden items so the only value populated is the 3rd hidden item. I am new to working with these features and scenarios so any and help would be appreciated.
Here is the report
SELECT APEX_ITEM.RADIOGROUP(1, ROWNUM, NULL,NULL,'onclick="javascript:$x(''P5_HIDDEN1'').value=' || ROWNUM|| '"') UPDATE_RECORD
,APEX_ITEM.RADIOGROUP(1, ROWNUM, NULL,NULL,'onclick="javascript:$x(''P5_HIDDEN2'').value=' || ROWNUM|| '"') DELETE_RECORD
,APEX_ITEM.RADIOGROUP(1, ROWNUM, NULL,NULL,'onclick="javascript:$x(''P5_HIDDEN3'').value=' || ROWNUM|| '"') SET_PRIMARY
,papf.first_name
,papf.last_name
,hl.meaning
,pp.phone_number
,case when phone_type is not null then (select meaning from hr_lookups where lookup_type ='PHONE_TYPE' and pp.phone_type=lookup_code)
end as phone_type
,emrg.primary_contact_flag
from hr.per_all_people_f papf
,apps.hr_lookups hl
,apps.per_contact_relationships pcr
,apps.per_phones pp
,(select contact_person_id,primary_contact_flag
from apps.per_contact_relationships pcr
where pcr.person_id = :P5_PERSON_ID
and contact_type = 'EMRG') emrg
where pcr.contact_person_id in emrg.contact_person_id
and pcr.personal_flag='Y'
and contact_type <> 'EMRG'
and trunc(sysdate) between date_start and NVL(date_end,'31-DEC-4712')
and pcr.contact_type = hl.lookup_code
and hl.lookup_type='CONTACT'
and pcr.contact_person_id = papf.person_id
and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
and pcr.contact_person_id = pp.parent_id
and pp.phone_type in (select lookup_code from hr_lookups where lookup_type ='PHONE_TYPE')Related thread here How to Pass values from SQL Report into TEXT ITEM ?
Regards, -
Help with validation on a manually created tabbed form
version 4.1.1.00.23
Hello,
I have a manually created tabbed form that I'm having trouble creating validation on.
The page is a Resource Staffing page where PM's can forecast the Resources that will be needed for various projects. The forecast can be for 12 - 18 months.
The requirement is to display a message to the user if they are trying to save a row without forecasting any time. It's possible they may not know how may Resources or the length of time needed when the row is created. If they respond that they want to save the row without time the MRU will create the record. If they answer that they do not want to save the row they are returned to the page without loss of information.
The month fields on the page are defaulting to 0 (zero).
I've updated the Save button to Redirect to URL and in the URL Redirect I have: javascript:confirmNoTimeSaved()
The javascript:
[code]
function confirmNoTimeSaved()
var arr_jan,arr_feb,arr_mar,arr_apr,arr_may,arr_jun,arr_jul,arr_aug,arr_sep,arr_oct,arr_nov,arr_dec = new Array();
arr_jan = document.wwv_flow.f07;
arr_feb = document.wwv_flow.f08;
arr_mar = document.wwv_flow.f09;
arr_apr = document.wwv_flow.f10;
arr_may = document.wwv_flow.f11;
arr_jun = document.wwv_flow.f12;
arr_jul = document.wwv_flow.f13;
arr_aug = document.wwv_flow.f14;
arr_sep = document.wwv_flow.f15;
arr_oct = document.wwv_flow.f16;
arr_nov = document.wwv_flow.f17;
arr_dec = document.wwv_flow.f18;
for(i = 0; i < arr_jan.length; i++)
if(arr_jan[i].value == 0 && arr_feb[i].value == 0 && arr_mar[i].value == 0
&& arr_apr[i].value == 0 && arr_may[i].value == 0 && arr_jun[i].value == 0
&& arr_jul[i].value == 0 && arr_aug[i].value == 0 && arr_sep[i].value == 0
&& arr_oct[i].value == 0 && arr_nov[i].value == 0 && arr_dec[i].value == 0)
txt = 'You have no time assigned to your Forecast. Do you want to save this Forecast without time entered?' + '\n' + '\n' + '"Yes" to save the Forecast.' + '\n' + '"No" to return with no changes.';
caption = 'Confirm Saving With No Time';
vbMsg(txt,caption)
switch (isChoice)
case 6:
doSubmit('SUBMIT');
break;
case 7:
doSubmit('CANCEL2');
break;
else
doSubmit('SUBMIT');
break;
</script>
<script language="VBScript">
<!--
//Yes = 6
//No = 7
Function vbMsg(isTxt,isCaption)
testVal = MsgBox(isTxt,vbYesNo,isCaption)
isChoice = testVal
End Function
//-->
</script>
[/code]
The 'CANCEL2' is just a Branch I'm using to branch back to the page without clearing Cache. I do have 'Cancel' button on the page and the Branch created for that clears the Cache.
While debugging the javascript I get into the VB Script on the testVal = MsgBox(isTxt,vbYesNo,isCaption) line and the browser crashes.
Can someone help with this requirement?
What additional information can I provide?
Thanks,
JoeThe code above is my attempt at this requirement, however, the browser crashes when it gets to the VBScript on the MsgBox call. I don't have to use this approach. Does someone have an idea how to solve this?
Thanks,
Joe -
Need Help on JSP Radio Buttons please
How do i create radio buttons on a HTML file to link to other JSPs??
do i have statements in my HTML that gets a JSP i.e option and then that runs the links to the other pages?
please help very stuck and confused. ThanksHi ..kinda new to java and jsp , worked with abit ...
I have a problem have to solve. I have 2 jsp pages..one is for header displays a picture at top and has four radio buttons choices. Then at bottom of window is other jsp this jsp displays the result of whatever is choosen fromt he four buttons at top in the other frame from 1st jsp.
I kinda have part of answer from your post about onclick. But how do i pass a value from the 1st jsp to the 2nd. jsp. There is some code in the second page that displays certian pages depending on what the value is from the four radio buttons.
any help much appreciated :) -
Help required : Dynamic Radio Buttons.
Hi All,
Requirement is as follows :
1. I am having an internal table , suppose it has 5 records , then I need 5 radio buttons on screen.
2. I need to dynamically name these radio buttons , based on one of the field of same internal table .
Please help to get an optimised approach to implement the same .
Thanks and Regards
HarshHi Harsh,
A better approch would be to create a selection-screen with 15 buttons to start and make invisible other radio buttons that you dont want in the at selection-screen output event.
You can try like below:
parameters: r1 radiobutton group rad1 default 'X',
r2 radiobutton group rad1,
r15 radiobutton group rad1.
at selection-screen output.
describe table itab lines n.
l_cnt = 15 - n.
do l_cnt times.
n = n+1.
concatenate 'r' n into l_radioname. <<< n no of radio buttons wanted
loop at screen.
if screen-name = l_radioname.
screen-invisible = 1.
modify screen.
endif.
endloop.
enddo.
i hope you got a breif idea as to how you can go forward.
Regards,
Himanshu -
Transaction with 3 Radio Buttons
Hi All,
In a transaction i have a three radio buttons in which
When the user selects first radio button, the field under first radio button should be input-enabled. Else, they should be input disabled. User should enter only one of the two fields.
When the user selects second radio button, the field should be input-enabled. Else, it should be input disabled.
When the user selects Third radio button, the field should be input-enabled. Else, it should be input disabled.
There should be a pushbutton on the screen, The text on the pushbutton should vary depending on the radio button checked.
could any one please help me
Regards,
sathishHi,
Use the below code.
selection-screen: begin of block blk1 with frame.
selection-screen: begin of line.
parameters: p_r1 radiobutton group rad1 default 'X' user-command rusr.
selection-screen position 10.
parameters: p_text1(20).
selection-screen: end of line.
selection-screen: begin of line.
parameters: p_r2 radiobutton group rad1.
selection-screen position 10.
parameters: p_text2(20).
selection-screen: end of line.
selection-screen: begin of line.
parameters: p_r3 radiobutton group rad1.
selection-screen position 10.
parameters: p_text3(20).
selection-screen: end of line.
selection-screen: end of block blk1.
DATA flag(1) TYPE c.
SELECTION-SCREEN:BEGIN OF LINE.
SELECTION-SCREEN:PUSHBUTTON 2(10) v_text USER-COMMAND cli1.
SELECTION-SCREEN:END OF LINE.
at selection-screen output.
v_TEXT = 'Rad1'.
if p_r1 = 'X'.
v_TEXT = 'Rad1'.
clear: p_text2, p_text3.
loop at screen.
if screen-name = 'P_R1' or
screen-name = 'P_R2' or
screen-name = 'P_R3'.
continue.
endif.
if screen-name = 'P_TEXT2' or
screen-name = 'P_TEXT3'.
screen-input = 0.
endif.
modify screen.
endloop.
endif.
if p_r2 = 'X'.
v_TEXT = 'Rad2'.
clear: p_text1, p_text3.
loop at screen.
if screen-name = 'P_R1' or
screen-name = 'P_R2' or
screen-name = 'P_R3'.
continue.
endif.
if screen-name = 'P_TEXT1' or
screen-name = 'P_TEXT3'.
screen-input = 0.
endif.
modify screen.
endloop.
endif.
if p_r3 = 'X'.
v_TEXT = 'Rad3'.
clear: p_text1, p_text2.
loop at screen.
if screen-name = 'P_R1' or
screen-name = 'P_R2' or
screen-name = 'P_R3'.
continue.
endif.
if screen-name = 'P_TEXT1' or
screen-name = 'P_TEXT2'.
screen-input = 0.
endif.
modify screen.
endloop.
endif.
if p_r1 = 'X'.
clear: p_r2, p_r3.
loop at screen.
if screen-name = 'P_TEXT2' or
screen-name = 'P_TEXT3'.
screen-input = 0.
elseif screen-name = 'P_TEXT1'.
screen-input = 1.
endif.
modify screen.
endloop.
elseif p_r2 = 'X'.
clear: p_r1, p_r3.
loop at screen.
if screen-name = 'P_TEXT1' or
screen-name = 'P_TEXT3'.
screen-input = 0.
elseif screen-name = 'P_TEXT2'.
screen-input = 1.
endif.
modify screen.
endloop.
elseif p_r3 = 'X'.
clear: p_r1, p_r2.
loop at screen.
if screen-name = 'P_TEXT1' or
screen-name = 'p_TEXT2'.
screen-input = 0.
elseif screen-name = 'P_TEXT3'.
screen-input = 1.
endif.
modify screen.
endloop.
endif. -
Help With Scrolling Menu / Button Rollovers
First thank you to anyone who can answer and help with this
question.
http://paragon.sortismarketing.com
- at this link I have created a site with a simple scrolling menu.
Now what I want to happen is when you rollOver the buttons on the
scrolling menu they get larger and then smaller again after you
roll off them.
I know how to do this with tweening in a non moving
environment, by making them a movie clip instead of button. But for
some reason when I did this in this case it screwed the menu all up
and made it go crazy. Is there a way to do this with action script
that isn't going to screw up the underlying code for the
scrolling?You can use the below code also. As your mouse pointer goes
over the down, it will scroll down.
on(rollOver){
scrolltext.scroll -= 1;
Maybe you are looking for
-
How to send a TextBox value to a variable in the parent form in C#?
I have an aboutBox control ("settings") that has a textBox in it. When the user presses the save button on this settings I want it to save the string from the textBox, pass it to a variable in the main form, close the settings box and then press a bu
-
Retraction of PS from BPC/EPM to ECC
Hi All ! Have you work on retraction for PS system from EPM to ECC? Please advise. Thanks. With Regards Rekha
-
Some m4p files not showing up in icloud
Some itunes music files I purchased long ago that are m4p files don't show up in my iCloud. Does anyone know how to convert or rectify this? Thanks!
-
Hi, I have the latest version of Mail (as of Sept /06) . Recently I've started getting tons of spam. Nothing I do seems to stop it. I try to use spam filtering (training for at least 2 months) but as soon as its enabled (automatic) the vast majority
-
Displaying XML with JDeveloper
Using JDev 10.1.3 for an ADF + Struts application, What is the smartest way of displaying XML documents, with different XML formats/structure, stored in a CLOB field of a database. I have already .xslt stylesheets for each different type of XML file;