How to redirect the page to home after alert message in APEX

Hi All,
I have 4 tab and home page APEX report in that home page I have organization to select as parameter for all the page which is mandatory column so without select the organization in home page I can move to other 4 page but some time users directly pressing the tab for this I have create the ORG_ALERT in each 4 page which this we are able to see the pop-up message when we directly hitting on tab but after select the OK to alert message the page is run for long time and it show all the organization data which I don't want so how can I modify the alert so that after pop-up message it will go to home page.
Declare Output VARCHAR2 (20);
begin 
Output := 1;
Output := NVL( :AI_ORGANIZATION_ID , 0);
IF Output  = '0'  THEN
   APEX_UTIL.SET_SESSION_STATE('AI_ORGANIZATION_CODE','');
   HTP.p ('<script type="text/javascript">');
   HTP.p ('alert("No Organization selected.\n Please select an Organization");' );
   HTP.p ('</script>');  
END IF; 
END;
Regards,
Sushant

Hi Kiran,
I have created two process -- On Load - After Header
1)  Sequence=10
Declare Output VARCHAR2 (20);
begin
Output := 1;
Output := NVL( :AI_ORGANIZATION_ID , 0);
IF Output  = '0'  THEN
   APEX_UTIL.SET_SESSION_STATE('AI_ORGANIZATION_CODE','');
   HTP.p ('<script type="text/javascript">');
   HTP.p ('alert("No Organization selected.\n Please select an Organization");' );
   HTP.p ('</script>'); 
END IF;
END;
2) Sequence=20
Declare Output VARCHAR2 (20);
begin 
Output := 1;
Output := NVL( :AI_ORGANIZATION_ID , 0);
IF Output  = '0'  THEN
   htp.init;
    owa_util.redirect_url('f?p=&APP_ID.:1:&APP_SESSION.');
ELSE
htp.init;
owa_util.redirect_url('f?p=&APP_ID.:4:&APP_SESSION.');
END IF;
  END;
but after click on tab directly it is not showing the pop-up message and directly going to home page. I want when I click on pop-up message to OK then it need to redirect the home page also from home page when I am selecting any organization and trying to go on tab it is not going maybe due to owa_util.redirect_url. Please advise.
Regards,
Sushant

