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 6666981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:53:07+00:00 2026-05-26T02:53:07+00:00

My base code : <button class=puple margin-right type=button onclick=setPasswordForm() title=<?php echo $this->__(‘Change Password’) ?>

  • 0

My base code :

<button class="puple margin-right" type="button" onclick="setPasswordForm()" title="<?php echo $this->__('Change Password') ?>" class="button"><span id="change_password_text"><?php echo $this->__('Change Password') ?></span></button>
<script type="text/javascript">
//<![CDATA[
    var dataForm = new VarienForm('form-validate', true);
    function setPasswordForm(){
        var arg = $('change_password').value;   

        if(arg == 0){
            $('current_password').up(3).show();
            $('current_password').addClassName('required-entry');
            $('password').addClassName('required-entry');
            $('confirmation').addClassName('required-entry');
            $('change_password').setValue('1');
            $('change_password_text').update('<?php echo $this->__('Cancel Change Password') ?>');            
        }else{
            $('current_password').up(3).hide();
            $('current_password').removeClassName('required-entry');
            $('password').removeClassName('required-entry');
            $('confirmation').removeClassName('required-entry');
            $('change_password').setValue('0');
            $('change_password_text').update('<?php echo $this->__('Change Password') ?>');
        }
    }
    <?php if($this->getCustomer()->getChangePassword()): ?>
        setPasswordForm();
    <?php endif; ?>

I have a button “change password”, and it will be change to “cancel change password” when a form “change password” have been displayed.
How to add a title for button “Cancel change password”?
Any answer ???

  • 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-26T02:53:08+00:00Added an answer on May 26, 2026 at 2:53 am

    You just need to change these lines

    $('change_password_text').update('<?php echo $this->__('Cancel Change Password') ?>');

    to

    $('#change_password_text').text('Cancel Change Password');

    Same goes for the else statement.

    Note: you are missing a # to target the change_password_text id.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the following base code: (function($) { $.fn.myPlugin = function(settings) { return this.each(function() {
I have a code base, in which for Matrix class, these two definitions are
I have usercontrols which inherit a base class which looks like this: BasePage.cs: using
Code: Button b = new Button(this); b.setText(m.group()); RelativeLayout.LayoutParams lP = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
A bit of background first: I am using base code from a remote SVN
The code base I'm currently working on is littered with hard-coded values. I view
My code base is getting quite big and it's difficult to organize all the
In my code base I find that two modules have structures with the same
I have a code base that makes extensive use of files to represent a
I have a code base that has been used as an ASP.Net web application.

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.