Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/438.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在visualforce页面中,单击第一个按钮激活第二个按钮_Javascript_Visualforce - Fatal编程技术网

Javascript 在visualforce页面中,单击第一个按钮激活第二个按钮

Javascript 在visualforce页面中,单击第一个按钮激活第二个按钮,javascript,visualforce,Javascript,Visualforce,在我的visualforce页面中有两个按钮(插入和继续)。单击“继续”按钮后,页面中应显示“插入”按钮,否则“插入”按钮应隐藏 <apex:pageBlockButtons Id="buttonContainer"> <apex:commandButton value="Insert" rerender="mainForm"rendered= {!showInsertButton}" onClick="javascript:fnInsertCompany();return

在我的visualforce页面中有两个按钮(插入和继续)。单击“继续”按钮后,页面中应显示“插入”按钮,否则“插入”按钮应隐藏

<apex:pageBlockButtons Id="buttonContainer">
<apex:commandButton value="Insert" rerender="mainForm"rendered= 
{!showInsertButton}" onClick="javascript:fnInsertCompany();return false;" />
<apex:commandButton action="{!continue}" value="Continue" 
</apex:pageBlockButtons>


您已对“插入”按钮使用了“渲染”属性。可以在条件逻辑中轻松渲染此按钮

继续按钮中,操作是
继续
,即在控制器中有一个名为
继续()
的方法

因此,全局地使
showInsertButton=false
并在
continue()
方法中,使

showInsertButton = true  

仅此而已。

除非您发布实际代码,否则我们所能做的就是同情。