function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
I have custom page and I would like to display message box after some task is done.
How can I do that?
Thanks
message box?
as like this?
in page:
<script>
if('{!showMessage}'=='True'){
alert('your message!');
}
</script>
in controller:
public String showMessage{
get;set;
get;
set;
public void actionDo(){
//do somethingshowMessage='True';
//do something
showMessage='True';
You might have to create the javascript as a function then when the action has been completed call the function.
Example:
<apex:commandButton action="{!actionDo}" value="Do Something" oncomplete="showMessage();" />
example:
visualforce code---
<apex:page controller="PageTest"><script>if('{!showMessage}'=='True'){ alert('your message!'); }</script> <apex:form > <apex:commandButton action="{!actionDo}" value="Do Something"/> </apex:form></apex:page>
apex class:
public class PageTest{
public String showMessage{ get; set; } public void actionDo(){ //do something showMessage='True'; }
(passed my test)use these code to test.. you will success.. hehe. 祝你好运!。 ^_^.
message box?
as like this?
in page:
<script>
if('{!showMessage}'=='True'){
}
</script>
in controller:
public String showMessage{
}
public void actionDo(){
}
You might have to create the javascript as a function then when the action has been completed call the function.
Example:
<apex:commandButton action="{!actionDo}" value="Do Something" oncomplete="showMessage();" />
example:
visualforce code---
<apex:page controller="PageTest">
<script>
if('{!showMessage}'=='True'){
alert('your message!');
}
</script>
<apex:form >
<apex:commandButton action="{!actionDo}" value="Do Something"/>
</apex:form>
</apex:page>
apex class:
public class PageTest{
public String showMessage{
get;
set;
}
public void actionDo(){
//do something
showMessage='True';
}
}
(passed my test)use these code to test.. you will success.. hehe. 祝你好运!。 ^_^.