Understand ‌navigateParentURL() method | Zoho Creator Help

Understand ‌navigateParentURL() method

This method is applicable to widgets.
Widgets are used to extend the capabilities of your Zoho Creator application, helping you perform tasks that couldn't be accomplished using the built-in features, as well as enhance the front-end capabilities of your app. You can create a feature, configure it as a widget, and add it to your page to attain the kind of usability you are looking for.

You can also incorporate third-party apps that cater to your Creator app's requirements in your pages as widgets. In these widgets, you might want to configure certain navigation actions to be performed upon clicking any of the buttons. For example, upon clicking the Previous button, users must be redirected to the previous URL; upon clicking the Cancel button, the widget popup must be closed while users remain in the parent page. These actions will be executed when the domains of both the parent and child windows are the same. Currently, if the parent and child windows operate in different domains, then the respective actions will not be executed due to cross-domain restrictions. 

With the navigateParentURL() method, you can perform an action in the parent window from the child window itself. In other words, this method can be used to control only the parent container and the actions executed for the ‌parent URL. 

How to identify parent window and child windows?
The parent window is the main window on which your user has currently landed and will perform any operation. For example, the Dashboard page in your application is the parent window. All the windows that open inside your main window are the child windows. For example, an Email Subscribe popup that opens inside your Dashboard page is a child window.
Note: There can be multiple child windows in your parent window.
Let's say you've created an application named Food Delivery Management, in which you've built a form titled User Details. Users will enter their details and, upon checking the Verify Details field (decision box), a Verify Phone Number popup will open. This is actually a third-party service incorporated as a widget. Users can either enter their phone number and click Verify or close the popup. 



After closing the popup window, we need to explicitly switch back to the parent window (here, its a form). In this case, since we've used a third-party service that belongs to a different domain, the close action will not be executed. This is because widgets cannot execute URL actions when the parent and child windows operate in different domains. This is where navigateParentURL() method comes into the picture.

Syntax

  1. ‌var param = {
  2. action:${ACTIONVALUE} 
  3. url: ${URL} 
  4. window: ${WINDOWTYPE}
  5. }
  6. ZOHO.CREATOR.UTIL.navigateParentURL(param) 
Note: This method is case-sensitive. In case of two or more words as its value, camel case is accepted.

For example, the above syntax can be used as follows.

To open a URL
  1. ‌ZOHO.CREATOR.init().then(function (data) {
  2.  var param = {
  3. action: "open",url: "https://www.zoho.com/widgets.html", window: "new"   };
  4. ZOHO.CREATOR.UTIL.navigateParentURL(param); 
  5. });
To close a URL
  1. ZOHO.CREATOR.init().then(function (data) {
  2. var param = {action: "close" };
  3. ZOHO.CREATOR.UTIL.navigateParentURL(param);   
  4. });

Label
Value
Action
  1. open - to open the specified URL in new/parent window . If values are not passed for 'url' or 'window' parameters, then the specified action will not be executed.
  2. reload - To load the previously visited page.
  3. back - To reloads the parent window.
  4. close - To close the last opened parent container.
  5. close all - To close all open dialog parent containers in the parent window.
URL
You can specify any URL link here. Also, you can include Creator component URls appended to hash (#).
Example: #Report: Report_Name
Window type
‌"new" , "same"

Example

Let's assume you've created a quiz management app named Zylker Tutorials, in which users can attend quizzes on topics of their choice. 

Once a user completes the quiz and clicks the Next button, they'll be taken to the Verify Captcha page that contains a widget. This third-party widget is configured to display images from which users need to check the relevant options to prove that the quiz answers haven't been automated (entered by a robot). If the wrong option is checked, an error will be displayed on the same page. After checking the correct option, users will be redirected from the widget to the User Details form. This redirection is achieved using the navigateParentURL() method configured to perform an open action (opens a form). Upon entering the required details, users can submit the form. 



Info: Additionally, you can add a decision box field named Captcha Verified and enable it to be visible only to the users .You can configure a worklow to run a check and ensure that the entered email address matches with the logged-in user's email address. Upon verification, the Captcha Verified field's value can be set to true. 

To learn how to configure the above use case, click here.

Limitations

Currently, while specifying the window type, popup window is not supported. 
  1. Configure navigateparentURL()
  2. Understand widgets
  3. JS API documentation

    Access your files securely from anywhere

      Zoho CRM Training Programs

      Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

      Zoho CRM Training
        Redefine the way you work
        with Zoho Workplace

          Zoho DataPrep Personalized Demo

          If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

          Zoho CRM Training

            Create, share, and deliver

            beautiful slides from anywhere.

            Get Started Now


              Zoho Sign now offers specialized one-on-one training for both administrators and developers.

              BOOK A SESSION






                          Quick Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          Offline Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal

                          Form Designer HR

                          Card Forms Food
                          Assign Forms Photography

                          Translate Forms Real Estate
                          Electronic Forms

                          Notification Emails for Forms Alternatives
                          Holiday Forms Google Forms alternative 
                          Form to PDF Jotform alternative





                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                Manage your brands on social media

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      Zoho Sheet Resources

                                                       

                                                          Zoho Forms Resources


                                                            Secure your business
                                                            communication with Zoho Mail


                                                            Mail on the move with
                                                            Zoho Mail mobile application

                                                              Stay on top of your schedule
                                                              at all times


                                                              Carry your calendar with you
                                                              Anytime, anywhere




                                                                    Zoho Sign Resources

                                                                      Sign, Paperless!

                                                                      Sign and send business documents on the go!

                                                                      Get Started Now




                                                                              Zoho TeamInbox Resources



                                                                                      Zoho DataPrep Resources



                                                                                        Zoho DataPrep Demo

                                                                                        Get a personalized demo or POC

                                                                                        REGISTER NOW


                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now









                                                                                                              • Related Articles

                                                                                                              • Configure ‌navigateParentURL() method

                                                                                                                To learn more about the navigateParentURL() method, click here. This method can be configured in page elements such as widgets. This method is applicable to both C5 and C6 versions of Creator. Click here to find your current version. To use ...
                                                                                                              • Understand Connectors

                                                                                                                Note: The existing version of PayPal, PayflowPro, and Payments Pro has been deprecated on 26th September, 2024 and none of the payment transactions will be processed after this date. To ensure uninterrupted payment processing, migrate to the latest ...
                                                                                                              • Understand AR viewer

                                                                                                                Understand AR viewer An AR viewer is actually a widget that acts as an interface for your device's camera. This interface is used to invoke the camera to scan a marker for your marker-based AR sets. You can then customize the output and view it in ...
                                                                                                              • Understand Augmented reality

                                                                                                                Understand augmented reality Augmented Reality (AR) is an interactive 3D experience that combines a view of the real world with computer-generated graphics. It enriches or augments what you see, by adding the digital data (images) to real-life ...
                                                                                                              • Understand field navigation

                                                                                                                What Does This Page Cover? Learn about navigating your Creator fields using the TAB key and also a combination of arrow keys with special keys (Option key on Mac or the Alt key on Windows), thereby making it easier and beneficial to users who prefer ...
                                                                                                                Wherever you are is as good as
                                                                                                                your workplace

                                                                                                                  Resources

                                                                                                                  Videos

                                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                  eBooks

                                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                  Webinars

                                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                  CRM Tips

                                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                                    Zoho Show Resources