I want to display a confirmation dialog when requesting a catalog item

chanken
Tera Contributor

Hi everyone,

I want to display a confirmation dialog when requesting a catalog item.

When the requester applies for the request item, I want to display the contents of the request item on the dialog.

I would like to obtain information to be helpful.

What should I refer?

regards.

4 REPLIES 4

Shashank Vashi1
Mega Guru
Mega Guru

Please use onsubmit catalog client script:



var retVal = confirm("Do you want to continue ?");
   
if( retVal == true ){
  document
.write ("User wants to continue!");
   
return true;
   
}
   
else{
  document
.write ("User does not want to continue!");
   
return false;
   
}


Hi Shashank,



Thank you for responce.


I want to display the contents of the catalog item variables in the confirmation dialog.


How should I do?



regards.


you can try in this way,



confirm( 'Do you want to continue with for ' + g_form.getValue('user_name') + '?');


Hi Kenji,



You can use


var retVal = confirm("Do you want to continue with value of variable name" + g_form.getValue('variablename') + "?");