Category : parameter-passing

I want to get a variable, called id in this case, and pass it to the onConfirm event… however, as you can see actually it is getting called by another’s function call in setAlert How can I do that? const warningWithConfirmAndCancelMessage = (id) => { setAlert( <ReactBSAlert warning style={{ display: ‘block’, marginTop: ‘-100px’ }} title=’Are ..

Read more

I’m writing an add-on for Pale Moon web browser (Mozilla). I have added the menu item to the right-click menu contentAreaContextMenu, which is the menu that appears when you right-click on a hyperlink. My problem is that I don’t know how to send the hyperlink to the called function. I’ve tried: oncommand="projectName.BrowserOverlay.sayLink(document.activeElement);" But it returns ..

Read more

I’m programming a small CRUD interface with js, PHP and MYSQL. To avoid SQL injection, my javascript is separately POSTing a prepared SQL statement form._source and an array containing the parameters form._param _post = {action:’read’, source:form._source}; if (form._param !== null) _post[‘param’]=form._param; $.post("/ajax/crud.php",_post, function(result){ if (!result.error) { form._record = result.data; form._totrec = result.data.length; form.gotoRecord(setrec); } else ..

Read more