Javascript Help - Customising buttons to display varied data

Hi there,
I'm looking for some Javascripting help since I'm new to this form of scripting. In the report template I'm creating, I need to have a series of radio buttons with each being able to display a different amount of data when selected. So for example, if you choose option a and hit the select button: one layout for the document is shown, option b: another different layout would display, etc.
Here's a link to an existing pdf which demonstrates what I'm looking for in the second half of the page. The pdf is locked so I can't look at the existing coding or anything that they've used. Any help would be greatly appreciated~ Thanks.
http://www.lands.nsw.gov.au/_media/lands/pdf/rp_dealings_interactive/01T_v3-2.pdf

Nariko,
Place your "different amounts of data" in their own subforms. Have each subform default as hidden so that they won't show. Next in the change event for the radio button group place the following javascript (this assumes your radio button group has it's values bound as 1, 2, & 3):
if(this.rawValue == 1)
subForm1.presence = "visible";
subForm2.presence = "hidden";
subForm3.presence = "hidden";
else if(this.rawValue == 2)
subForm2.presence = "visible";
subForm1.presence = "hidden";
subForm3.presence = "hidden";
else if(this.rawValue == 3)
subForm3.presence = "visible";
subForm1.presence = "hidden";
subForm2.presence = "hidden";
This will display and hide the objects in the various sub forms based on which radio button is selected.