Similar Messages

  • How to redirect a page to a new window instead of the current one

    Can someone please tell me how to redirect a page to new window.
    I mean I am running a JSP with a button and on clicking it i am opening a new window (thru javascript offcourse),
    Now response.sendirect("New.jsp") should be opened in that new window opened.
    I tried it but the New.jsp page is opened in the current page (Even though new window is opened ! ).
    Please help.

    Hi,
    U can use the following code to Pop up in new window
    Jsp1.jsp
    <%
    if(action != "")
    response .sendRedirect("Jsp2.jsp");
    else
    %>
    <html><head><title>JSP 1</title>
    <script language="JavaScript">
    function View()
    window.open("Jsp1.jsp?action=view","View","");
    </script>
    </head><body>
    <form name="frm" method="post">
    <input type="button" value="View" onclick="View()">
    </form>
    </body>
    </html>
    <%

  • How to keep the current http session after returning from external web site

    Hi,
    When I use the response.sendRedirect api to redirect the web page to the external payment site, after payment and return back to the current application, I found that the current http session is lost.
    How to keep the current http session after returning from external web site?
    Thanks

    You should make your sidebar1 and sidebar2 fixed positioned. Make your content DIV fluid.
    This should help you: http://www.glish.com/css/7.asp

  • How to get the page number in the break section?

    Hi expert,
    The user wants the page number came right after the Break group name if the break section contains more than 1 page. E.g.
    ABC Compnay
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 1
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 2
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    CDE Company
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    How to get the page number in section break level?

    Hi Wes
    * Create a Field on the margin.
    * Set its "Source" to "Page Number"/"Physical Page Number".
    * Click "Page Numbering" button.
    * In "Reset At" list box, choose the Repeating frame that surrounds your detail group in the layout.
    This should cause Reports to increment the page number until the "Company" repeating frame resets.
    Regards
    Sripathy

  • When the page will be load how to make the page blank in run time

    Dear
    when i will run the page the fields shoud come with blank Field.
    i want to make it in runtime.
    example- i have one page having employees data. but when i will run that page the data will not come only blank fields should come, after thar i will create.

    duplicate how to make the page blank field in runtime

  • How to reduce the size of file after delete some datas?

    The size of the database file isn't smaller than ago after delete some data from database.
    How to reduce the size of file after delete some datas?

    Hi,
    What BDB release are you using? If it's one of the latest releases, then what you are looking for is the DB->compact() method:
    http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/dbcompact.html
    The DB->compact() method compacts Btree, Hash, and Recno access method databases, and optionally returns unused Btree, Hash or Recno database pages to the underlying filesystem. Please let me know if it helps.
    Bogdan Coman

  • How to make the page expired when user click back

    how to make the page as expired when i click back button on the browser.
    i want a better way.
    actually i have a timer.when it reaches 00.00 then the expired page will be called automaticlly using location.href="expired.jsp" then if the user clicks back it should not show the previous page.this concept is applied with paging concept
    response.setheader is not working ...
    i have redirect when click back using
    <body onunload>....i call another page here.
    but it is not a good way.
    so pls help me to solve this problem
    using session or another good way

    Use this instead.
    Frame.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);

  • How to print the page in custom format

    Hi All,
    I've a login page like
    USER ID : Test box to enter data
    PASSWORD: Text Box to enter data
    A Button named as Print
    When i click on print button i want to print the form in custom format. when i use window.print in java script it is printing text boxes and button . but i dont want to print button and text boxes. i just want to print the user id and password entered by the user with corresponding labels.
    Can anyone suggest me how to print the page in the above format with out using the request object. coz i need to implemnt above with plain java script and html.
    Tks in Advance

    Use CSS. Check out the 'media' attribute. http://www.w3.org/TR/REC-CSS2/media.html

  • Hi, I am using Indesign CS6, How to set the page size in Inches.

    Hi, I am using Indesign CS6, How to set the page size in Inches.

    All fields in InDesign can be entered in any measurement system. So, if you want to make an 8"x10" document and go to File>New Document and the window looks like this:
    …you can type either 8 in or 8" into the Width field like this:
    …and when you move to the next field, it will convert the eight inches into the equivalent number in the unit of measure that it is using at the moment, like this:
    … (203.2 milimeters is the same as 8 inches). You can also enter a different measurement unit into other fields once the file is created, such as the width or height of a frame, or the position of an object in the X and Y coordinates.
    If you would rather just work in inches instead of having to type the inches mark or abbreviation, go to InDesign>Preferences>General and select the Units & Increments tab. There you will see Ruler Units for Horizontal and Vertical at the top of the window. Set them to Inches and all of the fields will display in inches. If you do that to an open document, you will change the unit of measure for that document. If you do it while no documents are open, it will change the unit of measure for any new documents you create. To change the unit of measure for existing documents, you will have to open each and make the change.

  • How to change the page Header background colour in a Theme

    Hello,
    I want to know how to change the page header background colour. If you are in the Editor I don't find a property where to change it.
    If you are in the Theme Editor in the header bar I want to change stands <b>Theme Editor</b>. This (in my case blue colored bar) I want to change in another color.

    Hello Radhika,
    thanks for your answer. Where do I find the option for the pageheader in System Administration>Portal Display>Theme Editor ->IView Trays exactly?
    The pageheader is a picture, which must be uploaded for the web dynpro. Why should any webdynpro element in the ivew tray. There is no relationship between these two parts.
    I have not found any option to change the web dynpro pageheader. Could there any extra theme editor for webdynpro?
    Thanks.
    Olaf

  • How to set the page size

    Hi,
    How to set the page size of a B tree node in berkeley db java edition?
    thanks.

    The two systems have different performance characteristics. If you are concerned with the performance characteristics, then the best way to tell is to benchmark them.
    By the way, both BDB and BDB JE are B-trees.

  • How to get the Page Number in CS3 with VB?

    Hi, Everybody
    I use the Visual Basic to read the words and their page number where the Words are at. I want to do it according to Story. Some TextFrame of the Story waw placed in other pages: How can I get the Page number according to the Word that is selected?
    For myStoryCounter = 1 to Document.Stories.Count
    Set myStory = Document.Stories.Item(myStoryCounter)
    For myWordCounter = 1 to myStory.Words.Count
    Set myWord = myStory.Words.Item(myWordCounter)
    myWordContents = myWord.Contents
    Rem ** How to Get the Page Number according to the Word ***
    Next
    Next

    > But I don't understand why Item(1) are set.
    because Word can have more than one parent TextFrame - when split across TextFrames
    only Character have one ParentTextFrame accessed also by ParentTextFrames.Item(1)
    > why Story.TextFrames.Count alway is 0, Is it bug?
    no - it's not bug
    in older IDs - Story.TextFrames collection refer to all TextFrames as containers for Story text
    but in CS3 - collection Story.TextFrames contain all TextFrames inserted as InLine/Anchored objects - same like Story.Rectangles or Story.Ovals
    in CS3 - when you want to refer to TextFrames as containers for Story text - you need to use Story.TextContainers - because now you can link TextFrame and Text-On-Path as Story - Text-On-Path isn't TextFrame
    robin
    www.adobescripts.com

  • How to change the page break in adobe forms

    Does anyone know how to change the page break on an adobe form?  I'm hoping it will be the same way you change the page view in excel.
    Can anyone help?
    Thank you in advance,
    Priscilla

    HI
          YOU CAN USE THE FOLLOWING SYSTEM FIELDS OF SMARTFORMS FOR THE MENTIONED PURPOSE
    <b>&SFSY-PAGE& </b>
         Inserts the number of the current print page into the text. You determine the  format of the page number (for example, Arabic, numeric) in the page node. 
    <b>&SFSY-FORMPAGES&</b> 
         Displays the total number of pages for the currently processed form. This  allows you to include texts such as'Page x of y' into your output
    <b>&SFSY-JOBPAGES& </b>
         Contains the total page number of all forms in the currently processed print  request.
    REGARDS
    ANOOP

  • How to display the page no in script

    HI,
    Can any one tell how to display the page no's as follows in Scripts.
    current page/total no.of pages(ex:1/10)

    Hi,
    For Smartforms:
    Just insert fields: &SFSY-PAGE& and &SFSY-FORMPAGES&.
    Page: &SFSY-PAGE& of &SFSY-FORMPAGES&
    For Sapscript:
    Just add: &PAGE& and &SAPSCRIPT-FORMPAGES&
    Page: &PAGE& of &SAPSCRIPT-FORMPAGES&
    Regards,
    Edited by: Jatra Riwayanto on Jun 4, 2008 9:33 AM
    Edited by: Jatra Riwayanto on Jun 4, 2008 9:34 AM

  • How to clear the page number in the Script

    Hi Guys,
    I have developed a Script, the same output I need to display with three times with different heading, right now I am able to display the three time with different heading, but the pages are displaying like 1,2,3,4,5,6.
    I need to display the page number 1,2,1,2,1,2, once the heading changes, I need to display page number from I, but I could not able to clear the Page number, could any one please suggest how to create the page number in LAYOUT.
    Thanks,
    Gourisankar.

    Sloved

Maybe you are looking for