473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

onchange event to populate data

i have two inputs that i want an onchange function, when you input number of hours the NPCode should change to present,otherwise it should be absent.that means if no hours is submitted then it should, by default be Absent. (myTotalHrs is input box while NpCode is a Dropdown.) P.S view attachment

Expand|Select|Wrap|Line Numbers
  1. $TotalHrs = array(
  2.         'name'          => 'AddTotalHrs['. $rowcount .']',
  3.         'value'         => '',
  4.         'maxlength'     => '3',
  5.         'size'          => '3',
  6. );
  7. $NPCode = array(
  8.         'name'          => 'AddNPCode['. $rowcount .']',
  9.         'id'        => 'NPCode' . $rowcount,
  10. );
  11.  
Attached Images
File Type: jpg attn.jpg (38.0 KB, 168 views)
Dec 17 '15 #1
1 1232
Dormilich
8,658 Expert Mod 8TB
you are aware the the posted code is PHP and hence does not respond to any user actions such as a change event?
Dec 18 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Covad | last post by:
Hi all, For some reason my change() function is only called when the page loads. I'd much rather it gets called when the select changes. Here's the code: window.onload = init; function...
1
by: José Carlos | last post by:
Hi. I have an array with mysql´s data. I have used this array with several text box in a formulary. My question is: How could i use the event onchange to make a function which update the...
2
by: Asit | last post by:
In JavaScripts checks for an onChange event against the value of the textbox at the time of the last onChange event. Since an onChange Event never fired after you changed the text first time ,...
3
by: Santosh | last post by:
Hi, I have a requirement in which, I need to capture a loan amount and the amount of down payment for that loan. According to the requirement, the user is going to enter enter the loan amount and...
4
by: Zeebra3 | last post by:
Here goes: I have a web form with several asp:dropdownlists, with which, when selection is changed I want to fire an event defined in some clientside js. The content of the clientside code is...
3
by: b_naick | last post by:
I realize that the onChange event for a drop down can be trapped as follows: <select name="myDropDown" onChange="somefunc"> Is it possible to trap the onChange event outside of the select...
7
by: slekshmipriya | last post by:
Hai friends.I have a pblm with my drop down list onchange event.The pblm is as follow I have a drop drown list with items 1,2 ,3 etc. On selecting an item from the drop down list i want to...
1
by: langdale | last post by:
I am using a popup calendar to populate an input field. When the contents of this field change I need the onChange event to fire so that I can perform further updates. The onChange event...
7
by: robtyketto | last post by:
Greetings, I'm slowly building up code to do the following:- Display TWO selection option boxes (cascading). If the FIRST selection option box changes then reload the jsp using onchange...
1
by: ruds | last post by:
Hello, I have a JSP page in which HTML form elements are present. I have a drop down list named Country, when a user selects his country I want another drop down list to populate based on the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.