Conditional processing of JavaScript by using the value of the item page

Dear experts,

I have the following code to draw a Gantt chart and need to package some steps. They should only appears if the date values are not null or not zero.

I tried the following, as you can see in my code. However, the first line is always printed even if the value of my article on page P1112_GP_AUFTAKT_START is null or zero (display value).

Can you please give me a hint how to do conditional processing in my case?

I appreciate your help!

Thank you very much

SEB
<script>
  var g = new JSGantt.GanttChart('g',document.getElementById('GanttChartDIV'), 'day');
  g.setShowRes(0); // Show/Hide Responsible (0/1)
  g.setShowDur(1); // Show/Hide Duration (0/1)
  g.setShowComp(1); // Show/Hide % Complete(0/1)
  g.setCaptionType('Caption');  // Set to Show Caption
  g.setShowStartDate(1); // Show/Hide Start Date(0/1)
  g.setShowEndDate(1); // Show/Hide End Date(0/1)
  g.setDateInputFormat('dd/mm/yyyy') 
  g.setDateDisplayFormat('dd/mm/yyyy') 

  if( g ) {
    if ($x('P1112_GP_AUFTAKT_START').value != null || $x('P1112_GP_AUFTAKT_END').value != null || $x('P1112_GP_AUFTAKT_START').value != 0 || $x('P1112_GP_AUFTAKT_END').value != 0 || $x('P1112_GP_AUFTAKT_START').value != ""  || $x('P1112_GP_AUFTAKT_END').value != "")
   
       {g.AddTaskItem(new JSGantt.TaskItem(1, 'Auftaktveranstaltung'    ,  $x('P1112_GP_AUFTAKT_START').value , $x('P1112_GP_AUFTAKT_END').value    ,  'fff600', '', 0, 'LWF',  100, 0, 0, 1));}
     
     g.AddTaskItem(new JSGantt.TaskItem(2, 'Kartierung LRT Flachland', $x('P1112_KART_LRT_START').value  , $x('P1112_KART_LRT_END').value  ,  '00a3ff', '', 0, 'LWF',  20, 0, 0, 1, "1"));
     g.AddTaskItem(new JSGantt.TaskItem(3, 'Inventur LRT Flachland'  , $x('P1112_INV_LRT_START').value , $x('P1112_INV_LRT_END').value ,  'ff6347', '', 0, 'LWF',  30, 0, 0, 1, "1"));

    g.Draw();     
    g.DrawDependencies();


  }
  else
  {
    alert("not defined");
  }

</script>

Hello

Try

if($v('P1112_GP_AUFTAKT_START').length>0 ||
 $v('P1112_GP_AUFTAKT_END').length>0   ||
 $v('P1112_GP_AUFTAKT_START')*1 != 0 ||
 $v('P1112_GP_AUFTAKT_END')*1 != 0 ||
){
/* your code */
}

Kind regards
Jari

Tags: Database

