Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Question about GetElementById

947326Jul 4 2012 — edited Jul 7 2012
I have a JavaScript function that I am trying to either pass a value from according to a getElementById ("getqty"). The value should be passed to a <td> cell which contains the getElementById. The copy to the <td> with the getElementById should be done according to whether a box is checked or not. Is what I am doing the only way to access a JavaScript variable from PL/SQL. Below is my code:

THE FUNCTION:

function ckBox_click(theform,retcount)
{

for (i=1;i<=retcount;i++)
{
if (theform["p_check"+i].checked == true)
{

theform["p_check"+i].value=1;
var getqty1=theform["p_check"+i].value;
document.getElementById("getqty").value = getaty1;

}
else
{
theform["p_check"+i].value=0;
var getqty2 = theform["p_check"+i].value;
document.getElementById("getqty").value = getqty2;
}
}
}



HTML / PL/SQL CODE:

.
.
.

FOR in_rec IN value_cur
LOOP
v_rows := v_rows + 1;
IF ( in_rec.issue = 'Y') THEN
v_checkval := '1';
v_selected := 'checked';
in_rec.selected := 'Y';
ELSE
v_selected := '';
v_checkval := '0';
in_rec.selected := 'N';
END IF;

IF ( in_rec.allowed = 'N') THEN
IF ( in_rec.e_issue = 'Y') THEN
v_selected := 'disabled';
v_checkval := '0';
in_rec.selected := 'N';
END IF;
END IF;

.
.
.
htp.p(' <tr class="dsi_tbl_row">');
htp.p('<td width="10%" align="center"><input TYPE="checkbox" onchange=*"ckBox_click(pu_form, rownos)"* NAME="p_check'||v_rows||'" VALUE="'||v_checkval||'" '||v_selected||'></td>');
htp.p(' <td width="2%" id=*"getthis"* align="center"><FONT FACE="Arial" Size="2"></font></td>
.
.
.

END LOOP

Edited by: user1687851 on Jul 3, 2012 9:39 PM

Edited by: user1687851 on Jul 3, 2012 9:40 PM

Edited by: user1687851 on Jul 3, 2012 9:44 PM

Edited by: user1687851 on Jul 3, 2012 9:46 PM

Edited by: user1687851 on Jul 3, 2012 9:47 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2012
Added on Jul 4 2012
5 comments
259 views