Similar Messages

  • I need a button to display the date and time

    I want the date and time to display in a textfield. I am thinking the best way to go about this is to have a hidden button in the field, so that when the user clicks in the field the date and time will automatically appear. I need help with some code (not really sure of how the code should look). Should the code go in the click or initialize event?
    Thanks for your help

    I figured it out.
    Thanks!

  • Runtime :Javascript problem when trying to display the date binded to RFC

    Hi all,
    I am facing a very strange problem. I Have used a Bapi to pass some inputs to the Bapi function and binded the UI with that. But for the date field when i am running the application and trying to specify some date it is giving some Javascript Error and not Showing the date Dialog box
    The Error is "SAPUR_January is null or not an object"
    Is anyone has any idea on it, then please let me know at the earliest.
    Mukesh

    Hi armin and Mani
    For armin: I did't understand for what you are refering to.
    For Mani: Hi mani those are the Input fields and by default they are binded to the Date field only and user has to supply the date parameter. The Small box that comes when you bind a UI field with the Date type when i am clicking on that i am reciving that error.
    Mukesh Poddar

  • How do I create a Display variant in VKM1

    Can some please tell me how to create a display variant for trx: VKM1??

    go to transaction VKM1, enter your search criteria click execute
    Now, the following link would help you on topic display variants which is in form of PDF file
    [display variant|www.geocities.com/jim_mazzullo/Display_variants.pdf]

  • Want to customise the message display by adding extra text in Logon Help forgot password link

    Dear All,
      I am implementing Forgot Password functioanlity or link in my Portal ( SAP EP7.0).I am getting "Logon Problem ? Get Support " link in my Portal welcome page.When I am clicking this link ,I am getting pop up asking me to enter user id and mail id.Everything is working fine.
    But my real concern is I want to customise the message display in case wrong user id or mail id or wrong question answer.
    The current message displaying as "User information incorrect. Cannot send e-mail with new password" and I want to display it as
    "User information incorrect. Cannot send e-mail with new password ,Please contact your Administrator"
    If I will tell in one sentence ,I want to customise the message display by adding extra text
    For example: "User information incorrect. Cannot send e-mail with new password"
    Requirements:"User information incorrect. Cannot send e-mail with new password ,Please contact your Administrator "
    Kindly help em out  how to do it ................
    Thanks,
    Sanjay Mohanty

    Hi,
    Until you have only played around with the layout of the logon page and not the actual code then you will be able to use this property. There are bits of code in the logon par which retreives these values.
    For eg you can see the below if statement in the logon page to determine if logon help has to be displayed. This is part of standard logo page so if you have not removed this in your custom one everything should work just fine.
    <% if ( logonBean.getLogonHelp() ) { %>
    Also check this link:
    http://help.sap.com/saphelp_nw70/helpdata/en/45/7e6313d8780dece10000000a11466f/frameset.htm
    Regards,
    Vijith

  • How to display multiple data from different table in one table? please help

    Hi
    I got sun java studio creator 2(the separate installation not the one in the net beans)....
    My question is about displaying data that have been taken from the database.... I know how to display data in a table(just click on the table "bind data" )... but my question is that:
    when i want to use a sql statement that taken the data from different table...
    how can i display that data in the table(that will be shown in the web) ??? when i click bind data on the table i can only select one table i can't select more than one....
    Note:
    1) i'm using the rowset for displaying the data in the table, since the sql statement is depending on a condition(i.e. select a from b where c= ? )...
    2) i mean by different table is that( i.e. select a from table1,table2 )..
    thanks in advance...

    Hi,
    937440 wrote:
    Hi every one, this is my first post in this portal. Welcome to the forum!
    Be sure to read the forum FAQ {message:id=9360002}
    I want display the details of emp table.. for that I am using this SQL statement.
    select * from emp where mgr=nvl(:mgr,mgr);
    when I give the input as 7698 it is displaying the corresponding records... and also when I won't give any input then it is displaying all the records except the mgr with null values.
    1)I want to display all the records when I won't give any input including nulls
    2)I want to display all the records who's mgr is null
    Is there any way to incorporate to include all these in a single query..It's a little unclear what you're asking.
    The following query always includes rows where mgr is NULL, and when the bind variable :mgr is NULL, it displays all rows:
    SELECT  *
    FROM     emp
    WHERE     LNNVL (mgr != :mgr)
    ;That is, when :mgr = 7698, it displays 6 rows, and when :mgr is NULL it displays 14 rows (assuming you're using the Oracle-supplied scott.emp table).
    The following query includes rows where mgr is NULL only when the bind variable :mgr is NULL, in which case it displays all rows:
    SELECT     *
    FROM     emp
    WHERE     :mgr     = mgr
    OR       :mgr       IS NULL
    ;When :mgr = 7698, this displays 5 rows, and when :mgr is NULL it displays 14 rows.
    The following query includes rows where mgr is NULL only when the bind variab;e :mgr is NULL, in which case it displays only the rows where mgr is NULL. That is, it treats NULL as a value:
    SELECT     *
    FROM     emp
    WHERE     DECODE ( mgr
                , :mgr, 'OK'
                )     = 'OK'
    ;When :mgr = 7698, this displays 5 rows, and when :mgr is NULL, it displays 1 row.

  • Action buttons to display orders per specific period - Agentry

    Hi;
    I am working on SAP Work Manager 6.0 customizing using Agentry 6.1.3. I have these two toolbar buttons that I have created, that is, "Previous Week" and "Next Week". I would like to say, when the use clicks on "Previous week", only Orders for the previous week should be displayed and when they click on "Next Week", only orders of next week should be displayed. By default the current week should be displayed on the device. Would I have to do 3 different fetches to implement this, that is, by default, fetch the current week orders, when the user clicks the "Previous Week" button, do another fetch for that previous week and when they click "Next Week", do the fetch of the orders for next week?!
    Please kindly advise as to how best I could implement this?!
    Much appreciated!!;
    Sizo Ndlovu

    Hi Stephen, Jason;
    Thanks for all the help! Currently the date field that I have coming from the back-end is only a DATE field with no time, would it work to compare this date to the Agentry Epoch time or would I need to bring in a timestamp? Please kindly see my Include rule below:
    Note that the WeekEnd and WeekStart properties are of "DATE and TIME" property and the DATE property is of property type "DATE".
    I have created 3 transactions, 1 that stamps the date and time to both WeekStart and WeekEnd, another one that adds 604800 to each property, that is, WeekStart and WeekEnd and finally another one that subtracts 604800 from both properties as well. The Initial Value rule I uses is as follows:
    The first transaction that stamps the weekstart and weekend properties, with the javascript:
    Is my Javascript rule in order?
    The 2nd transaction for Adding one week :
    I made use of an edit transaction, is this appropriate or I would need an add transaction?
    The 3rd transaction that subtracts one week:
    And then finally, on the actions sitting on the "Previous Week" and "Next Week" buttons, I put the 1st action step as the transaction for determining the current weekstart and weekend, followed by an applystep and then the 4th step is the transaction that subtracts/adds, followed by an apply.
    Currently, when I click on these buttons, the tile list is cleared, I'm thinking it possibly could be my javascript rule or the comparison between the DATE and epoch time.
    Please advise?!
    Much appreciated!
    Sizo Ndlovu

  • Executing javascript code for button click

    in my application i have report page where i am displaying table data when i click a button it selects first row and returns it using htp.prn() now i m getting that record in jvascript now i want to execute this java script code when the button is clicked i tried using onClick attribute but it didn't work can anyone tell me how to do it?

    Hi,
    I think this is related to Application express, right ?
    You could post your question in Application Express forum
    Oracle Application Express (APEX)
    Also please give more detail about your issue. Post e.g. code (pl/sql & javascript) you try to use.
    Also if you setup sample about your problem to http://apex.oracle.com will help others to help you.
    Help us to help you =)
    Br, Jari

  • Adding functionality in "Display Additional Data"

    Hi!
    I need to add additional functionality in a standard transaction. I want to place a new option in the drop down of the Icon "Display Additinal Data" (seen on the picture in the red rectangle). By selecting this new option, a method or a function modul should be called, importing the selected lines of the table. I wanted to ask, what you think is the way to do this?
    I tried to use Transaction shd0 to create a new Screenvariant, but i don't think that this is the right way, as a screen variant only disables or hides buttons, or is there a way to add something with a Variant.
    Maybe someone has had the same problem and can give me a solution,
    kind regards,
    Hannes

    Hello All,
    I got the processes of how to add new list & text boxes in shipment additional screen.
    But now, i'm facing the problem initially. When i want to add the new field in the append structure of table VTTK, i can add that new Z field (Z field with a Z domain) & this field has a check table which will populate some pre-defined values in the list, but after adding that field i couldn't get the list in which this new field should populate the values from the check table.
    If anybody has the solution, then pls help me out.
    Warm regards,
    Kingshuk.

  • Javascript to enable button and open popup needed

    Hello all,
    I have a form with a report that contains a checkbox. The user is to provide a document id which is applied to all checked items in the report. The problem is I need them to view the document referenced first and verify it is correct.
    My approach has been ...
    1) disable the apply button
    2) create a validate document button
    3) when validate is pressed open popup with document displayed, as well as enable apply button
    4) Provide button on display screen to close the popup window
    5) When apply button is pressed use a cursor to update all marked records
    The problem I am running into is I can get the javascript on button press to open the new window, or to enable the button, but not both. I have tried with inline javascript as well as with a function in the page header.
    Any help would be greatly appreciated.
    --Adam Cumming, Marion County, OR ([email protected])                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Wouldn't you know it. As soon as I post to the forum I figure it out...
    FYI here is the function that works...
    function html_EnableItem(a)
    var Elem_1 = document.getElementById(a);
    Elem_1.disabled = false;
    var LF_View = window.open('f?p=&APP_ID.:120:&SESSION.:::::', 'LF_Preview', 'width=800, height=600, toolbar=0, status=0');
    }

  • The icons for the Personas Plus and Video Download Helper extensions are not displaying on a fresh install of Firefox 3.6.12

    I had to do a complete uninstall and reinstall of my up-t0-date Firefox due to another problem (it would only open one window), but after reinstalling my extensions, their icons were not displaying.
    I uninstalled and reinstalled again, but the Personas Plus fox will not display in the status bar, and the Video Download Helper icon will not display in the Navigation toolbar, and is not available in the Customize Toolbars menu.
    These extensions worked fine before. What's wrong now?

    You need to set options in those add-ons and/or use Customize Toolbars. Always look at instructions on each add-on's page at https://addons.mozilla.org/ ,
    -search for and locate the add-on,
    -open the page for that add-on,
    -review the information there,
    -then visit and bookmark the developer's home page shown on the add-on page; many add-on developers also have a forum for questions, so look for a link on the developer's home page.
    Most questions can be answered in one of those places.
    <u>'''ABP'''</u>: Tools > Add-ons > Extensions, locate and click on ABP, click Options, in ABP interface, click on Options tab, if no check mark at "Show in toolbar" or "Show in status bar", you can click on each of those items to place a check mark and they will show in one or both places. On the add-ons page https://addons.mozilla.org/ visit and bookmark the developer's home page and forum.
    <u>'''NoScript'''</u>
    '''''For the toolbar''''': scroll down on the following to the paragraph in the first section beginning with "A set of toolbar buttons is also provided:" and read that section: http://noscript.net/features#basics . It gives instructions on using the Customize Toolbar function to place the icon on your toolbar. Also see:
    ''' [[Back and forward or other toolbar buttons are missing]]'''
    '''[[Navigation Toolbar items]]'''
    '''[http://support.mozilla.com/en-US/kb/How+to+customize+the+toolbar How to customize the toolbar]'''
    '''''For the Status Bar''''': Tools > Add-ons > Extensions, locate and click on NoScript, click Options, click Advanced tab, check your preferences; see 4th image on: http://noscript.net/screenshots
    <u>'''IE Tab 2'''</u>: Tools > Add-ons > Extensions, locate and click on IE Tab 2, look under "Image Gallery", 3rd row, 1st image: https://addons.mozilla.org/en-US/firefox/addon/92382/ . Unfortunately, this developer has moved his home page and not updated the add-ons page. I use IE Tab Plus (formerly Coral IE Tab).

  • Mapping Javascript Text to Buttons Automatically

    I know how to throw javascript into individual buttons in Acrobat.  However, we are generating a document with thousands of buttons, most of which will have similar javascript and will behave similarly (e.g. clicking on a button will open to a different page view, perhaps in another document in the same folder.)  I would like to be able to write the javascript text for each button using a VB macro to create a txt file for each button.  I know how to do this also. 
    What I do not know how to do, or even know if it is possible is to automate a process of tying the respective javascript that was generated in the txt files to buttons.  I assume the easiest way to do it is use a naming convention for each button that mimics the naming convention for my txt files.  This will allow for each button to identify with the text within it's respective txt file.  That leaves only one problem:  Finding a way to automate the transfer from each txt file to each button's javascript.  Can I write a script to do this?  If so, what is the best platform?  Can I do that with Javascript inside Acrobat?  I'm guessing that I can, but I'm so new to javascript that I'm not sure how to go about doing it.  fyi, i've written alot of vb code, which isn't the same, but at least i have a decent amount of code experience...i just need to learn javascript syntax and pdf structure. One last question:  Might it be possible and maybe even easier to insert the javascript from an external source like a VB program using the Adobe SDK?  Can the SDK do that?  I've messed with the SDK before and it appeared to have very limited operability on PDF's.

    Thanks to everyone who has helped me learn this stuff.  I've been looking at the pages and references that you have given me so far.  Now I can manipulate PDF with VBA code written in excel.  It's very similar to the scrips shown for a standalone VB program, just some differences in document declaraion (particularly in using objects).   I've noticed in the VBA (excel) script i can't get the "props" of an existing annotation, but I can for one that I'm just creating....
    'Defining Stuff, I have alot more variables but I'm just showing the ones pertinent to my quandry.
    Dim acroannotation As Acrobat.AcroPDAnnot
    Dim props As Variant
    Dim myAnnot As Object
    'This works:
    Set myAnnot = jso.AddAnnot
    Set props = myAnnot.getProps
    'This doesn't:
    Set acroannotation = Acropage.GetAnnot(1)
    Set myAnnot = acroannotation
    Set props = myAnnot.getProps
    I noticed in the SDK, the examples show props being defined as an object just like 'myAnnot.'  However, at the end of the VB tutorial, it indicates that I should use variant for most JSObject references.  That doesn't really matter.  What does matter is that I can't figure out how to get the 'props' object from an existing annotation.  Am I doing something wrong in trying to reference it?  It gives me the ole' Runtime Error 438: Object does not support this property or method, which usually means a type mismatch.  I also tried "Set props = acroannotation.getProps", thinking that actually referencing the Annotation object instead of the "Object" object, but I still got the same error.
    Finally, when I do figure out how to getProps for an existing annotation (the annotation is a button by the way, but I don't think that matters), I still have yet to find any reference as to how to use the "setAction" method for a button through the JSObject.
    Thanks for any input on the matter.

  • How to display the data?

    hi all,
    Im using Java NetBeans IDE 4.1 to create an application. I have connected my apllication to MS Access database by ODBC and then retrieved the data of a field named "student-name" by using method b]ResultSet() , this retrieve all of the name student and store into a single variable, after that, i used Whike() loop and .next() method to read the data stored in the variable and then display all of the data. but i face some problem in displaying the data....
    1) if i display the data using jLabel, then just the last record (eg,last name) will be displayed.
    2) if i display the data using jTextArea and its method ( void append() ), then the record can't be displayed separately row by row.
    Actually I would like to display the retrieved data in 2 way:
    A) display every record in the variable separately row by row by using a single component. And then allow the user to select any certain record.
    B) display all of the records in variable one by one from 1st record to last rocord by using jLabel. Once i click on a button, the 1st record will be showed on the jLabel, if i click again the button then the 2nd record will be showed.
    can anyone help me???
    Thanks,
    ning

    Thanks,
    I have read the information that provided by you. I have made a testing by using the coding provided in that web page. The following is a part of my coding, is it any mistake of that? The coding can be compiled but can't display any data in the list ( i place the code in a event of a button, can i do like that?).
    import java.sql.*;
    import javax.swing.*;
    public class testing2 extends javax.swing.JFrame {
    public testing2()
    initComponents();
    private void initComponents()
    jButton1 = new javax.swing.JButton();
    jList1 = new javax.swing.JList();
    getContentPane().setLayout(null);
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jButton1.setText("jButton1");
    jButton1.addActionListener(new java.awt.event.ActionListener()
    public void actionPerformed(java.awt.event.ActionEvent evt)
    jButton1ActionPerformed(evt);
    getContentPane().add(jButton1);
    jButton1.setBounds(20, 20, 90, 23);
    getContentPane().add(jList1);
    jList1.setBounds(20, 70, 200, 200);
    pack();
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    DefaultListModel listModel = new DefaultListModel();
    listModel.addElement("Alison Huml");
    listModel.addElement("Kathy Walrath");
    listModel.addElement("Lisa Friendly");
    listModel.addElement("Mary Campione");
    listModel.addElement("Sharon Zakhour");
    listModel.addElement("Alan Sommerer");
    JList List = new JList(listModel);
    public static void main(String args[])
    java.awt.EventQueue.invokeLater(new Runnable()
    public void run()
    new testing2().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JList jList1;
    // End of variables declaration
    Thanks,
    ning.

  • WAD: Add variable to a called javascript function on button group item

    Hi All,
    I need your expertise regarding the following problem:
    To increase performance, I've decided to hide all analysis tables. To set these tables to visible, there is a button to switch the state for each table.
    Because this function is needed for each table, the function has two parameters for the analysis item name and the new state.
    Unfortunately, I get an useless error message after calling the function.
    The function in script item looks like
    function switchTable(itemName, newState)
    The function is started by a button of a button group item as javascript and the following script function
    switchTable('ANALYSIS_ITEM_1', 'VISIBLE')
    If I enter a without parameters, that will call the function with these parameters, it works.
    But if i try this directly from the script function in the button parameters, the function will be called correctly, but an error occurs and the analysis item wasn't displayed or the sendCommand wasn't processed completely.
    I hope there is a way to call javascripts by a button with variables, otherwise I would have to create many functions with only an other item_ref.
    Many thanks in advance and points of course for any help.
    Regards,
    Tobias

    One short note:
    It's possible to trigger the same function by an html input form button with onlick switchTable('ANALYSIS_ITEM_1', 'VISIBLE')
    and this works.
    Has anyone an idea what's the problem with a normal button item of the button group item?
    Another possibility is a menu item. The functions were called, but errors were shown.

  • Apex generating javascript to disable button onClick

    I have navigational buttons in a region to go, for example, to the "Next" page.
    APEX is including:
    onClick="javascript:this.disabled=true;"
    as part of the "Next" buttons attributes.
    So that after the user clicks the "Next" button and goes to the next page,
    if they click the browsers Back button, the "Next" button is indeed disabled.
    The Next button is disabled in FireFox but remains enabled in IE. Thus causing
    confusion for the user using FireFox.
    So I'd like to have APEX not generate this javascript at all.
    Is there a way to turn that off? Some switch on the page/region/button that I'm
    not seeing?
    Or is this just the old browser back button problem?
    Thanks in advance.

    I have processes that make calls to packages on the back-end so I don't know if importing it into the Oracle Apex hosted environment will work.
    This may or may not help but these are the page by page steps I took in creating these buttons.
    1- Click the "Create" button icon in the "Buttons" area in the "Page Rendering" column.
    2- "Select a region for the button:" (Gave it an existing region to reside in).
    3- Choose: "Create a button in a region position"
    4- Give it a Name and a Label. Click "HTML Button". Leave the default "Submit Page and Redirect to URL".
    5- Choose a Region Position, Sequence, Alignment (under "Button Attributes" is where I assigned it a style but NOT for this button).
    6- Choose a page to branch to.
    7- Click "Create button". (no display condition chosen if you clicked the Next button).
    8- Run Page
    9- View the Source
    There it is:
    <input type="BUTTON" value="Test" onClick="javascript:this.disabled=true; doSubmit('TEST');" >
    and it also creates the Branch that redirects to the page I specified based on the buttons name (I think it uses name, still a little new to this).
    so i dunno. 8-( Just wondered if that sequence of events seems normal.

Maybe you are looking for

  • GRN w.r.t outbound delivery

    Hi Gurus, Even though GRN has not been done, i am getting the following error while doing GRN against outbound delivery. "Goods receipt not possible for delivery : error code 4". Error code 4 is" There are no delivery items". message no. M7865. Regar

  • SOA suite licensing for production use

    Hi, I have been toying around with JDeveloper 11g and Oracle SOA Suite 11g and finally I can now say I am in a position to recommend to start moving the organisation's business processes and enterprise integration gradually to this framework. However

  • The majority of Terminal command, "not found"

    When I was trying to mess around with my Kinect camera on my iMac today, via Terminal, I noticed a peculiar thing occurring when I tried to use even the most basic of Terminal commands. For example, I typed in "ls" to try to list the directories and

  • UCS P81E Virtual Interface Card

    Hi all, This is a newbie question. 1. Is the UCS P81E Virtual Interface Card compatible with Cisco Catalyst 3750-X and 3560-X Series Switches 10GE Network Module (C3KX-NM-10G)? 2. Does VIC require a DCE switch such as the Nexus 5000? 3. Does VIC requ

  • Third-party RAM versus Apple RAM

    Hey everyone, Excuse me if this has been answered before, I did a search and didn't really find what I was looking for. I'm about to buy a new MBP and I would like to know how people think the quality of third-party RAM (Crucial and the like) fares a