Como usar o showmessage no intraweb ?

Delphi

16/05/2018

Boa tarde estou tentando usar o showconfirm no intraweb porém gostaria de saber como faço pra testar se foi clickado no OK ou no Cancel alguém saberia me informar ?
Desde já agradeço

WebApplication.ShowConfirm('Confirmar ?','BtnConfirmar');
Rodrigo Oliveira

Rodrigo Oliveira

Curtidas 0

Respostas

Raimundo Pereira

Raimundo Pereira

16/05/2018

Boa tarde.
Intra não muito bem a minha praia.

Mais vi uma aula Delphi + Intraweb + Bootstrap parte VI no Youtube.
https://www.youtube.com/watch?v=9tQ9_fy1eY0

Nela é usado um Html com algumas funções.

<!DOCTYPE html>
<html lang="en">
	<head>
	  <title>Exemplo IW + Bootstrap</title>	

		
  	    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/r/bs-3.3.5/jq-2.1.4,dt-1.10.8/datatables.min.css"/>
		<script type="text/javascript" src="https://cdn.datatables.net/r/bs-3.3.5/jqc-1.11.3,dt-1.10.8/datatables.min.js"></script>
		
 	    <script type="text/javascript" charset="utf-8">
			var table = $(document).ready(function() {
				$('#gridclientes').DataTable({responsive: true});
				$('#TBLIWDBGRID1').DataTable({responsive: true});				
			} );
		</script>


		<script type="text/javascript" charset="utf-8"> 
			function setRecordPosition(id, Acao) {
				debugger;
				document.getElementById('IWEDITREMESSA').value = id;
				AddChangedControl('IWEDITREMESSA');   // colocar essa linha sempre que usar o onAsyncClick pois colocar o campo como alterado
				if (Acao == 'alterar')
				{
				  IWBUTTONEDIT.click();   
				}
				else if (Acao == 'excluir')
				{
				  IWBUTTONEXCLUIR.click();   
				}                
			}
		</script>

	</head>
		<body>
			<div class="container">
				<div class="clearfix" style="display:none">{%IWEDITREMESSA%}{%IWBUTTONEDIT%}{%IWBUTTONEXCLUIR%}</div>

    			<div class="col-sm-12">  
        			<button type="button" class="btn btn-primary" id="IWBUTTONNOVO">Adicionar novo registro</button>					
				</div>	

				<div class="col-sm-12">  
					<table id="gridclientes" class="table table-hover table-striped table-condensed">
						<thead>
							<tr>
							   <th>CustNo</th>
							   <th>Company</th>
							   <th>Country</th>						   
							   <th>Action</th>					   
							</tr>
						</thead>	
						<tbody>
							{%GRIDCLIENTESDATA%}	
						</tbody>
					</table>		
				</div>					
			</div>

			<!-- Modal -->
			<div id="EditaDados" class="modal fade" role="dialog">
				<div class="modal-dialog">
				 <!-- Modal content-->
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal">×</button>
							<h4 class="modal-title">Customer - Edição de dados</h4>
						</div>
						<div class="modal-body">
							<div class="form-group">
								<label for="id_cliente">CustNo</label>
								{%IWDBEDITCUSTNO%}
							</div>
							<div class="form-group">
								<label for="id_cliente">Company</label>
								{%IWDBEDITCOMPANY%}
							</div>
							<div class="form-group">
								<label for="razao">Country</label>
								{%IWDBEDITCOUNTRY%}
							</div>
						</div>
						<script>
							$('#EditaDados').on('shown.bs.modal', function () {
									$('#IWDBEDITCUSTNO').focus();
							});
						</script>					
						<div class="modal-footer">
							{%IWBUTTONGRAVAR%}
							{%IWBUTTONCANCELAR%}							
						</div>
					</div>
				</div>
			</div>		
			
		</body>
</html>


No delphi ele usa um componente : IWTemplateProcessorHTML1
Dentro do mesmo ele consegue manipular o código HTML.

GOSTEI 0
Raimundo Pereira

Raimundo Pereira

16/05/2018

Link da demonstração com a confirmação de mensagem.
https://onedrive.live.com/?authkey=%21ACD4NdEecu-nrB4&cid=413D5CDBBEAA5DBA&id=413D5CDBBEAA5DBA%212503&parId=root&action=locate
GOSTEI 0
POSTAR