Similar Questions

  • read the value of the item page after filling value pop-up window

    I can't read or insert and also I cannot perform dynamic action of a page element data after the filling of the data page of the window popup (pass back to the point of the page). But I can read and insert, perform a dynamic action data while filling in the data using ajax and PLSQL code...


    How to read the value after the filling of database page popup window?


    SKUD

    Set value using Javascript is that in your browser page but is not yet available in the session. This is why the report does not return the expected results.

    Before you refresh the report, you need to set the session state from this point.

    You can configure after assigning a new value or before the report is updated to the element
    For interactive reports, is available built in
    You can go to report attributes > attributes advanced-> Page elements to submit and specify P2_X1 for the field (and any other page element that depends on the report)

    For standard reports, you can create a dynamic Action that is triggered 'before updating"report region, select PLSQL as action types, give a code BÉGIN END NULL; model and specify the name of the item in the item page to submit the field so that it affects the value of items in the session.

  • Can I use the Eloqua page markup in an external page?

    Can I use the Eloqua page markup in an external page?

    Hi Sanjiv yadav,

    Yes, we do. To do this, we need to Eloqua script to follow up on the page in question. After the script, you need to update a Sitemap. And here you can see if it is traceable or not?

    Thank you

    Eloqua Expert

  • Using the current Page number in IF Condition

    Hello

    I have a requirement to insert a blank page if the last page in the group number is odd, then I'll try to use the syntax below, but its does not work:

    <? If: page-mod number 2! = 0 ? >

    < xsl: attribute name = "break-after" > page < / xsl: attribute >

    <? end if? >

    The number of pages in my report is 5 and if I put 5 instead of the page number in the code above, the blank page is inserted, but it seems that this page number is not acknowledged in the IF condition, and if I put <? fo:page - number? > instead of page number in the if condition, I get an error.

    How can I write an if condition based on the current page number?

    Thank you

    Patrick

    Try using the below command

    Have a condition before you group items

    -jump - number of pages F

    EmpNo

    Ename

    F EMPNO

    ENAME E

    E

    same-jump-number of pages---> contains


    When you want to manage the deletion of the pages of the total number of pages

    You can use the following command in the form same-jump-number of pages field-->

    Thank you

    If this allows you then, please check the answer "correct" or even "useful."

  • Reset the value of the item page to null

    Hello
    On one of the pages of my site, my I list of some articles and each value of the element is a link, and if I click on the name of the element, a pop up appears which shows me the history of the issue. This pop-up history item, I have two elements of date picker where I provide the start and end date between which I want to see the story from this point. I add two calculations (before header) to set the values of the selectors of dates for the minimum and maximum dates for the mark of history goes back to this article in the database and on the first time, a complete history of the item turns in pop. Now I can choose my own minimum and maximum dating bicker date element and press a button, now the pop up refreshes and shows me the story between the dates, I have chosen.
    Now I close the pop-up windows and click on something else, but here when pop up is charged, I see the old values of date (that I selected for the previous article) in the date picker and ideally my calculations must have worked and dates selectors should see the minimum and maximum dates for this item.

    Can someone help me solve the problem so that if ever a new pop-up is open to a new element, the element in date picker must have updated them to the values that should be linked to the new item I clicked on that moment rather than date of previous section values.

    Thanks in advance

    Salman

    Hello Salman,

    I think I understand now what you are aming at.
    You say you have a calculation for the popup that defines the values where they are used for the first time. What conditions you have on these points? I guess they are submitted every time that you run the update, so the State of the item is updated with these values. If you don't reset it, these values will persist and be taken to the next item, which is what you currently see.
    You can place a process in your calling page that resets the page desired elements to be null before your calculation evaluates their condition, so the calculation allows you to retrieve the values of database. Another option would be to send a trigger element (for example a hidden item PX_TRIGGER get value 1 on submit) to the target page, which is part of the condition of your calculation (PX_TRIGGER = 1) and reset the trigger in your calculation (: PX_TRIGGER = 0).
    Please correct me if I am wrong.

    -Udo

  • LOV cannot find the value of the item page

    Hello.

    Ive created a form master detail and I would have a LOV on one of the columns in the report for retail area.

    I created the wizard master detail, when I check that session state the P12_ID is set to the correct value. I can also use the form with no problems.

    Then I try to add the LOV on colum 'USER', choose the dynamic and then typed lov query mode:

    Select
    "display the user."
    "id value.
    of ' #OWNER # '. " Table005 ".
    where "Table010_ID" =: P12_ID

    Then I try to run the page and get this error message:
    ""Unable to bind": P12_ID".

    "ORA-01003: no instruction not analyzed.

    Why can I not call a page of a LOV element in another region?

    How can I solve this problem?

    Thank you...

    Is P12_ID rendered before or after your region in detail? If after, it probably won't work because the question is not really exist yet.

  • I use the start page mozilla firefox as my home page, because I can restore my previous session. A game I have DL friends that Bing my search engine on this page! In Internet Options, I changed my default to google, but it search Bing every time! How can

    I do a search, and it diverts to MSN game site, then gives Bing search results. Bing isn't my search anywhere engine, just on the Mozilla page.

    Change of the topic: Home search engine to Google.

    With the subject: House showing homepage:

    Firefox button > Web Developer-> Notepad.
    Copy and paste this script into Notepad > then click on run > run

    javascript:{localStorage["search-engine"]="{\"name\":\"Google\",\"searchUrl\":\"http://www.google.com/search?q=_searchTerms_&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a\"}";void(0);}
     
  • R12.2.4 data lost after using the dialog Page and return to the calling page. (Help please!)

    Hi team,

    I'm new to OAF and works on a requirement to add some custom validation when the user clicks a button in a seeded standard page.

    The approach I took was to extend the seeded controller object managed this press event button and put my custom logic in the extended controller and substitute the standard controller through customization.

    The standard rate which was pressing the Complete button A Page, the user was taken to the next and epepinee page (Page B) some operations based on records that have been chosen Page A.

    Part of the custom validation requirement that was if some postings were not met, the user must be a pop-up asking if they really wanted to move forward and if they have selected Yes then continue with the seeded standard flow (transition to page B) and if they have NOT selected then just remain on the current page.

    I have used OADialogPage and to do this, in part, the question , I am running into is that when the user selects one or more records using a check box in a region of several record (table) and click the full page and if the validation fails then a modal page and the user made a selection i.e.either Yes or no modal page and when they return to the calling page (ex. Page A), all data (records) they chose previously is lost (the Page is refreshed). Based on what I see on this forum, I suspect it's because after having click Yes on the modal page and then return to the original page the processRequest fires again and the VO data is queried again and has all the parts on the page are lost. Since I am changing the flow in seedlings pages based on the intervention of the user I'm confused as to how this problem can be solved. that is, prevent the page refreshes or preserve the selections that were made before you navigate to modal page. Any help is really appreciated!

    My Code:

    ' Public Sub processFormRequest (OAPageContext oapagecontext, OAWebBean oawebbean)

    ...

    ...

    If (oapagecontext.getParameter ("completeOps")! = null) {}

    ...

    ...

    If (warnCount > 0) {}

    OAException message = new OAException ("not in order...", OAException.WARNING);

    oapagecontext.putDialogMessage (message);

    OAException message = new OAException ("XYZ Violated rule. Do you want to continue? ", OAException.WARNING);

    DialogPage OADialogPage = new OADialogPage (OAException.WARNING, message, null, "","");

    String Yes = oapagecontext.getMessage ("AK", "FWK_TBX_T_YES", null);

    String number = oapagecontext.getMessage ("AK", "FWK_TBX_T_NO", null);

    dialogPage.setOkButtonItemName ("ConYesButton");

    dialogPage.setNoButtonItemName ("ConNoButton");

    dialogPage.setOkButtonToPost (true);

    dialogPage.setNoButtonToPost (true);

    dialogPage.setPostToCallingPage (true);

    dialogPage.setOkButtonLabel (yes);

    dialogPage.setNoButtonLabel (no);

    oapagecontext.redirectToDialogPage (dialogPage);

    }

    If (oapagecontext.getParameter ("ConYesButton")! = null) {}

    Write Yes button Action code

    oapagecontext.putParameter ("completeOps", "Continue");

    }

    If (oapagecontext.getParameter ("ConNoButton")! = null) {}

    Write the code of the Action for the No button

    Dim errormsg = ' rule Violations have occurred. "

    throw new OAException (errormsg);

    }

    super.processFormRequest (oapagecontext, oawebbean);

    }

    I managed to work around this problem by adding a simple control in my controller processRequest method extended to avoid the call to super.processRequest incase lhen control returns to the page once the user has made a selection on the Page of the dialog box

    If ((oapagecontext. (GetParameter ("ConYesButton") == null) & (oapagecontext.getParameter ("ConNoButton") == null)) {}

    super.processRequest (oapagecontext, oawebbean);


    }


    Thank you!

  • Is it mandatory to create/use the master page or its up to me (developer)?


    Hello

    I develop a form (non-interactive), where in I'm placing a lot of tables (with the approach of the subforms), and these tables is dynamic, I mean, the tables are feeding an backend ERP SAP, where of lines are dynamic (but number of columns are fixed)

    That is why I want to put FLOWED subforms, pages, bcz I have tables on the 1st page 2nd page.

    BCZ I want to mY_cmpany_logo on each and every single page, in any case only 2 pages

    Pls suggest me in this case (above said scenario), is a mandatory rule to create / use a master page

    Thank you

    XFA forms (static or dynamic) always have at least one master page, because it contains the content (s).

    Master pages are used as "wallpapers", as they are good for the items that you need to repeat on each page of the form. Think of header or footer or simly a company logo.

    Anyway, you can't place anything on a master page, if you do not want.

  • Error when I import classes using the JSP page directive

    Hi all!

    I installed JDeveloper 11 g (11.1.1.3.0)

    My applications are found in the C:\dir (JDEV_USER_DIR = C:\dir)
    I created the application "Appliation1". In it, I created 2 projects (Project1, inside session entity beans and other classes of java;) Project2, inside JSP).
    I want to import classes of Project1 in Project2 using the following directive:
    ----------------------------------------------------------------------------------------
    < % @ page contentType = text/html"; charset = windows-1252 ".
    import="Project1.*"% >
    ----------------------------------------------------------------------------------------
    so in Project2 project properties set the way to classes in Project1.
    When I run JSP, an error has occurred:
    Error (4.9): the Project1 to import cannot be solved.

    Maybe that I am not correctly defined the path to classes

    Thanks in advance.

    Hello
    Try the project properties/project source paths/resources
    or
    Properties/project dependencies

    then restart

    concerning

  • Using the Master Page

    I am new to Firworks, but hope to get it sorted.

    I created a model of website multi layers in photoshop cs4. By to turn off the layers and I can show the State of the nav system and the resultant page page layouts. I want to use Fireworks to turn this into a model of interactive website with flip, and then click customer through and etc.

    I imported this file .psd FW CS4. Then I put only the ordinary layers like logo, header background, basic nav elements, etc. to be turned on, hide other layers so that designate as a Master Page. So far so good.

    I then create a new page called Home and it is automatically linked to the Master Page (minor confusion: Although the link to the left of the page icon is not active?)

    Now, I want to turn on a few layers to display the homepage of nav in its selected state and display content specific to the Home Page. I can't seem to find a way to get these layers (that I already created) copied from the master page in the new Home Page, so I can show them.

    Maybe I should make use of layer for this State?

    I hope this makes sense. I read all of the help and etc I could find, but it seems to be stuck here.

    DRM for any help!

    You'e welcome. I'm glad that you guessed it sorted. However, next time, put right in FW. Nothing in this prototype

    that FW might not have done as well and in terms of vectors, maybe better. :-)

  • find the files using the item class

    Hello

    Is it possible that I can find files that have elements with a specific element class?

    Thank you.
    Leah

    Hi LEA
    The following script will display a list of all the items in a business district prompted who use only one, you are prompted for LOV. If you leave off the prompt for the business district, you will find all the elements and all records that use the LOV. Change it further, you can view only folders.

    SELECT
    DOM. Name 'LOV name. "
    OBJ. OBJ_NAME "Folder Name"
    Exp. EXP_NAME "name of the element.
    Of
    EUL5_BA_OBJ_LINKS BOWL,
    EUL5_BAS BA,
    EUL5_OBJS OBJ,
    EUL5_EXPRESSIONS EXP,
    EUL5_DOMAINS DOM
    WHERE
    BOWL. BOL_BA_ID = BA.BA_ID
    AND THE BOWL. BOL_OBJ_ID = OBJ. OBJ_ID
    AND EXP.IT_OBJ_ID = OBJ. OBJ_ID
    AND EXP.IT_DOM_ID = DOM. DOM_ID
    AND BA_NAME =: BA_NAME
    AND NAME =: LOV_NAME
    ORDER BY 2, 3;

    Best wishes
    Michael

  • How to use the last page in a book

    Hi, threw on my first book.

    but the last page has the 'Blurb' Logo and custom allow me to drag a photo or a text on this subject...

    tried to change to a different presentation, but that only adds a new page layout before the last page...

    seems strange that I can't do what I want with him... for there's a Blurb thing...

    Best regards, Sandy

    Hi Sandy,

    In the book Module, if you go into the settings of the book on the top of the right side.

    The Option of the book which says: Blurb, you can change it to PDF or Jpeg and then add the image to the last page.

    But once selected one of these options, you will not be able to publish their presentation from Lightroom.

    Kind regards

    Tanuj

  • State of Session of the item page is RESET_TO_NULL

    Using pre-packaged application of Group on Page 10 calendar when an event is created and a newly added field is empty I can not update the field

    I'll try to do this as clearly as possible, I use apex 4.2 and it comes to the application of pre-packaged group calendar.

    I created my own custom page elements. text fields and the fields number and when I create a new event and fill my new all custom fields works well, and the data is written to the database.

    Then I try to change the event and any update (change the event and change my custom page created value) I do is retained and the new values are stored in the database.

    When I create a new event and I let my new custom fields empty and then logs the event everything works fine, but when I try to change the event (pg 10) and added value to my field previously customized null (TextBox, text are or field number)

    (he was left null when the event was created) the new value is not saved in the database (after I clicked on apply changes) and the field is not updated. I checked in session state and the State of the session of all the elements of my custom page created are labeled as RESET_TO_NULL

    Question is why doesn't my custom fields retain their value and/or write to the database (apply the changes on the edit event) if (page_item) field was empty when the event was created?

    @Fac586

    Thank you for your help if you do not have an answer for me, I was able to understand the question when you configure the problem can be reproduced on apex.oracle.com

    When you apply the same logic in 5.0 on my oracle.com workspace I realized, while changing the package of eba_ca_api, I made this a slight mistake. I will show below in the hope that I'll save someone else the countless hours it took me to understand this simple question.

    On this single line in the package, I had the following code:

    If c1.testfield! = p_testfield then

    Update EBA_ca_events

    Set testfield = p_testfield

    where event_id = p_event_id;

    end if;

    That was wrong I really need this code:

    If nvl(c1.testfield,'0')! = nvl(p_testfield,'0') then

    Update EBA_ca_events

    Set testfield = p_testfield

    where event_id = p_event_id;

    end if;

    I think that's it, because if you do not meet these new fields when a new record is created these fields are NULL, oracle is not like them, so you must use the nvl function which solves the problem. Thank you once again @Fac586 your answer helped me understand the issue, I appreciate it because for some reason, nobody provided any comment.

  • improve alignment of the item page

    Hello - I have a request on apex.oracle.com, I would like someone to take a look at.

    workspace: dew_mir_tor
    username: [email protected]
    password: Mir97Dew77! Tor

    Demand Align, 24646 number.

    I want the last element in the last line (physical size) to appear directly under the name of type of data...
    just as data type name is directly under the name of Code of data system.

    Can someone tell me how to proceed?

    When you get to Page 1, simply click the Go button to access the page in question.

    Thank you
    Carol

    Hi, Carol.
    I modified your app to do what you described.

    It's a bit of a hack because I used an element displayed in the one page without value or label to start a new line and give you a whole empty cells in a table.

    I tried a "cleaner" approach by putting in the HTML of the element but which separates the page sound element label.

    I hope this helps.

    Walter

Maybe you are looking for