Show/hide buttons based on templates
Hi
1. Is there anyway for hide/show a button (button style template based button) dynamically?
2. If the button is an image (button style Image) Is there anyway for hide/show a button dynamically?
Thanks!
Hello:
I'll assume that you want to hide/show a button using javascript.
Generally, if the button template has the '#BUTTON_ATTRIBUTES#' substitution sting defined you can specify an 'id' attribute for the button in the Button Attributes field of the button definition. For an image based button you specify and 'id' in the Image Attributes field. You can then show or hide these buttons using the
$x_HideItemRow("<button_id>") and $x_ShowItemRow("<button_id>") built in javascript functions.
Similar Messages
-
Why do show/hide buttons show when PDF is opened?
I've created an interactive PDF with a series of show/hide buttons with rollover actions. When I export and open the PDF, some of the target buttons show up. If I mouseover, they correct themselves and go to their correct hidden state until I mouseover. Is this a bug and is there any way to keep them hidden from the start? Note that the target buttons overlap some, and I'm wondering if that is part of the problem so I'll test that, although not having them overlap isn't a viable solution.
Thanks!Thanks for the response. Hidden until triggered was checked. I rebuilt the buttons and they seem to work fine now. It seems like InDesign is very finicky about the order of operations.
-
Interactive PDF show/hide button not working properly
I could use some help. I'm creating an interactive pdf using show hide buttons. A button is set to hidden and a second button controls it's visible on mouse enter and mouse exit. Sometimes these buttons which are set to visible turn to invisible in the general/form field propery window and stop working. I've tried replacing the buttons with new ones, but this hasn't helped. Is this a bug or do you think the document is corrupt. This is a large prototype file which has to be shown to a client and rebuilding it is not a welcome thought.
Is there a way to program this using java to create this function? (I'm a Java novice.)
ThanksHI PAUL, WE HAVE HAD THE SAME PROBLEM. SO, IF YOUR USING INDESIGN CS2 OR 3 WE HAVE FOUND THAT BY MAKING A NEW BUTTON WITH ALL THE ACTIONS YOU WANT IN A NEW DOCUMENT ON THE MASTER PAGE AND THEN COPYING AND PASTING THE NEW BUTTON INTO YOUR ORIGINAL FILE ONTO THE PAGE MASTER THIS USUALLY SOLVES THE PROBLEM.
-
Show / hide field based on text in another field
Hi,
I'm trying to make one of my fields reactive to what is the text generated in another field.
At the moment I have this under calculate using custom javascript:
var Mask = this.getField("Course").value;
if(Mask == 'Swimming') this.getField("Code").display = display.visible;
else this.getField("Code").display = display.hidden;
Whereas Course is the field that is changing and Code is the one that will show/hide based on content of Course.
Any help?Hi Everyone,
After doing trials with simple calculations it still wasn't working and so I've figured out what the problem is - the document was being exported but with the data being pre-populated from an SQL database in which during the export it all happens at once, not a chain effect so when the export happens it was filling "Code" before "Course" had any info in it...
The fix was basically having to create a different field in the SQL source itself for an independent field on the pdf form. -
Dynamic action - show/hide region based on LOV which returns ID
Hi folks,
this should be simple, so someone who works with dynamic actions.
I have a LOV which is based on below query:
select OBJECT_ID, KOD
from x_data x;
retuns:
ID KOD
492961 BMW
492964 VOLVO
492960 MERCEDES
492963 VOLKSWAGEN
492959 SKODAItem :P200_KOD is based on LOV which displays KOD and returns ID.
On my page I have also 1 region called TEST_REGION.
I would like to set up a dynamic action shich will SHOW/HIDE a TEST_REGION based on selected value in item :P200_KOD (LOV). Region should be showed if displayed (KOD) value of selected ID starts with 'V%'
By other words, if below query returns any record, then SHOW, else HIDE:
select *
from x_data x
where x.kod like 'V%'
and x.object_id = :P200_KOD;How should I define a triggering condition for dynamic action, for item :P200_KOD?
Thanks,
TomasHi,
One way:
Create advanced dynamic action.
Name : Hide region
Event : Change
Selection Type : Item(s)
Items(s) : P200_KOD
Condition : JavaScript Expression
Value :
$(this.triggeringElement).children("option:selected").html().substring(0,1) !== "V"Action : Hide
Fire On Page Load : True
Hide all page items on the same line : No
False Action : Show
Fire On Page Load : True
Show all page items on the same line : No
Selection Type : Region
Region : TEST_REGION
Regards,
Jari
http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0 -
Carl - Show Hide columns and report templates
Carl,
I've implemented the show/hide report column techniques from your demo pages. Thanks for that, it's working well.
I am having a slight issue. I'm using theme12, and when I implement the technique there with the alternating row color template, the functionality works fine. But when I switch to standard report template I have some issues.
Debugging the code :
function html_HideCellColumn(pId){
35 var l_Cell = html_GetElement(pId);
36 var l_Table = html_CascadeUpTill(l_Cell,'TABLE');
37 var l_Rows = l_Table.rows;
38 l_CellI = getCellIndex(l_Cell.parentNode,l_Cell)
39 for (var i=0;i<l_Rows.length;i++){
40 html_HideElement(l_Rows.cells[l_CellI]);
41 }
42 return;
the pId is what expect before line 35, but after, it looks like the html_GetElement is returning null.
Is there something in the template that would cause this change? I am able to reproduce this behavior consistently. Thanks for any input.Hello,
The table headers in the standard report template of that theme are missing the id attribute so changing this.
<th class="t12header" #ALIGNMENT# >#COLUMN_HEADER#</th>
to
<th class="t12header" #ALIGNMENT# id="#COLUMN_HEADER_NAME#">#COLUMN_HEADER#</th>
and your good to go.
Carl -
How to show/hide total based on selected column in column selector
Hello,
Is there a way to show/hide the total based on what column is selected in the column selector? Or alternatively to hide the total based on the column selected? I'm using OBIEE 10g.
Basically, I have a pivot table with a handful of row variables and one measure. Then I allow the user to select the column variable. The default is to have nothing, which I have achieved using the hidden/dummy column trick (Re: How to add new columns by using Multiselect However, if my pivot table is set to have a total, I now get 2 columns that are the same. When the user selects any other choice (e.g. gender), I would want to see Male, Female and the total. Something like this:
Default:
Count
East 10
West 20
Total 30
Gender:
Male Female Total
Count Count Count
East 6 4 10
West 14 6 20
Total 20 10 30
Any thoughts?
Thanks!I recommend using view selector instead of column selector
-
Show/Hide Fields Based on Dropdown
Hi,
I am attempting to show/hide subforms with a dropdown selection. I've found a lot of information on the subject, and have ended up with this as my script:
form1.Page1.Division::exit - (JavaScript, client)
switch (Page1.Division.rawValue)
case "1":
SubformZZI.presence = "visible";
SubformZZR.presence = "hidden";
break;
case "2":
SubformZZI.presence = "hidden";
SubformZZR.presence = "visible";
break;
However, it is not doing anything when a selection is made in the dropdown box. I have the "SubformZZI" initially set as "Visible" and the "SubformZZR" initially set as "Hidden".
Any suggestions?
Regards,
ZeroZoneYou have wrongly referenced the fields in your code.
Copy and paste the below code in the click event of the Submit button. It should work as expected.
The code thathas error is commented..
// First check if there are null values, then construct email using script
var vEmail = "";
var vSubject = "";
var vBody = "Attached to this email is a Field Service Issue - Parts Order Form for Job #" + Page1.JobNumber.rawValue + ".";
var vName = "";
var vCC = "[email protected]" + "," + Page1.RSM.rawValue + "," + Page1.IssueLeaderEmail.rawValue;
var vFormat = "PDF";
var errorMessage = "At least one required field was empty. Please fill in the required fields (highlighted) before continuing.";
// Check required fields and build error message
if (Page1.IssueLeaderEmail.rawValue == null)
errorMessage = errorMessage;
else
vSubject = "Field Service Issue - Parts Order Form for Job #" + Page1.JobNumber.rawValue;
// Check Division field
if (Page1.Division.rawValue == "Case Division")
//vEmail = Page1.SendFormToZZI.rawValue;
vEmail = Page1.SubformZZI.SendFormToZZI.rawValue;
//vCC = Page1.SendCopyToZZI.rawValue + "," + Page1.CSTZZI.rawValue;
vCC = Page1.SubformZZI.SendCopyToZZI.rawValue + "," + Page1.SubformZZI.CSTZZI.rawValue;
else
//vEmail = Page1.SendFormToZZR.rawValue;
vEmail = Page1.SubformZZR.SendFormToZZR.rawValue;
//vCC = Page1.SendCopyToZZR.rawValue + "," + Page1.CSTZZR.rawValue;
vCC = Page1.SubformZZR.SendCopyToZZR.rawValue + "," + Page1.SubformZZR.CSTZZR.rawValue;
// If fields required for script are null, warn user and do not initiate email
if (Page1.IssueLeaderEmail.rawValue == null)
xfa.host.messageBox(errorMessage, "Sending an email", 0, 0); // Send out a custom error message if any of these fields are null
else
// Everything is OK, send email
event.target.submitForm({cURL:"mailto: "+ vEmail +"?subject=" + vSubject +"&body=" + vBody + "&cc=" + vCC,cSubmitAs:"PDF",cCharset:"utf-8"});
Thanks
Srini -
Show/ Hide region based on button click
Hi,
I have two report regions. When I press generate report button then, one region has to be displayed.
I have an item "select list with submit " and if select some value from the LOV in the select list then the second region has to be displayed. Over all only one region has to be displayed at a time.
Thanks in advance.See this thread for a possible answer: Hide/Show Region With Javascript
Thank you,
Tony Miller
Webster, TX -
Show and Hide button based on PL/SQL or SQL return value ( Conditional Disp
Hi
I have a button on one of my pages.
It should be seen if the date field is entered.
It should not be seen if the date filed is null. I have procedure to return a boolean . How do I make button display conditional.
Any responses and hints appreciatedHi
I have a date field in the previous pages and when they enter date field in that form and submit, the date field value will be saved in the database. In the next page I want to check that date field and if the date field is entered in the previous page then only the button on my page should show up.
It's like if the date field in the database table is null ( if they donot enter in the previous page ) then in the next page my button should not be seen.
Thanks you for your response. -
APEX 4.1 show hide fields based on value of checkbox/radio
I am trying to successfully hide and show fields based on the value of a clicked checkbox. I am using a dynamic action, but it isn't working.
I followed the sample at Does Oracle Apex 4 enable the following AJAX features? (ie without the dev writing the Javascript) - Stack Overflow
I even tried a radio button, but it didn't work. I cannot uncheck the radio button. What am I doing wrong? Thank you for any help you can provide.Hi,
create a dynamic action for page load to hide the item which you wanna hide
now create another dynamic action
event : Click
Selection Type : Items
Items : P1_Check_box(name of the check box item)
condition : equal to
value : return value of the check box item (if you click the check box and the return value is 1 then just add 1)
in true actions
Action : Show
Selection Type : Items
Items : P1_Text_field(name of the field)
uncheck fire on page load
create exact opposite false action, that's it.
Regards,
Mohan. -
How to show/hide div based on mysql value
I have a dataset that has a column 'locked' that is a boolean that I want to use to remove a button on a form. The idea being that it will be set to 1 after a period of time thus removing the buttun that links to an update form and preventing the data from being changed. Currently, I have the field linked to a check box at the top of the table. How do I use this to hide the button (or any other html element for that matter) when set to 1 and show the element when set to 0? I understand I need to creat a php variable from the mysql boolean and then use a if/else loop to hide/display the html but I don't know how to impliment this? Thanks for any help offered.
Here's the code:
<?php require_once('Connections/testmypms.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_spec_rx = 10;
$pageNum_spec_rx = 0;
if (isset($_GET['pageNum_spec_rx'])) {
$pageNum_spec_rx = $_GET['pageNum_spec_rx'];
$startRow_spec_rx = $pageNum_spec_rx * $maxRows_spec_rx;
$colname_spec_rx = "1";
if (isset($_GET['pxID'])) {
$colname_spec_rx = (get_magic_quotes_gpc()) ? $_GET['pxID'] : addslashes($_GET['pxID']);
mysql_select_db($database_testmypms, $testmypms);
$query_spec_rx = sprintf("SELECT spec_rx.spec_rx_id, spec_rx.FK_px_id, DATE_FORMAT(spec_rx.spec_rx_date, '%%d-%%m-%%Y') as formatted_rx_date, spec_rx.FK_user_id, spec_rx.spec_rx_rsph, spec_rx.spec_rx_rcyl, spec_rx.spec_rx_raxis, spec_rx.spec_rx_rhprism, spec_rx.spec_rx_rhprismbase, spec_rx.spec_rx_rvprism, spec_rx.spec_rx_rvprismbase, spec_rx.spec_rx_rnadd, spec_rx.spec_rx_rnhprism, spec_rx.spec_rx_rnhprismbase, spec_rx.spec_rx_rnvprism, spec_rx.spec_rx_rnvprismbase, spec_rx.spec_rx_rintadd, spec_rx.spec_rx_rinthprism, spec_rx.spec_rx_rinthprismbase, spec_rx.spec_rx_rintvprism, spec_rx.spec_rx_rintvprismbase, spec_rx.spec_rx_lsph, spec_rx.spec_rx_lcyl, spec_rx.spec_rx_laxis, spec_rx.spec_rx_lhprism, spec_rx.spec_rx_lhprismbase, spec_rx.spec_rx_lvprism, spec_rx.spec_rx_lvprismbase, spec_rx.spec_rx_lintadd, spec_rx.spec_rx_linthprism, spec_rx.spec_rx_linthprismbase, spec_rx.spec_rx_lintvprism, spec_rx.spec_rx_lintvprismbase, spec_rx.spec_rx_lnadd, spec_rx.spec_rx_lnhprism, spec_rx.spec_rx_lnhprismbase, spec_rx.spec_rx_lnvprism, spec_rx.spec_rx_lnvprismbase, spec_rx.locked, users.user_id, users.user_firstname, users.user_surname FROM spec_rx, users WHERE %s = spec_rx.FK_px_id AND spec_rx.FK_user_id = users.user_id ORDER BY spec_rx.spec_rx_date DESC, spec_rx.spec_rx_id DESC", $colname_spec_rx);
$query_limit_spec_rx = sprintf("%s LIMIT %d, %d", $query_spec_rx, $startRow_spec_rx, $maxRows_spec_rx);
$spec_rx = mysql_query($query_limit_spec_rx, $testmypms) or die(mysql_error());
$row_spec_rx = mysql_fetch_assoc($spec_rx);
if (isset($_GET['totalRows_spec_rx'])) {
$totalRows_spec_rx = $_GET['totalRows_spec_rx'];
} else {
$all_spec_rx = mysql_query($query_spec_rx);
$totalRows_spec_rx = mysql_num_rows($all_spec_rx);
$totalPages_spec_rx = ceil($totalRows_spec_rx/$maxRows_spec_rx)-1;
$colname_demographics = "1";
if (isset($_GET['pxID'])) {
$colname_demographics = (get_magic_quotes_gpc()) ? $_GET['pxID'] : addslashes($_GET['pxID']);
mysql_select_db($database_testmypms, $testmypms);
$query_demographics = sprintf("SELECT demographics.px_id, demographics.FK_title_id, demographics.firstname, demographics.surname, DATE_FORMAT(demographics.dob, '%%d-%%m-%%Y') as formatted_dob, title.title_id, title.title FROM demographics, title WHERE %s = demographics.px_id AND demographics.FK_title_id = title.title_id", $colname_demographics);
$demographics = mysql_query($query_demographics, $testmypms) or die(mysql_error());
$row_demographics = mysql_fetch_assoc($demographics);
$totalRows_demographics = mysql_num_rows($demographics);
$queryString_spec_rx = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_spec_rx") == false &&
stristr($param, "totalRows_spec_rx") == false) {
array_push($newParams, $param);
if (count($newParams) != 0) {
$queryString_spec_rx = "&" . htmlentities(implode("&", $newParams));
$queryString_spec_rx = sprintf("&totalRows_spec_rx=%d%s", $totalRows_spec_rx, $queryString_spec_rx);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Spec Rx3</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
//-->
</script>
</head>
<body>
<p>Spec Rx</p>
<p><?php echo $row_demographics['px_id']; ?></p>
<p><?php echo $row_demographics['title']; ?> <?php echo $row_demographics['firstname']; ?> <?php echo $row_demographics['surname']; ?> <?php echo $row_demographics['formatted_dob']; ?> </p>
<p>
<input name="Add_spec_rx" type="button" id="Add_spec_rx" onClick="MM_goToURL('parent','add_spec_rx.php');return document.MM_returnValue" value="New Rx">
</p>
<p> <a href="<?php printf("%s?pageNum_spec_rx=%d%s", $currentPage, max(0, $pageNum_spec_rx - 1), $queryString_spec_rx); ?>">Previous</a> <a href="<?php printf("%s?pageNum_spec_rx=%d%s", $currentPage, min($totalPages_spec_rx, $pageNum_spec_rx + 1), $queryString_spec_rx); ?>">Next</a></p>
<?php do { ?>
<table border="1" cellspacing="1" cellpadding="5">
<tr>
<td> </td>
<td><?php echo $row_spec_rx['formatted_rx_date']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_id']; ?></td>
<td>locked:
<input <?php if (!(strcmp($row_spec_rx['locked'],1))) {echo "checked";} ?> name="locked" type="checkbox" id="locked" value="1"></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Sph</td>
<td>Cyl</td>
<td>Axis</td>
<td>HPrism</td>
<td>HPrismBase</td>
<td>VPrism</td>
<td>VPrismBase</td>
<td>NrAdd</td>
<td>NrHPrism </td>
<td>NrHPrismBase</td>
<td>NrVPrism</td>
<td>NrVPrismBase</td>
<td>IntAdd</td>
<td>IntHPrism</td>
<td>IntHPrismBase</td>
<td>IntVPrism</td>
<td>IntVPrismBase</td>
</tr>
<tr>
<td>R</td>
<td><?php echo ($row_spec_rx['spec_rx_rsph']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_rsph']) : null; ?></td>
<td><?php echo ($row_spec_rx['spec_rx_rcyl']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_rcyl']) : null; ?></td>
<td><?php echo $row_spec_rx['spec_rx_raxis']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rhprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rhprismbase']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rvprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rvprismbase']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rnadd']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rnhprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rnhprismbase']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rnvprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rnvprismbase']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rintadd']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rinthprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rinthprismbase']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rintvprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_rintvprismbase']; ?></td>
</tr>
<tr>
<td>L</td>
<td><?php echo ($row_spec_rx['spec_rx_lsph']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_lsph']) : null; ?></td>
<td><?php echo ($row_spec_rx['spec_rx_lcyl']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_lcyl']) : null; ?></td>
<td><?php echo $row_spec_rx['spec_rx_laxis']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lhprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lhprismbase']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lvprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lvprismbase']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lnadd']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lnhprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lnhprismbase']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lnvprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lnvprismbase']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lintadd']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_linthprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_linthprismbase']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lintvprism']; ?></td>
<td><?php echo $row_spec_rx['spec_rx_lintvprismbase']; ?></td>
</tr>
<tr>
<td> </td>
<td>User ID <?php echo $row_spec_rx['user_id']; ?></td>
<td><?php echo $row_spec_rx['user_firstname']; ?></td>
<td><?php echo $row_spec_rx['user_surname']; ?></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<p> </p>
<?php } while ($row_spec_rx = mysql_fetch_assoc($spec_rx)); ?>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>
<?php
mysql_free_result($spec_rx);
mysql_free_result($demographics);
?>Thanks for your help, nearly worked but only returned results where the if statement was met ie where locked =0, so I used an additional statement to display something else when when locked=1
<?php
if($row_spec_rx['locked'] == 1) {
echo "button html goes here";
?>
<?php
if($row_spec_rx['locked'] == 0) {
echo "something else";
?>
I am sure there must be a more elegant way of doing this! -
Hey everyone,
Is there a way I can create a "Show" button that would be
visible to users when they click "Hide" (or X) on the nav bar? The
team I'm working with doesn't think that making users click the
Contents, Search, or Index button to "Show" the navigation pane
would be intuitive enough.
Also, how do I hide the "Show" link in a context-sensitive
help window? Some people are thinking that we need to hide this,
thereby "forcing" them to click the "main" help button in the Help
menu, but I disagree.
Thanks,
JimI understand the concern but most folks seem to work it out.
If you cick X, you know you have done it and will look for ways
back. That usually involves clicking anything in site! I don't know
of a solution.
How does hiding Show, forcing the user to close that, open
the main help and start over, help them? Yes you are forcing them
but you are not helping them and I agree with you. You can hide
Show by deselecting the show navigation in the wizard but it's a
bad move. With show enabled, they can see the topic they first went
to, its place in the structure and they can navigate from their.
Much more intuitive. -
Show/Hide fields based on choices in drop down menu
I need help with a script that I cobbled together from an example script; I'm not good enough at java to edit it for my needs.
I have a form where I would like different drop down fields would be visible/hidden depending on the choices made from other drop down menus.
If (for example) they select paper type "white" or "color" then "white" will result in a second menu of paper choices, the "color" selection result in them picking the paper wieght, then from there the color.
My problem stems from the fact that my form is very linited in space, so I would like some of these fields to be essentially on top of each other; visibility dependant on previous choices. I can get to Menu 1 (select paper color) and then Menu 2 if they select white. But there's a problem with setting up a third menu in this series, if they select "color" from Menu 1, then I try to have a drop down for paper weight, all the fields except for Menu 1 are hidden. Playing with the script let me have them all visible, but again, I'm limited on space and can't really spread them out.
I know I'm missing one small command... somewhere.
Here is the script I'm working with:
function control_section_fields() {
if (event.willCommit) return;
// Get the value selected in the combo box
var section = event.changeEx;
// Hide all of the entry fields
getField("sec").display = display.hidden;
// Reset all of the entry fields
resetForm(["sec"]);
// Display the fields for the selected section
getField("sec." + section).display = display.visible;
where the drop down fields are named "sec.a.dd" for example, and the Export value of different values are assigned as "a", "b", etc.
Sorry for the rambling. Any help will be greatly appreciated.also, if "==" could be roughly translated to "is", "!=" would mean "is not".
JavaScript is Case sensitive so make sure you did not name your field STATE#1 instead. It's a pretty common error. Try not to use special characters when naming fields. Stick to standards. I personnally always name fields with capital letters and numbers using identation like
MYFORM.PLACE.NUMBER
MYFORM.PLACE.ADDRESS
MYFORM.SEX.MALE
MYFORM.SEX.FEMALE
This is really useful if you have lots of fields related to one another. You can then apply methods to entire groups of fields in one simple line of code.
For example this.getField("MYFORM").display = display.hidden would hide all four fields. It works kind of the same way as folders unside your computer.
Finally, "#" is generally used as widget identification. I think this is what happened. If you copy a field, it retains the same name and some of its charateristics but acrobat will assign them a number called widget. The original field State will get the identification State#0 in the right pane as it is 0-based. The copie will be identified State#1. You must understand that the name of the field is still "State". Some methods (actions you can code) let you determine the widget number for targetting a specific field from those you copied. It is not the case here. So for disambiguation, you should name your fields different name like STATE1 and STATE2, or STATE.1 and STATE.2 if you plan to use what I wrote about earlier. -
Using javascript to show/hide buttons
I need to show a hidden button on a slide, but I need to do it from within a javascript that is being called. Does anyone know how to do this? I know there are functions you can use to get/set variables (cpEIGetValue) but I don't know how to access &/or manipulate objects...
Help?
Thanks - MonicaHello,
I'm sure this could work with advanced actions
Since I have been blogging and writing a lot about advanced actions, perhaps I could help to debug? If this is acceptable to you, I will have a look at your actions, and try to understand what you want to realize. What do you think?
Here is a link to my blog, just to prove my credibility:
lilybiri's posterous
Lilybiri
Maybe you are looking for
-
Hi I am using SAP 8.8 PL 16 Inventory valuation method is FIFO. One of our consultant has entered opening balance for a particular item and selected check box Allow initial quantities without price. While issuing this item it gived error Item cost no
-
Inventory Audit Report - Not followed FIFO and Batch management
I have created an Item say XYZ, with Batch management and valuation methode FIFO. Then I have created a batch say 1 with posting of opening balance transaction with posting date as 1st April 2009. Now when I post an A/R Invoice with posting date as 1
-
Crystal Reports 2008 - startswith problem
Hi, I'm encountering a problem with the "startswith" function. We have an application that is capable to run custom made reports by our users. One of this reports has used the record selection formulas to filter out some data. And here is where the f
-
I feel I should receive credit for already purchasing this single a few weeks ago if I purchase Heroine. I shouldn't have to pay for it twice, and to add insult to that is is now Free to download this week.
-
MacBook Pro not turning on, please help!!
I have no clue what is wrong with it. I shut the screen so I could move the computer to my room, then bam. Nothing. It's like it's dead. I didn't do anything to update it or add anything to it. It is a MacBook Pro 15in from 2011. The battery buttons