Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3399908
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:49:42+00:00 2026-05-18T04:49:42+00:00

There is an address book that already has contacts. That is why the open

  • 0

There is an address book that already has contacts. That is why the open contacts link is on the page when it loads. If the user does not want to add a current contact to populate these fields then once they have supplied data to the fields I want the add to contacts button to appear. Would a setInterval function be appropriate to check to see if the user is entering new data into these input fields? If so how would I write the dojo code?

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>
        SAP
    </title>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojo/dojo.xd.js" djConfig="parseOnLoad: true">
    </script>
    <script type="text/javascript">

        dojo.addOnLoad(function(){ 
            dojo.require("dijit.form.Button");
            dojo.require("dijit.form.TextBox");
        });

    </script>
    <style type="text/css">
        #prelims {
            position: relative;
            float: left;
            margin-right: 10px;
            margin-bottom: 5px
        }

        #addToContacts {
            position: relative;
            float: left;
            display: none;
        }

        #nameWrap {
            position: relative;
            clear: left;
        }

    </style>
</head>
<body>
    <form>
        <div id="prelims" class="checksVertical">
            <span id="" class="button-link pill-btn">
                <span class="hasHover">
                    <a id="open-contacts" class="buttons" target="" href="#">
                        Open Contacts
                    </a>
                </span>
            </span>
        </div>
        <div id="addToContacts" class="checksVertical">
            <span class="button-link pill-btn">
                <span class="hasHover">
                    <div id="addNewContact" class="hide">
                        <form method="post" id="addContactHide">
                            <input class="buttons" id="addContact" type="submit" value="Add Contact" /><input type="hidden" id="hiddenFName" name="tFName" value=""/><input type="hidden" id="hiddenLName" name="tLName" value=""/><input type="hidden" id="hiddenCompany" name="tCompany" value""/>
                        </form>
                    </div>
                </span>
            </span>
        </div>
        <div id="nameWrap">
            <div class="input-inline">
                <label id="for-tFName" for="tFName">
                    <span class="required">
                        *
                    </span>First Name
                </label>
                <div class="input-text-wrapper input-text-lg">
                    <span class="input-cap-left">
                    </span>
                    <span class="input-field">
                        <input type="text" id="tFName" name="tFName" maxlength="50" />
                    </span>
                    <span class="input-cap-right">
                    </span>
                </div>
            </div>
            <div class="input-inline last">
                <label id="for-tLName" for="tLName">
                    <span class="required">
                        *
                    </span>Last Name
                </label>
                <div class="input-text-wrapper input-text-lg">
                    <span class="input-cap-left">
                    </span>
                    <span class="input-field">
                        <input type="text" id="tLName" name="tLName" maxlength="50" />
                    </span>
                    <span class="input-cap-right">
                    </span>
                </div>
            </div>
            <div class="clearfix">
            </div>
        </div>
        <div id="tCompanyWidget">
            <label id="for-tCompany" for="tCompany">
                <span class="required">
                    *
                </span>Company Name
            </label>
            <div class="input-text-wrapper input-text-lg">
                <span class="input-cap-left">
                </span>
                <span class="input-field">
                    <input type="text" id="tCompany" name="tCompany" maxlength="50" />
                </span>
                <span class="input-cap-right">
                </span>
            </div>
        </div>
    </form>
</body>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:49:42+00:00Added an answer on May 18, 2026 at 4:49 am

    I think that either onChange or onBlur events on the input fields are better to use then setInterval. Since these exists on the regular input html DOM nodes, it is not necessary to use dojo.

    Write a javascript function that can be re-used on several input fields:

    var show_add_to_contact = function(){
      dojo.byId("prelims").style.display = "none";
      dojo.byId("addToContacts").style.display = "block";
    };
    

    Then you can either use it directly on the html DOM node:

    <input type="text" id="tFName" name="tFName" maxlength="50" onChange="show_add_to_contact();" />
    

    or you can assign it programmatically when creating dijit TextBox

    new dijit.form.TextBox({"onChange":show_add_to_contact,"name":"tFName"}, "tFName");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our application has an invite page where a user can import their address book.
Is there are official way to import contacts from user address book from yahoo?
I have an address book widget that shows if there are contents. If there
Is there any way to retrieve a user's email address after authenticating with Yesod's
I am deleting contacts from addressbook programmatically. I got error There's already an instance
Is there anyway to use the great address book UI with custom data? From
I succeeded in inserting contacts into the address book and I need to save
I have a address book with groups and contacts, and I'd like to have
My iOS app is showing the contents of a user's address book with some
I have an Address Book Program that [1] adds Entry [2] delete entry [3]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.