Search This Blog

Sunday, February 16, 2025

How to Implement Password Hide/Show in Login Page

Follow these steps to enable users to toggle between hiding and showing their password on the login page.

Step 1: Add the Function and Global Variable

First, you need to add the following JavaScript function and global variable to your login page.

function viewPW() {
   var Vpw = document.getElementById('P9999_PASSWORD'); 
// The password input field
   var VsetIcon = document.getElementById('pwItem'); 
// The icon for toggling visibility

    if (Vpw.type !== 'password') {
        // Hide password: change type to 'password' and show the eye icon
        Vpw.type = 'password';
        VsetIcon.className = 'fa fa-eye pw-item-icon'; // 'eye' icon
    } else {
    // Show password: change type to 'text' and show the 'eye-slash' icon
        Vpw.type = 'text';
        VsetIcon.className = 'fa fa-eye-slash pw-item-icon'; // 'eye-slash' icon
    }
}

Step 2: Add the Inline CSS

Next, insert this inline CSS to style the visibility toggle icon and place it to the right of the password input.

.pw-item-icon {
    float: right;
    margin-left: -30px;
    margin-top: 11px;
    position: relative;
    z-index: 1;
}

Step 3: Add the Toggle Icon to Your Password Input Field

Finally, insert the following HTML code right after your password input field. This code will create the eye icon that the user can click to toggle password visibility.

<span id="pwItem" class="fa fa-eye pw-item-icon" onClick="viewPW()" 
aria-hidden="true"></span>


Saturday, February 15, 2025

Automatic ORDS start / Create a windows service to open a software automatically

Step 1: Create the Batch File

  1. Open a text editor (like Notepad) and add the following code, replacing the path with your Oracle ORDS directory:
@echo off
cd C:\Oracle\app\ords
java -jar ords.war
pause
  1. Save the file with a .bat extension (e.g., start_ords.bat).

Step 2: Test the Batch File

  1. Double-click the .bat file to ensure it starts Oracle ORDS properly.

  2. Once confirmed, move the file to the ORDS installation directory (e.g., C:\Oracle\app\ords).


Step 3: Download NSSM

  1. Go to the following link and download NSSM (Non-Sucking Service Manager) version 2.24:

    NSSM 2.24 Download Link

  2. Extract the contents of the ZIP file to a folder, then move the extracted folder to your C: drive.


Step 4: Install ORDS as a Service

  1. Navigate to the folder where NSSM was extracted (C:\nssm-2.24\win64).

  2. In the file explorer, hold Shift and right-click inside the folder. Select "Open command window here" or "Open PowerShell window here."

  3. In the command prompt, type:

nssm.exe install

Step 5: Configure the Service

  1. In the NSSM window that opens, browse to the .bat file you created earlier.
  2. Set the "Shutdown" option to "None."
  3. Provide a service name (e.g., ORDS_Service) and click "Install."

Step 6: Set the Service to Start Automatically

  1. Open the Services application (press Windows + R, type services.msc, and hit Enter).
  2. Find the service you just created (ORDS_Service), right-click it, and select "Properties."
  3. Set the "Startup type" to "Automatic" and click "OK."

That’s it! ORDS should now start automatically as a service whenever your system restarts.


Let me know if you need any more tweaks or further details!

Thursday, February 13, 2025

Create List from Navigation Menu

 select null      c1_level,

       ENTRY_TEXT     c2_name_for_label,
       ENTRY_TARGET c3_target_url,
       null      c4_is_current,
       ENTRY_IMAGE  c5_icon_name,
       null      c6_icon_attrs,
       null      c7_icon_alt_text,
       null       c8_user_attr1_badge_text
from APEX_APPLICATION_LIST_ENTRIES where LIST_NAME='Desktop Navigation Menu' and APPLICATION_ID=147 and PARENT_ENTRY_TEXT='Tables & Queries';

How to Implement Password Hide/Show in Login Page

Follow these steps to enable users to toggle between hiding and showing their password on the login page. Step 1: Add the Function and Glob...