We help IT Professionals succeed at work.
Get Started

Javascript - what is an echo function

Last Modified: 2012-05-12
I am dealing with a component that builds a list form using javascript. I need to add a message above one of the message fields. The developer told me that I need to add an "echo function" to a certain file, to create the message. I was wondering if someone could tell me what an 'echo function' is?

The page I'm working on is here:
and I want to add my message where the field 'renewal description' is located.

The code that builds the form is here:

  * @version     5.0 +
  * @package        Open Source Membership Control - com_osemsc
  * @subpackage    Open Source Access Control - com_osemsc
  * @author        Open Source Excellence (R) {@link  http://www.opensource-excellence.com}
  * @author        Created on 15-Nov-2010
  * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  GNU General Public License for more details.
  *  You should have received a copy of the GNU General Public License
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *  @Copyright Copyright (C) 2010- Open Source Excellence (R)

defined('_JEXEC') or die("Direct Access Not Allowed");
$error_msg = "";
echo $this->initJs();
<style type="text/css">
      .combo-left      {
            text-align: left


<script type="text/javascript">
      var headerObjs = <?php echo oseJson::encode($this->registerOS_header);?>;
      var bodyObjs = <?php echo oseJson::encode($this->registerOS_body);?>;
      var footerObjs = <?php echo oseJson::encode($this->registerOS_footer);?>;

      var oseViewRegfp = oseMsc.reg.buildForm(Ext.get('osemsc-reg').getWidth()*2);

      oseMsc.reg.fp = new oseMsc.payment.form(oseViewRegfp);

      oseMsc.reg.fp.addReader = function()      {
            this.fp.getForm().reader = new Ext.data.JsonReader({
                root: 'results'
                ,totalProperty: 'total'
                ,idProperty: 'id'
                      {name: 'msc_id', type: 'string', mapping: 'msc_id'}
                      ,{name: 'msc_option', type: 'string', mapping: 'msc_option'}
                      ,{name: 'ose_currency', type: 'string', mapping: 'ose_currency'}






      if($this->menuParams->get('show_page_heading') || $this->menuParams->get('show_page_title'))
            <div class='componentheading <?php echo $this->menuParams->get('pageclass_sfx'); ?>'><?php echo $this->menuParams->get('page_heading'); ?></div>

<div id="osemsc-reg-heading">

<div class="message-box">
<div class="message-heading">Membership Instructions</div>

<strong>Renewals</strong><br />

If you are renewing your membership please enter your member number in the "Member Number" field. New members can leave this field blank.
<br />
If you do not know your member number, <a href="../../index.php?option=com_userlist" target="_blank" >click here to search the member number database</a>.<br />
If you do not find your member number in the database, Email membership@readingrecovery.org or call 614-310-7322.<br /><br />

<strong>For Gift Memberships</strong><br />
If you are purchasing a gift membership, please enter the recipient's name and
 preferred address (either work or home).  Please list the new member's job title,
 then proceed to the Sponsors and Gift Memberships section.<br /><br />

<strong>Mailing List</strong><br />
Occasionally we make our mailing list available to carefully selected companies.  If you do not wish to have your name included, please check "No" for the question "Do you want to be included on our mailing list?" at the bottom of the form.

<div id="osemsc-reg"></div>

<div id="ose-payment-callback-form"></div>
<?php include(JPATH_COMPONENT.DS."views".DS."footer.php"); ?>
Watch Question
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE