Jump to content

_IEAction not submiting web form.


 Share

Recommended Posts

Hi, 

 

I am trying to submit a form using this code.
#include <IE.au3>

 

Local $oIE = _IECreate("http://www.somewebsite.com") ; 
    Local $oForm1 = _IEFormGetCollection($oIE, 3)
    Local $oQuery1 = _IEFormElementGetCollection($oForm1, 5)
    _IEFormElementSetValue($oQuery1,155)
    Local $oSubmit = _IEGetObjByName($oQuery1, "botao")
    _IEAction($oSubmit, "click")



Seems straight forward, i am using IEaction because of the javascript as stated in the manuals and online help, somehow after setting the value "155" in the form element i send a submit and nothing happens, i also dont get any error.

I have also tryed setting focus to the object and same result, somehow i dont seem to get this Local $oSubmit = _IEGetObjByName($oQuery1, "botao") well defined.



 ( below is the source for the html form) 

<form name="formulario" method="post" action="main.jsp">
    
        <input type="hidden" id="flow" name="flow" value=""/>
    
    
    



<!-- # Inicio Cabeçalho Ecrã # -->
<div class="whiteBox">
    <div class="whiteBoxTopLeftCorner"></div>
    <div class="whiteBoxTop"></div>
    <div class="whiteBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
    
<div class="whiteBoxLeft">
    <div class="whiteBoxRight whiteBoxFont">
        <div class="leilImgbreadCrumb"></div>
            <div>
                <h2 class="leilTitle">
                    <span>Detalhe do Leil&atilde;o Eletr&oacute;nico</span>
                </h2>
            </div>
     </div>
</div>

<div class="whiteBox">
    <div class="whiteBoxBottomLeftCorner"></div>
    <div class="whiteBoxBottom"></div>
    <div class="whiteBoxBottomRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
 <!-- # Fim Cabeçalho Ecrã # -->
    
    <input type="hidden" id="leilaoCod" name="leilaoCod" value='3085.2015.1187'/>
    
    <input type="hidden" id="servvend" name="servvend" value='3085'/>
    <input type="hidden" id="anovend" name="anovend" value='2015'/>
    <input type="hidden" id="numvend" name="numvend" value='1187'/>
    
    
    
    
    
    

    









    

        
        <div class="blueBox">
    <div class="blueBoxTopLeftCorner"></div>
    <div class="blueBoxTop"></div>
    <div class="blueBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
<div class="blueBoxLeft">
    <div class="blueBoxRight blueBoxFont">
        <div class="blueBoxBody">
        
        <span title="REGISTAR LICITA&Ccedil;&Atilde;O" class="titul">REGISTAR LICITA&Ccedil;&Atilde;O</span>
        
        <div class="blueBoxHr"></div>
        <div class="inlineDivReset"></div>
        
            
        <div class="blueBoxCell">
            <span class="blueBoxLabel">Valor de Licita&ccedil;&atilde;o:</span>
            <br/>
            <span class="blueBoxLabel">(Ex: 250,00)</span>
            <br/>
            
                <input type="text" id="valorLicitar" class="blueBoxInput" name='valorLicitar' size="14" maxlength="14" value=''/>
            
            <br/>
            <br/>
            
<!-- START BUTTON -->

<!-- ENABLED BUTTON -->
  <table id="botao" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: inline;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
          <a href="#" title="Licitar" onclick="javascript:return licitarLeilao();"><span class="">Licitar</span></a>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- DISABLED BUTTON -->
  <table id="botaoDisabled" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: none;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
<span class="">Licitar</span>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- END BUTTON -->
 
        </div>
        <div class="blueBoxInputCell" >
            <div class="divSituacPendente"></div>
        </div>
        <div class="blueBoxCell">
            <span class="blueBoxLabel">Valor da Última Licita&ccedil;&atilde;o:</span>
            <br/>
            <span class="blueBoxLabel"></span>
            <br/>
            <input type="text" id="valorLicitar" class="blueBoxInputDisabled" readOnly="readonly" size="14" maxlength="14" value='150,00' style="padding-bottom: 2px;"/>
            <br/>
            <br/>
            
            
<!-- START BUTTON -->

<!-- ENABLED BUTTON -->
  <table id="botao" name="botao" class="btn2" cellspacing="0" cellpadding="0" style="display: inline;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
          <a href="#" title="Actualizar" onclick="javascript:return actualizaUltimaLicitacao();"><span class="">Actualizar</span></a>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- DISABLED BUTTON -->
  <table id="botaoDisabled" name="botao" class="btn2" cellspacing="0" cellpadding="0" style="display: none;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
<span class="">Actualizar</span>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- END BUTTON -->
    
        </div>
        
        <div class="inlineDivReset"></div>
        
        <div>
            <span class="txt faqResposta">
            
                Informação obtida em: 2016-01-06 21:44:14.
            
                
            </span>
        </div>
        
            </div>
    </div>
</div>
<div class="blueBox">
    <div class="blueBoxBottomLeftCorner"></div>
    <div class="blueBoxBottom"></div>
    <div class="blueBoxBottomRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>

 

 

 

Edited by Mendes
typo
Link to comment
Share on other sites

I find myself in trouble again :) 

after i hit the link i have another webpage with another form, I have to check a checkbox there. however the $oIE object just didn't refresh so i cant invoke  _IEformgetobjbyName because it simply isn't there.

 

 

Local $oForms = _IEFormGetCollection($oIE)

For $oForm In $oForms
    $oelements = _IEFormElementGetCollection($oform)
        For $oelement In $oelements
            if $oelement.name = "valorLicitar" then
 _IEFormElementSetValue($oelement, 466)
    Next
Next
            _IELinkClickByText($oIE, "LICITAR")
            _IELoadWait ($oIE)

;by now the webpage has changed to the next step we need to check a box and press another link

            Local $oForm1 = _IEFormGetObjByName($oIE, "formulario")
            _IEFormElementCheckBoxSelect($oForm1, "condicao", "", 1, "byvalue")
; Why cant i find the checkbox ????

 

 

Link to comment
Share on other sites

I find myself in trouble again :) 

after i hit the link i have another webpage with another form, I have to check a checkbox there. however the $oIE object just didn't refresh so i cant invoke  _IEformgetobjbyName because it simply isn't there.

 

 

Local $oForms = _IEFormGetCollection($oIE)

For $oForm In $oForms
    $oelements = _IEFormElementGetCollection($oform)
        For $oelement In $oelements
            if $oelement.name = "valorLicitar" then
 _IEFormElementSetValue($oelement, 466)
    Next
Next
            _IELinkClickByText($oIE, "LICITAR")
            _IELoadWait ($oIE)

;by now the webpage has changed to the next step we need to check a box and press another link

            Local $oForm1 = _IEFormGetObjByName($oIE, "formulario")
            _IEFormElementCheckBoxSelect($oForm1, "condicao", "", 1, "byvalue")
; Why cant i find the checkbox ????

 

 

I once solved a checkbox click by using

Send("{TAB}")

Sleep(2000)

Send("{SPACE}")

 

I did this once because I had to click/check a checkbox on a site that I struggled with.
I know this may not be a solution to your script, but it may?
If not you could also try:

_IELinkClickByText($oIE, "Checkbox")
Link to comment
Share on other sites

I tried the linkclick function you sugest :) after a few failed attempts using the 

_IEFormGetObjByName($oIE, "formulario")

No cookie there, it isn't a link it is a form object, and the linkclickbytext doesn't work. 

If needed i can try the tab, but i will be unable to hide the window if i do that, and it is a bit dirty :)

But thanks for the sugestion it is indeed a last resource option.

Link to comment
Share on other sites

I tried the linkclick function you sugest :) after a few failed attempts using the 

_IEFormGetObjByName($oIE, "formulario")

No cookie there, it isn't a link it is a form object, and the linkclickbytext doesn't work. 

If needed i can try the tab, but i will be unable to hide the window if i do that, and it is a bit dirty :)

But thanks for the sugestion it is indeed a last resource option.

I will look for more options!
Sharing is caring and I have been helped recently and it made my life so much easier so the least I can do is to try and do the same.

Link to comment
Share on other sites

Thanks, i have been killing myself over this darn checkbox all day...

If it helps here is the html source where the checkbox is 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  lang="pt">

<head>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="author" content="DGITA / Opensoft">
    <meta name="description" content = "PORTAL DAS FINANÇAS">
    <meta name="keywords" content = "AT Autoridade Tributária Aduaneira Finanças">
    <meta name="language" content = "PT">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
        
        <title>Portal das Finanças</title>
    
    <script >

        function post(body) {

            document.dummyForm.body.value = body;
            document.dummyForm.submit();
            return false;
        }

        function postExternal(body) {
            document.dummyForm.action.value = body;
            document.dummyForm.submit();
            return false;
        }

        function doThePFLoad() {
            window.name = 'PortalFinancas';
            if (typeof onLoadBody == "function") {
                onLoadBody();
            }
        }


    </script>


    <link rel="stylesheet" type="text/css" href="/pf/styles/external.css" />
    <link rel="stylesheet" type="text/css" href="/pf/styles/dgci.css" />
    <link rel="stylesheet" type="text/css" href="/pf/styles/print.css" media="print" />
    <link rel="stylesheet" type="text/css" href="/pf/styles/pf.css" />
    <link rel="stylesheet" type="text/css" href="/pf/styles/aural.css" media="aural" />

    <!--[if IE 7]>
    <style type="text/css" media="all">
        select { height: 21px !important; }
        #paginacaoPG  td.paginas { text-align: center !important; }
        .goldButton { font-size: 10px !important; font-family: Trebuchet MS; line-height: 12px; height: 18px; background: url(/pf/img/btn1_middle.gif) left top repeat-x !important; padding-top: 3px; color: #ffffff !important; font-weight: bold; vertical-align: middle; text-transform: uppercase; border: none; float: left; display: inline; cursor: pointer; }
    </style>
    <![endif]-->

    <!--[if  lt IE 9]>
    <style type="text/css" media="all">
        #agendaDiv{
            width: 179px;
        }
    </style>

    <![endif]-->

    <!--[if lt IE 7]>
    <script defer type="text/javascript" src="/pf/js/pngfix.js"></script>
    <![endif]-->

    <script type="text/javascript" src="/pf/js/janelas.js"></script>
    <script type="text/javascript" src="/pf/js/images.js"></script>
    <script type="text/javascript" src="/pf/js/validation.js"></script>
    <script type="text/javascript" src="/pf/js/prototype.js"></script>
    <script type="text/javascript" src="/pf/js/auto-validation.js"></script>
    <script type="text/javascript" src="/pf/js/overlib.js"></script>
    <script type="text/javascript" src="/pf/js/functions.js"></script>
</head>

<body onload="doThePFLoad()">


<form name="dummyForm" method="post" action="main.jsp"><input type="hidden" name="body" value="" /></form>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>


<table id="main_Table" cellpadding="0" cellspacing="0">
    <tr>
        <td class="left_margin"><img src="/pf/img/pixel.gif" height="500" width="2" alt="" title="" /></td>
        <td class="conteudo" valign="top">
            <!-- HEADER-->
            <script>

    function getFormatedYar(number) {
        return (number < 1000) ? number + 1900 : number;
    }

    function getFormatedDate(){
        var now = new Date();
        var days = new Array(
            'Domingo','Segunda-feira','Terça-feira',
            'Quarta-feira','Quinta-feira','Sexta-feira','Sábado');
        var months = new Array(
            'janeiro','fevereiro','março','abril','maio',
            'junho','julho','agosto','setembro','outubro',
            'novembro','dezembro');
        var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

        today =  days[now.getDay()] + ", " + date + " " + months[now.getMonth()] + " " + (getFormatedYar(now.getYear()));

        document.write(today);
    }

</script>

<form action="/pesquisar.action" method="get" accept-charset="UTF-8" name="pesquisarForm" id="pesquisarForm">
<table cellpadding="0" cellspacing="0" id="header">
    <tr>
        <td class="left"><script>getFormatedDate()</script></td>
        <td class="separador"><img src="/pf/img/pixel.gif" height="1" width="1" alt="" title=""/></td>
        <td class="right">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td><h1 class="pageTitle">Portal das Finanças</h1></td>
                    <!--
                    <td class="fontSize">Tamanho de letra</td>
                    <td class="fontSize_img"><a href="novaFuncionalidade2Fase.action"><img src="/pf/img/Aa+.gif" alt="aumentar" title="aumentar" /></a><img src="/pf/img/pixel.gif" width="1" height="1" alt="" title="" /><a href="novaFuncionalidade2Fase.action"><img src="/pf/img/Aa-.gif" alt="diminuir" title="diminuir" /></a></td>
                     -->
                    <!--<td class="pesquisa">-->
                        <!--<label for="pesquisa">Pesquisa</label>-->
                        <!--<input type="text" class="main-search-input" value="Indique aqui o que pretende efetuar (ex: Pagar IUC)" id="pesquisa" name="query" onclick="searchPlaceholder(this);"/>-->
                        <!--<input type="hidden" name="e" value="&#152;">-->
                    <!--</td>-->
                    <!--<td>-->
                        <!--<button title="Pesquisar" id="pesquisabtn" type="submit" class="search">OK</button>-->
                    <!--</td>-->

                </tr>
            </table>

        </td>
                <td class="header-middle-center logout-header">
                        <a href="consultarMensagens.action" target="_top">Mensagens (0)</a>
        </td>
                                        <td class="header-middle-center logout-header"><a href="/menu.action?pai=660" target="_top">Dados Pessoais</a></td>
        <td class="header-middle-center logout-header"> <a href="/pt/logoutSA.action" target=_top>Sair</a></td>
        
    </tr>
</table>
</form>

            <!-- CONTEUDO -->
            <table cellpadding="0" cellspacing="0" id="main_area">
                <tr>
                    <td class="logoAT">
                        <a href="/">
                            <img src="/pf/img/logo-at.svg"onerror="this.onerror=null; this.src='/pf/img/logo-at.png'" alt="Autoridade Tributária e Aduaneira" title="Autoridade Tributária e Aduaneira" width="170" />
                        </a>
                    </td>
                    <td colspan="2" id="main-search-td">
                        <div class="main-search">
                            <form action="/pesquisar.action" method="get" accept-charset="UTF-8">
                                <input type="search" name="query"  class="main-search-input" placeholder="Indique aqui o que pretende efetuar (ex: Pagar IUC)"  >
                                <input type="hidden" name="e" value="?">
                                <input type="submit" class="main-search-submit" tabindex="-1" value="Pesquisar">
                            </form>
                        </div>
                    </td>
                </tr>
                <tr style="height: 6px;"></tr>
                <tr>
                    <td class="top_left">
                        <!-- MENU -->
                        <table cellpadding="0" cellspacing="0" id="menu">
                            <tr>
                                <td class="margin">&nbsp;</td>
                                <td class="left" align="left">
                                    <!-- menu -->
                                    <table cellpadding="0" cellspacing="0" class="menu" border="0">
    
        <tr><td class="top"><a href="http://info.portaldasfinancas.gov.pt/pt/at/at_index.htm">A AT</a></td></tr>

        <tr>
        <td><a href="http://info.portaldasfinancas.gov.pt/pt/dgci/dgci_youtube/">A AT no Youtube</a></td>
    </tr>

        <tr>
        <td><a href="http://twitter.com/Aut_Trib_Adua" target="_blank">A AT no Twitter</a></td>
    </tr>

    <tr><td><a href="/actualidade.action">Atualidade</a></td></tr>

        <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/">Apoio ao Contribuinte</a></td></tr>

        <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/informacao_fiscal/">Informação Fiscal</a></td></tr>

        <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/dgci/divulgacao/estatisticas/">Estatísticas</a></td></tr>

    
    <tr><td><a href="/servicos.action">Serviços Tributários</a></td></tr>
    
        <tr><td><a href="https://aduaneiro.portaldasfinancas.gov.pt/">Serviços Aduaneiros</a></td></tr>

    <tr><td><a href="/menu.action?pai=348">Downloads</a></td></tr>

        <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/divulgacao/outros_links.htm">Ligações a Sítios</a></td></tr>

        <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/docs/Conteudos_1pagina/NEWS_Portuguese_Tax_System.htm" >Portuguese Tax System</a></td></tr>

</table>

                                    <!-- outros servicos -->
                                    <!-- Serviço em destaque -->
    <table cellpadding="0" cellspacing="0" id="servicoDestaque">
        <tr>
            <td class="middle textcenter">
                                <a href="https://faturas.portaldasfinancas.gov.pt/"  target="ServicoDestaque"  >
                    <img src="/pf/img/logo-fatura.png" alt="Serviço em destaque: E-Fatura" title="Serviço em destaque: E-Fatura"/>
                </a>
            </td>
            <td class="margin"><img src="/pf/img/pixel.gif" alt="" title="" /></td>
        </tr>
        <tr class="space_agenda_fiscal">
            <td class="bottom_left"><img src="/pf/img/menuBox_cantoBottomLeft.gif" alt="" title=""/></td>
            <td class="bottom_right"><img src="/pf/img/menuBox_cantoBottomRight.gif" alt="" title=""/></td>
        </tr>
        <tr>
            <td class="agenda_border">
                <span class="title"><a class="title_agenda" href="calendario.action" target="_top">Agenda Fiscal</a></span>
            </td>
        </tr>
    </table>






                                    <!-- proximos servicos -->
                                    

                                    <!-- banner -->
                                    <!--
<table cellpadding="0" cellspacing="0" id="banner">
    <tr>
        <td class="top_left"><img src="/pf/img/menuBox_cantoTopLeft.gif" alt="" title=""/></td>
        <td class="middle"></td>
        <td class="top_right"><img src="/pf/img/menuBox_cantoTopRight.gif" alt="" title="" /></td>
    </tr>
    <tr>
        <td class="margin"><img src="/pf/img/pixel.gif" alt="" title="" /></td>
        <td class="middle">
            <a href="desconhecida.action"><img src="/pf/img/banner_educacaoFiscal.gif" alt="Educação Fiscal" title="Educação Fiscal" /></a>
        </td>
        <td class="margin"><img src="/pf/img/pixel.gif" alt="" title="" /></td>
    </tr>
    <tr>
        <td class="bottom_left"><img src="/pf/img/menuBox_cantoBottomLeft.gif" alt="" title=""/></td>
        <td class="middle"></td>
        <td class="bottom_right"><img src="/pf/img/menuBox_cantoBottomRight.gif" alt="" title=""/></td>
    </tr>
</table>
-->

                                    <!-- Agenda -->
                                    <!-- agenda fiscal -->





                                </td>
                                <td class="margin">&nbsp;</td>
                            </tr>

                        </table>
                    </td>
                    <td id="main_middle_body" class="middle middle-correct" rowspan="2" valign="top">
                        <!-- conteudo central -->
                        <div class="bodyBox mainBody">

                            <div class="inlineDivReset"></div>
                            <div class="bodyBoxInnerElement">
                                <!-- BREADCRUMBS -->
<p>
<table cellpadding="0" cellspacing="0" id="breadcrumbs">
    <tr>
        <td>
            <span>Você está aqui</span>
            
            <span class="home"><a href="/home.action">Início</a></span>
                                        <a href="/inicio.action">Os Seus Serviços</a>
                        
            <!--  from here -->
            
            
                            
                                    
                                    
                                                                <a href="/pt/menu.action?pai=256&segId=CD" title="Outros Serviços">Outros Serviços</a>
                            
                                    
                                    
                                                                <a href="/pt/menu.action?pai=807&segId=CD" title="Venda Electrónica de Bens">Venda Electrónica de Bens</a>
                            
                                    
                                    
                                                                <a href="/pt/main.jsp?body=/external/slelei/SLELEI/listaLeiloes.htm" title="Leilão Electrónico">Leilão Electrónico</a>
            
        </td>
    </tr>
    
    <tr><td class="hr"><img src="/pf/img/pixel.gif" width="1" height="1" alt="" title="" /></td></tr>
    
</table>
</p>
<script>
    function getBreadCrumbsAditionalInfoParentId () {
        return "807";
    }

    function getBreadCrumbsAditionalInfoParentSegmentId () {
                    return "CD";
            }

    function getBreadCrumbsAditionalInfoBreadCrumbSize() {
        return 3;   
    }
    
</script>

                                <div class="user_info_printable">

                                </div>
                            </div>
                            <div class="bodyBoxInnerElement">
                                <table width="100%"><tr><td>










<script language="javascript">
    function onLoadBody() { }
    
    function toNum(valor) {
        var x = '';
        if (valor != null && valor != '') {
            if (valor.indexOf('.') > -1) {
                var pos = valor.indexOf('.');
                if (valor.indexOf(',')==-1) {
                    x = valor;
                } else {
                    while(pos != -1) {
                        x = x.concat(valor.substring(0, pos));
                        valor = valor.substring(pos+1);
                        pos = valor.indexOf('.');
                    }
                    x = x.concat(valor);
                }
            } else {
                x = valor;
            }
            x = x.replace(/,/g, '.');
            return parseFloat(x);
        } else {
            return 0.0;
        }
    }
    
    function licitarLeilao(){
        var ultimaLicitacao = document.getElementById('ultimaLicitacao').value;
        var valorLicitar = document.getElementById('valorLicitar').value;

        if(ultimaLicitacao == ' -- '){
            ultimaLicitacao = document.getElementById('valorBase').value;
        }
        
        var racio = toNum(valorLicitar) / toNum(ultimaLicitacao);
        
        if (racio < 1.5) {
            if(!confirm('Confirma o valor de licitação (' + valorLicitar +' eur.) do leilão?')){
                return false;
            }   
        }
        else {  
            if(!confirm('ATENÇÃO!! O valor de licitação é muito superior à última licitação. \n\n Confirma o valor de licitação (' + valorLicitar +' eur.) do leilão?')){
                return false;
            }
        }   
        
        var flow = document.getElementById('flow');
        flow.value = '8';
        
        document.formulario.submit();
    }
    
    function voltarLicitacao(){

        var flow = document.getElementById('flow');
        flow.value = '0';
        document.formulario.submit();
    }
    
</script>

<form name="formulario" method="post" action="main.jsp">
    
        <input type="hidden" id="flow" name="flow" value=""/>
    

    
        <input type="hidden" id="ultimaLicitacao" name="ultimaLicitacao" value="470,00"/>
    
    
    
        <input type="hidden" id="valorBase" name="valorBase" value="70,00"/>
    

    <input type="hidden" id="leilaoCod" name="leilaoCod" value='0248.2015.126'/>
    
    



<!-- # Inicio Cabeçalho Ecrã # -->
<div class="whiteBox">
    <div class="whiteBoxTopLeftCorner"></div>
    <div class="whiteBoxTop"></div>
    <div class="whiteBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
    
<div class="whiteBoxLeft">
    <div class="whiteBoxRight whiteBoxFont">
        <div class="leilImgbreadCrumb"></div>
            <div>
                <h2 class="leilTitle">
                    <span>Licita&ccedil;&atilde;o para o Leil&atilde;o Electr&oacute;nico</span>
                </h2>
            </div>
     </div>
</div>

<div class="whiteBox">
    <div class="whiteBoxBottomLeftCorner"></div>
    <div class="whiteBoxBottom"></div>
    <div class="whiteBoxBottomRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
 <!-- # Fim Cabeçalho Ecrã # -->

    








    
    
        
        <div class="whiteBox">
    <div class="whiteBoxTopLeftCorner"></div>
    <div class="whiteBoxTop"></div>
    <div class="whiteBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
<div class="whiteBoxLeft">
    <div class="whiteBoxRight whiteBoxFont">
        
        <span title="CONDI&Ccedil;&Otilde;ES DE LICITA&Ccedil;&Atilde;O" class="titul">CONDI&Ccedil;&Otilde;ES DE LICITA&Ccedil;&Atilde;O</span>
        
        <div class="hespaco"></div>
        <div class="hr"></div>
            <span class="txt">- N&atilde;o podem ser adquirentes, por si, por interposta pessoa ou por entidade jur&iacute;dica em que participem, os magistrados e os funcion&aacute;rios da Administra&ccedil;&atilde;o Tribut&aacute;ria [256.&ordm;/1/a) CPPT];</span>
            <span class="txt"><br>- N&atilde;o podem ser adquirentes entidades n&atilde;o residentes submetidas a um regime fiscal claramente mais favor&aacute;vel ou aquelas cujos regimes jur&iacute;dicos n&atilde;o permitam identificar os titulares efetivos do capital [256.&ordm;/1/b) CPPT];</span>
            <span class="txt"><br>- S&oacute; ser&atilde;o aceites propostas de valor igual ou superior ao valor base de venda. Se j&aacute; existirem propostas entregues para esta venda, s&oacute; ser&atilde;o aceites propostas de valor superior ao da &uacute;ltima licita&ccedil;&atilde;o;</span>
            <span class="txt"><br>- As propostas, uma vez apresentadas, s&oacute; podem ser retiradas se a sua abertura for adiada por mais de noventa dias depois do primeiro designado (820.&ordm;/4 CPC);</span>
            <span class="txt"><br>- Ap&oacute;s fim do leil&atilde;o dever&aacute; consultar o seu resultado neste Portal das Finan&ccedil;as, de forma a poder cumprir com o prazo de pagamento [256.&ordm;/1/e)/f) CPPT].</span>
        <div class="hr"></div>
        <div class="leilDualHespaco"></div>
        
        <input type="checkBox" id="condicao" name="condicao" class="checkBoxLicitar" title="Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o."  value="1" > <label class="alertaCondicao" for="condicao">Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o.</label>
        
            </div>
</div>
<div class="whiteBox">
   <div class="whiteBoxBottomLeftCorner"></div>
   <div class="whiteBoxBottom"></div>
   <div class="whiteBoxBottomRightCorner"></div>
   <div class="inlineDivReset"></div>
</div>
        
        
        <div class="blueBox">
    <div class="blueBoxTopLeftCorner"></div>
    <div class="blueBoxTop"></div>
    <div class="blueBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
<div class="blueBoxLeft">
    <div class="blueBoxRight blueBoxFont">
        <div class="blueBoxBody">
        
        <span title="REGISTAR LICITA&Ccedil;&Atilde;O" class="titul">CONFIRMAR LICITA&Ccedil;&Atilde;O</span>
        
        <div class="hr"></div>
        <div class="hespaco"></div>
        <div class="divFormSubmitConsulta">
            <label class="blueBoxInputLabel" for="valorLicitar">Valor de Licita&ccedil;&atilde;o</label><br/>
            
            <input type="text" id="valorLicitar" name='valorLicitar' class="blueBoxInput" size="14" maxlength="14" value='471,00'/>
            
        </div>
        <div class="leilDualHespaco"></div>
        
<!-- START BUTTON -->

<!-- ENABLED BUTTON -->
  <table id="botao" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: inline;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
          <a href="#" title="Licitar" onclick="javascript:return licitarLeilao();"><span class="">Licitar</span></a>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- DISABLED BUTTON -->
  <table id="botaoDisabled" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: none;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
<span class="">Licitar</span>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- END BUTTON -->
 
        
                </div>
    </div>
</div>
<div class="blueBox">
    <div class="blueBoxBottomLeftCorner"></div>
    <div class="blueBoxBottom"></div>
    <div class="blueBoxBottomRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
    
    
    
    <input name="body" type="hidden" value="/external/slelei/SLELEI/licitarLeilao.htm"/>
    
    <!-- zona informativa do leilão -->
    <div class="whiteBox">
    <div class="whiteBoxTopLeftCorner"></div>
    <div class="whiteBoxTop"></div>
    <div class="whiteBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
<div class="whiteBoxLeft">
    <div class="whiteBoxRight whiteBoxFont">
    
    <span title="INFORMA&Ccedil;&Atilde;O DO LEIL&Atilde;O" class="titul">INFORMA&Ccedil;&Atilde;O DO LEIL&Atilde;O </span>
    
    <div class="hespaco"></div>
    <div class="hr"></div>
    <div class="leilDualHespaco"></div>
    <div class="fieldTitleBold dvalueLeft">
       <span>C&oacute;digo do Leil&atilde;o</span>
    </div>
    <div class="dvalueRight fieldValue">
       <span>
            0248.2015.126
       </span>
    </div>
    <div class="hespaco"></div>
    <div class="fieldTitleBold dvalueLeft">
       <span>Localiza&ccedil;&atilde;o</span>
    </div>
    <div class="dvalueRight fieldValue">
            <span title="Distrito">BEJA                          </span>
            <span>&nbsp;/&nbsp;</span>
            <span title="Concelho">BEJA                          </span>
            
            <span>&nbsp;/&nbsp;</span>
            <span title="Freguesia">BEJA (SANTIAGO MAIOR E SÃO JOÃO BAPTISTA)</span>
            
    </div>
    <div class="hespaco"></div>
    <div class="fieldTitleBold dvalueLeft">
       <span>Valor Base</span>
    </div>
    <div class="dvalueRight fieldValue">
       <span>
            70,00&nbsp;&euro;
       </span>
    </div>
    <div class="hespaco"></div>
    <div class="fieldTitleBold dvalueLeft">
       <span>&Uacute;ltima Licita&ccedil;&atilde;o </span>
    </div>
    <div class="dvalueRight fieldValue">
       <span>
            470,00&nbsp;&euro;
       </span>
    </div>
    <div class="leilDualHespaco"></div>
    
        </div>
</div>
<div class="whiteBox">
   <div class="whiteBoxBottomLeftCorner"></div>
   <div class="whiteBoxBottom"></div>
   <div class="whiteBoxBottomRightCorner"></div>
   <div class="inlineDivReset"></div>
</div>

    <div>
    <span class="txt faqResposta">
         Informação obtida em: 2016-01-08 00:12:44.
    </span>
    </div>

    <!-- Botão Voltar -->
    <div style="padding-left:477px;">
        
<!-- START BUTTON -->

<!-- ENABLED BUTTON -->
  <table id="botao" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: inline;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
          <a href="#" title="Voltar à página anterior." onclick="javascript:return voltarLicitacao();"><span class="">Voltar</span></a>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- DISABLED BUTTON -->
  <table id="botaoDisabled" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: none;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
<span class="">Voltar</span>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- END BUTTON -->
 
    </div>
    
</form>



<form name="formFooter" method="get" action="main.jsp">

<div class="hespaco"></div>

<div class="whiteBox">
    <div class="whiteBoxTopLeftCorner"></div>
    <div class="whiteBoxTop"></div>
    <div class="whiteBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
<div class="whiteBoxLeft">
    <div class="whiteBoxRight whiteBoxFont">
<div style="text-align: center;">
            <img src="/pf/img/fwd_btn2.gif" alt="" title="" />
            <a title="Ir para a gest&atilde;o prefer&ecirc;ncias" href="main.jsp?body=/external/slelei/SLELEI/preferencias.htm">Prefer&ecirc;ncias</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <img src="/pf/img/fwd_btn2.gif" alt="" title="" /> 
            <a title="Ir para a gest&atilde;o alertas" href="main.jsp?body=/external/slelei/SLELEI/alertas.htm">Alertas</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <img src="/pf/img/fwd_btn2.gif" alt="" title="" /> 
            <a title="Ir para as perguntas frequentes" href="main.jsp?body=/external/slelei/SLELEI/faq.htm">Perguntas Frequentes</a>&nbsp;
</div>
    </div>
</div>
<div class="whiteBox">
   <div class="whiteBoxBottomLeftCorner"></div>
   <div class="whiteBoxBottom"></div>
   <div class="whiteBoxBottomRightCorner"></div>
   <div class="inlineDivReset"></div>
</div>

<input name="body" type="hidden" value=""/>

</form>

<!-- Acaba aqui a aplicação  --></td></tr></table>
                            </div>
                            <div style="clear:both"></div>
                            <div class="bodyBoxInnerElement">
                                
                            </div>
                            <div class="bodyBoxExpander"></div>
                        </div>

                    </td>
                    <td class="right iframe_width iframe_height" rowspan="2" >
                        <!-- LOGIN -->
                        <iframe src="/pt/oSeuEspaco.action" marginwidth="0" marginheight="0" id="seuEspaco" frameborder="0" scrolling="no" class="iframe_width iframe_height">
                        </iframe>
                    </td>
                </tr>

            </table>
        </td>
        <td class="right_margin" ><img src="/pf/img/pixel.gif" height="500" width="2" alt="" title="" /></td>

    </tr>
    <tr class="footer_tr template_main">
        <td class="left_margin" ><img src="/pf/img/pixel.gif"  width="2" alt="" title="" /></td>
        <td class="middle">
            <!-- FOOTER -->
            <table  cellpadding="0" cellspacing="0" id="footer">
                <tr>
                    <td id="footer_template" class="footer">
                        <!-- FOOTER -->

<table cellpadding="0" cellspacing="0" class="footer">
    <tr>
        <td><img src="/pf/img/pixel.gif"  width="2" alt="" title="" /></td>
        <td class="middle">
            <table cellspacing="0" cellpadding="0">
                <tr>
                    <td id="footer_left_menu" class="left">
                        <div class="col-width-50 pull-left">
                            <ul class="">
                                <li>
                                                                        <a href="http://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/carta_do_utente.htm">Carta do Utente</a>
                                </li>
                                <li>
                                                                        <a href="http://info.portaldasfinancas.gov.pt/pt/dgci/missao/">Conheça a Autoridade Tributária e Aduaneira</a>
                                </li>
                                <li>
                                                                        <a href="http://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/questoes_frequentes/">Questões Frequentes</a>
                                </li>
                                <li>
                                                                        <a href="http://info.portaldasfinancas.gov.pt/pt/dgci/divulgacao/estatisticas/">Estatísticas</a>
                                </li>
                                <li>
                                                                        <a href="http://info.portaldasfinancas.gov.pt/pt/quem_somos/privacidade/">Privacidade</a>
                                </li>
                            </ul>
                        </div>

                        <div id="footer_middle_menu" class="col-width-25 pull-left">
                            <span class="footer_title">Área Pessoal</span>
                            <ul >
                                <li>
                                                                                                                                                                                    <a href="/menu.action?pai=660" target="_top" title="Dados Pessoais">Dados Pessoais</a>
                                </li>
                                <li>
                                    <a href="consultarMensagens.action" target="_top">Mensagens</a>
                                </li>
                                                                    <li>
                                        <a href="/pt/logoutSA.action" target=_top>Sair</a>
                                    </li>
                                                            </ul>
                        </div>

                        <div id="footer_right_menu" class="col-width-25 pull-left" >
                            <ul >
                                <li>
                                    <a href="http://www.w3.org/WAI/WCAG1AA-Conformance" target="_blank">
                                        <img src="/pf/img/wcag1AA-blue.png" alt="Acessibilidade" title="Acessibilidade" height="31" width="88"/>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="atualizacao_footer">Última atualização em 2015-12-30 | 2.1.18.0553 | Autoridade Tributária e Aduaneira</td>
                </tr>

            </table>
        </td>
        <td class="right_margin"><img src="/pf/img/pixel.gif" height="20" width="2" alt="" title=""></td>
    </tr>

</table>

                    </td>
                </tr>
            </table>
        </td>
        <td class="right_margin" ><img src="/pf/img/pixel.gif" width="2" alt="" title="" /></td>
    </tr>

</table>
</body>
</html>

 

 

Link to comment
Share on other sites

Thanks, i have been killing myself over this darn checkbox all day...

If it helps here is the html source where the checkbox is 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  lang="pt">

<head>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="author" content="DGITA / Opensoft">
    <meta name="description" content = "PORTAL DAS FINANÇAS">
    <meta name="keywords" content = "AT Autoridade Tributária Aduaneira Finanças">
    <meta name="language" content = "PT">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
        
        <title>Portal das Finanças</title>
    
    <script >

        function post(body) {

            document.dummyForm.body.value = body;
            document.dummyForm.submit();
            return false;
        }

        function postExternal(body) {
            document.dummyForm.action.value = body;
            document.dummyForm.submit();
            return false;
        }

        function doThePFLoad() {
            window.name = 'PortalFinancas';
            if (typeof onLoadBody == "function") {
                onLoadBody();
            }
        }


    </script>


    <link rel="stylesheet" type="text/css" href="/pf/styles/external.css" />
    <link rel="stylesheet" type="text/css" href="/pf/styles/dgci.css" />
    <link rel="stylesheet" type="text/css" href="/pf/styles/print.css" media="print" />
    <link rel="stylesheet" type="text/css" href="/pf/styles/pf.css" />
    <link rel="stylesheet" type="text/css" href="/pf/styles/aural.css" media="aural" />

    <!--[if IE 7]>
    <style type="text/css" media="all">
        select { height: 21px !important; }
        #paginacaoPG  td.paginas { text-align: center !important; }
        .goldButton { font-size: 10px !important; font-family: Trebuchet MS; line-height: 12px; height: 18px; background: url(/pf/img/btn1_middle.gif) left top repeat-x !important; padding-top: 3px; color: #ffffff !important; font-weight: bold; vertical-align: middle; text-transform: uppercase; border: none; float: left; display: inline; cursor: pointer; }
    </style>
    <![endif]-->

    <!--[if  lt IE 9]>
    <style type="text/css" media="all">
        #agendaDiv{
            width: 179px;
        }
    </style>

    <![endif]-->

    <!--[if lt IE 7]>
    <script defer type="text/javascript" src="/pf/js/pngfix.js"></script>
    <![endif]-->

    <script type="text/javascript" src="/pf/js/janelas.js"></script>
    <script type="text/javascript" src="/pf/js/images.js"></script>
    <script type="text/javascript" src="/pf/js/validation.js"></script>
    <script type="text/javascript" src="/pf/js/prototype.js"></script>
    <script type="text/javascript" src="/pf/js/auto-validation.js"></script>
    <script type="text/javascript" src="/pf/js/overlib.js"></script>
    <script type="text/javascript" src="/pf/js/functions.js"></script>
</head>

<body onload="doThePFLoad()">


<form name="dummyForm" method="post" action="main.jsp"><input type="hidden" name="body" value="" /></form>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>


<table id="main_Table" cellpadding="0" cellspacing="0">
    <tr>
        <td class="left_margin"><img src="/pf/img/pixel.gif" height="500" width="2" alt="" title="" /></td>
        <td class="conteudo" valign="top">
            <!-- HEADER-->
            <script>

    function getFormatedYar(number) {
        return (number < 1000) ? number + 1900 : number;
    }

    function getFormatedDate(){
        var now = new Date();
        var days = new Array(
            'Domingo','Segunda-feira','Terça-feira',
            'Quarta-feira','Quinta-feira','Sexta-feira','Sábado');
        var months = new Array(
            'janeiro','fevereiro','março','abril','maio',
            'junho','julho','agosto','setembro','outubro',
            'novembro','dezembro');
        var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

        today =  days[now.getDay()] + ", " + date + " " + months[now.getMonth()] + " " + (getFormatedYar(now.getYear()));

        document.write(today);
    }

</script>

<form action="/pesquisar.action" method="get" accept-charset="UTF-8" name="pesquisarForm" id="pesquisarForm">
<table cellpadding="0" cellspacing="0" id="header">
    <tr>
        <td class="left"><script>getFormatedDate()</script></td>
        <td class="separador"><img src="/pf/img/pixel.gif" height="1" width="1" alt="" title=""/></td>
        <td class="right">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td><h1 class="pageTitle">Portal das Finanças</h1></td>
                    <!--
                    <td class="fontSize">Tamanho de letra</td>
                    <td class="fontSize_img"><a href="novaFuncionalidade2Fase.action"><img src="/pf/img/Aa+.gif" alt="aumentar" title="aumentar" /></a><img src="/pf/img/pixel.gif" width="1" height="1" alt="" title="" /><a href="novaFuncionalidade2Fase.action"><img src="/pf/img/Aa-.gif" alt="diminuir" title="diminuir" /></a></td>
                     -->
                    <!--<td class="pesquisa">-->
                        <!--<label for="pesquisa">Pesquisa</label>-->
                        <!--<input type="text" class="main-search-input" value="Indique aqui o que pretende efetuar (ex: Pagar IUC)" id="pesquisa" name="query" onclick="searchPlaceholder(this);"/>-->
                        <!--<input type="hidden" name="e" value="&#152;">-->
                    <!--</td>-->
                    <!--<td>-->
                        <!--<button title="Pesquisar" id="pesquisabtn" type="submit" class="search">OK</button>-->
                    <!--</td>-->

                </tr>
            </table>

        </td>
                <td class="header-middle-center logout-header">
                        <a href="consultarMensagens.action" target="_top">Mensagens (0)</a>
        </td>
                                        <td class="header-middle-center logout-header"><a href="/menu.action?pai=660" target="_top">Dados Pessoais</a></td>
        <td class="header-middle-center logout-header"> <a href="/pt/logoutSA.action" target=_top>Sair</a></td>
        
    </tr>
</table>
</form>

            <!-- CONTEUDO -->
            <table cellpadding="0" cellspacing="0" id="main_area">
                <tr>
                    <td class="logoAT">
                        <a href="/">
                            <img src="/pf/img/logo-at.svg"onerror="this.onerror=null; this.src='/pf/img/logo-at.png'" alt="Autoridade Tributária e Aduaneira" title="Autoridade Tributária e Aduaneira" width="170" />
                        </a>
                    </td>
                    <td colspan="2" id="main-search-td">
                        <div class="main-search">
                            <form action="/pesquisar.action" method="get" accept-charset="UTF-8">
                                <input type="search" name="query"  class="main-search-input" placeholder="Indique aqui o que pretende efetuar (ex: Pagar IUC)"  >
                                <input type="hidden" name="e" value="?">
                                <input type="submit" class="main-search-submit" tabindex="-1" value="Pesquisar">
                            </form>
                        </div>
                    </td>
                </tr>
                <tr style="height: 6px;"></tr>
                <tr>
                    <td class="top_left">
                        <!-- MENU -->
                        <table cellpadding="0" cellspacing="0" id="menu">
                            <tr>
                                <td class="margin">&nbsp;</td>
                                <td class="left" align="left">
                                    <!-- menu -->
                                    <table cellpadding="0" cellspacing="0" class="menu" border="0">
    
        <tr><td class="top"><a href="http://info.portaldasfinancas.gov.pt/pt/at/at_index.htm">A AT</a></td></tr>

        <tr>
        <td><a href="http://info.portaldasfinancas.gov.pt/pt/dgci/dgci_youtube/">A AT no Youtube</a></td>
    </tr>

        <tr>
        <td><a href="http://twitter.com/Aut_Trib_Adua" target="_blank">A AT no Twitter</a></td>
    </tr>

    <tr><td><a href="/actualidade.action">Atualidade</a></td></tr>

        <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/">Apoio ao Contribuinte</a></td></tr>

        <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/informacao_fiscal/">Informação Fiscal</a></td></tr>

        <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/dgci/divulgacao/estatisticas/">Estatísticas</a></td></tr>

    
    <tr><td><a href="/servicos.action">Serviços Tributários</a></td></tr>
    
        <tr><td><a href="https://aduaneiro.portaldasfinancas.gov.pt/">Serviços Aduaneiros</a></td></tr>

    <tr><td><a href="/menu.action?pai=348">Downloads</a></td></tr>

        <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/divulgacao/outros_links.htm">Ligações a Sítios</a></td></tr>

        <tr><td><a href="http://info.portaldasfinancas.gov.pt/pt/docs/Conteudos_1pagina/NEWS_Portuguese_Tax_System.htm" >Portuguese Tax System</a></td></tr>

</table>

                                    <!-- outros servicos -->
                                    <!-- Serviço em destaque -->
    <table cellpadding="0" cellspacing="0" id="servicoDestaque">
        <tr>
            <td class="middle textcenter">
                                <a href="https://faturas.portaldasfinancas.gov.pt/"  target="ServicoDestaque"  >
                    <img src="/pf/img/logo-fatura.png" alt="Serviço em destaque: E-Fatura" title="Serviço em destaque: E-Fatura"/>
                </a>
            </td>
            <td class="margin"><img src="/pf/img/pixel.gif" alt="" title="" /></td>
        </tr>
        <tr class="space_agenda_fiscal">
            <td class="bottom_left"><img src="/pf/img/menuBox_cantoBottomLeft.gif" alt="" title=""/></td>
            <td class="bottom_right"><img src="/pf/img/menuBox_cantoBottomRight.gif" alt="" title=""/></td>
        </tr>
        <tr>
            <td class="agenda_border">
                <span class="title"><a class="title_agenda" href="calendario.action" target="_top">Agenda Fiscal</a></span>
            </td>
        </tr>
    </table>






                                    <!-- proximos servicos -->
                                    

                                    <!-- banner -->
                                    <!--
<table cellpadding="0" cellspacing="0" id="banner">
    <tr>
        <td class="top_left"><img src="/pf/img/menuBox_cantoTopLeft.gif" alt="" title=""/></td>
        <td class="middle"></td>
        <td class="top_right"><img src="/pf/img/menuBox_cantoTopRight.gif" alt="" title="" /></td>
    </tr>
    <tr>
        <td class="margin"><img src="/pf/img/pixel.gif" alt="" title="" /></td>
        <td class="middle">
            <a href="desconhecida.action"><img src="/pf/img/banner_educacaoFiscal.gif" alt="Educação Fiscal" title="Educação Fiscal" /></a>
        </td>
        <td class="margin"><img src="/pf/img/pixel.gif" alt="" title="" /></td>
    </tr>
    <tr>
        <td class="bottom_left"><img src="/pf/img/menuBox_cantoBottomLeft.gif" alt="" title=""/></td>
        <td class="middle"></td>
        <td class="bottom_right"><img src="/pf/img/menuBox_cantoBottomRight.gif" alt="" title=""/></td>
    </tr>
</table>
-->

                                    <!-- Agenda -->
                                    <!-- agenda fiscal -->





                                </td>
                                <td class="margin">&nbsp;</td>
                            </tr>

                        </table>
                    </td>
                    <td id="main_middle_body" class="middle middle-correct" rowspan="2" valign="top">
                        <!-- conteudo central -->
                        <div class="bodyBox mainBody">

                            <div class="inlineDivReset"></div>
                            <div class="bodyBoxInnerElement">
                                <!-- BREADCRUMBS -->
<p>
<table cellpadding="0" cellspacing="0" id="breadcrumbs">
    <tr>
        <td>
            <span>Você está aqui</span>
            
            <span class="home"><a href="/home.action">Início</a></span>
                                        <a href="/inicio.action">Os Seus Serviços</a>
                        
            <!--  from here -->
            
            
                            
                                    
                                    
                                                                <a href="/pt/menu.action?pai=256&segId=CD" title="Outros Serviços">Outros Serviços</a>
                            
                                    
                                    
                                                                <a href="/pt/menu.action?pai=807&segId=CD" title="Venda Electrónica de Bens">Venda Electrónica de Bens</a>
                            
                                    
                                    
                                                                <a href="/pt/main.jsp?body=/external/slelei/SLELEI/listaLeiloes.htm" title="Leilão Electrónico">Leilão Electrónico</a>
            
        </td>
    </tr>
    
    <tr><td class="hr"><img src="/pf/img/pixel.gif" width="1" height="1" alt="" title="" /></td></tr>
    
</table>
</p>
<script>
    function getBreadCrumbsAditionalInfoParentId () {
        return "807";
    }

    function getBreadCrumbsAditionalInfoParentSegmentId () {
                    return "CD";
            }

    function getBreadCrumbsAditionalInfoBreadCrumbSize() {
        return 3;   
    }
    
</script>

                                <div class="user_info_printable">

                                </div>
                            </div>
                            <div class="bodyBoxInnerElement">
                                <table width="100%"><tr><td>










<script language="javascript">
    function onLoadBody() { }
    
    function toNum(valor) {
        var x = '';
        if (valor != null && valor != '') {
            if (valor.indexOf('.') > -1) {
                var pos = valor.indexOf('.');
                if (valor.indexOf(',')==-1) {
                    x = valor;
                } else {
                    while(pos != -1) {
                        x = x.concat(valor.substring(0, pos));
                        valor = valor.substring(pos+1);
                        pos = valor.indexOf('.');
                    }
                    x = x.concat(valor);
                }
            } else {
                x = valor;
            }
            x = x.replace(/,/g, '.');
            return parseFloat(x);
        } else {
            return 0.0;
        }
    }
    
    function licitarLeilao(){
        var ultimaLicitacao = document.getElementById('ultimaLicitacao').value;
        var valorLicitar = document.getElementById('valorLicitar').value;

        if(ultimaLicitacao == ' -- '){
            ultimaLicitacao = document.getElementById('valorBase').value;
        }
        
        var racio = toNum(valorLicitar) / toNum(ultimaLicitacao);
        
        if (racio < 1.5) {
            if(!confirm('Confirma o valor de licitação (' + valorLicitar +' eur.) do leilão?')){
                return false;
            }   
        }
        else {  
            if(!confirm('ATENÇÃO!! O valor de licitação é muito superior à última licitação. \n\n Confirma o valor de licitação (' + valorLicitar +' eur.) do leilão?')){
                return false;
            }
        }   
        
        var flow = document.getElementById('flow');
        flow.value = '8';
        
        document.formulario.submit();
    }
    
    function voltarLicitacao(){

        var flow = document.getElementById('flow');
        flow.value = '0';
        document.formulario.submit();
    }
    
</script>

<form name="formulario" method="post" action="main.jsp">
    
        <input type="hidden" id="flow" name="flow" value=""/>
    

    
        <input type="hidden" id="ultimaLicitacao" name="ultimaLicitacao" value="470,00"/>
    
    
    
        <input type="hidden" id="valorBase" name="valorBase" value="70,00"/>
    

    <input type="hidden" id="leilaoCod" name="leilaoCod" value='0248.2015.126'/>
    
    



<!-- # Inicio Cabeçalho Ecrã # -->
<div class="whiteBox">
    <div class="whiteBoxTopLeftCorner"></div>
    <div class="whiteBoxTop"></div>
    <div class="whiteBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
    
<div class="whiteBoxLeft">
    <div class="whiteBoxRight whiteBoxFont">
        <div class="leilImgbreadCrumb"></div>
            <div>
                <h2 class="leilTitle">
                    <span>Licita&ccedil;&atilde;o para o Leil&atilde;o Electr&oacute;nico</span>
                </h2>
            </div>
     </div>
</div>

<div class="whiteBox">
    <div class="whiteBoxBottomLeftCorner"></div>
    <div class="whiteBoxBottom"></div>
    <div class="whiteBoxBottomRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
 <!-- # Fim Cabeçalho Ecrã # -->

    








    
    
        
        <div class="whiteBox">
    <div class="whiteBoxTopLeftCorner"></div>
    <div class="whiteBoxTop"></div>
    <div class="whiteBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
<div class="whiteBoxLeft">
    <div class="whiteBoxRight whiteBoxFont">
        
        <span title="CONDI&Ccedil;&Otilde;ES DE LICITA&Ccedil;&Atilde;O" class="titul">CONDI&Ccedil;&Otilde;ES DE LICITA&Ccedil;&Atilde;O</span>
        
        <div class="hespaco"></div>
        <div class="hr"></div>
            <span class="txt">- N&atilde;o podem ser adquirentes, por si, por interposta pessoa ou por entidade jur&iacute;dica em que participem, os magistrados e os funcion&aacute;rios da Administra&ccedil;&atilde;o Tribut&aacute;ria [256.&ordm;/1/a) CPPT];</span>
            <span class="txt"><br>- N&atilde;o podem ser adquirentes entidades n&atilde;o residentes submetidas a um regime fiscal claramente mais favor&aacute;vel ou aquelas cujos regimes jur&iacute;dicos n&atilde;o permitam identificar os titulares efetivos do capital [256.&ordm;/1/b) CPPT];</span>
            <span class="txt"><br>- S&oacute; ser&atilde;o aceites propostas de valor igual ou superior ao valor base de venda. Se j&aacute; existirem propostas entregues para esta venda, s&oacute; ser&atilde;o aceites propostas de valor superior ao da &uacute;ltima licita&ccedil;&atilde;o;</span>
            <span class="txt"><br>- As propostas, uma vez apresentadas, s&oacute; podem ser retiradas se a sua abertura for adiada por mais de noventa dias depois do primeiro designado (820.&ordm;/4 CPC);</span>
            <span class="txt"><br>- Ap&oacute;s fim do leil&atilde;o dever&aacute; consultar o seu resultado neste Portal das Finan&ccedil;as, de forma a poder cumprir com o prazo de pagamento [256.&ordm;/1/e)/f) CPPT].</span>
        <div class="hr"></div>
        <div class="leilDualHespaco"></div>
        
        <input type="checkBox" id="condicao" name="condicao" class="checkBoxLicitar" title="Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o."  value="1" > <label class="alertaCondicao" for="condicao">Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o.</label>
        
            </div>
</div>
<div class="whiteBox">
   <div class="whiteBoxBottomLeftCorner"></div>
   <div class="whiteBoxBottom"></div>
   <div class="whiteBoxBottomRightCorner"></div>
   <div class="inlineDivReset"></div>
</div>
        
        
        <div class="blueBox">
    <div class="blueBoxTopLeftCorner"></div>
    <div class="blueBoxTop"></div>
    <div class="blueBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
<div class="blueBoxLeft">
    <div class="blueBoxRight blueBoxFont">
        <div class="blueBoxBody">
        
        <span title="REGISTAR LICITA&Ccedil;&Atilde;O" class="titul">CONFIRMAR LICITA&Ccedil;&Atilde;O</span>
        
        <div class="hr"></div>
        <div class="hespaco"></div>
        <div class="divFormSubmitConsulta">
            <label class="blueBoxInputLabel" for="valorLicitar">Valor de Licita&ccedil;&atilde;o</label><br/>
            
            <input type="text" id="valorLicitar" name='valorLicitar' class="blueBoxInput" size="14" maxlength="14" value='471,00'/>
            
        </div>
        <div class="leilDualHespaco"></div>
        
<!-- START BUTTON -->

<!-- ENABLED BUTTON -->
  <table id="botao" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: inline;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
          <a href="#" title="Licitar" onclick="javascript:return licitarLeilao();"><span class="">Licitar</span></a>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- DISABLED BUTTON -->
  <table id="botaoDisabled" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: none;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
<span class="">Licitar</span>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- END BUTTON -->
 
        
                </div>
    </div>
</div>
<div class="blueBox">
    <div class="blueBoxBottomLeftCorner"></div>
    <div class="blueBoxBottom"></div>
    <div class="blueBoxBottomRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
    
    
    
    <input name="body" type="hidden" value="/external/slelei/SLELEI/licitarLeilao.htm"/>
    
    <!-- zona informativa do leilão -->
    <div class="whiteBox">
    <div class="whiteBoxTopLeftCorner"></div>
    <div class="whiteBoxTop"></div>
    <div class="whiteBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
<div class="whiteBoxLeft">
    <div class="whiteBoxRight whiteBoxFont">
    
    <span title="INFORMA&Ccedil;&Atilde;O DO LEIL&Atilde;O" class="titul">INFORMA&Ccedil;&Atilde;O DO LEIL&Atilde;O </span>
    
    <div class="hespaco"></div>
    <div class="hr"></div>
    <div class="leilDualHespaco"></div>
    <div class="fieldTitleBold dvalueLeft">
       <span>C&oacute;digo do Leil&atilde;o</span>
    </div>
    <div class="dvalueRight fieldValue">
       <span>
            0248.2015.126
       </span>
    </div>
    <div class="hespaco"></div>
    <div class="fieldTitleBold dvalueLeft">
       <span>Localiza&ccedil;&atilde;o</span>
    </div>
    <div class="dvalueRight fieldValue">
            <span title="Distrito">BEJA                          </span>
            <span>&nbsp;/&nbsp;</span>
            <span title="Concelho">BEJA                          </span>
            
            <span>&nbsp;/&nbsp;</span>
            <span title="Freguesia">BEJA (SANTIAGO MAIOR E SÃO JOÃO BAPTISTA)</span>
            
    </div>
    <div class="hespaco"></div>
    <div class="fieldTitleBold dvalueLeft">
       <span>Valor Base</span>
    </div>
    <div class="dvalueRight fieldValue">
       <span>
            70,00&nbsp;&euro;
       </span>
    </div>
    <div class="hespaco"></div>
    <div class="fieldTitleBold dvalueLeft">
       <span>&Uacute;ltima Licita&ccedil;&atilde;o </span>
    </div>
    <div class="dvalueRight fieldValue">
       <span>
            470,00&nbsp;&euro;
       </span>
    </div>
    <div class="leilDualHespaco"></div>
    
        </div>
</div>
<div class="whiteBox">
   <div class="whiteBoxBottomLeftCorner"></div>
   <div class="whiteBoxBottom"></div>
   <div class="whiteBoxBottomRightCorner"></div>
   <div class="inlineDivReset"></div>
</div>

    <div>
    <span class="txt faqResposta">
         Informação obtida em: 2016-01-08 00:12:44.
    </span>
    </div>

    <!-- Botão Voltar -->
    <div style="padding-left:477px;">
        
<!-- START BUTTON -->

<!-- ENABLED BUTTON -->
  <table id="botao" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: inline;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
          <a href="#" title="Voltar à página anterior." onclick="javascript:return voltarLicitacao();"><span class="">Voltar</span></a>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- DISABLED BUTTON -->
  <table id="botaoDisabled" name="botao" class="btn1" cellspacing="0" cellpadding="0" style="display: none;">
    <tbody>
      <tr>
        <td class="left">
          <img height="18" width="4" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
        <td class="middle">
<span class="">Voltar</span>
        </td>
        <td class="right">
          <img height="18" width="5" title=" " alt=" " src="/pf/img/pixel.gif"/>
        </td>
      </tr>
    </tbody>
  </table>

<!-- END BUTTON -->
 
    </div>
    
</form>



<form name="formFooter" method="get" action="main.jsp">

<div class="hespaco"></div>

<div class="whiteBox">
    <div class="whiteBoxTopLeftCorner"></div>
    <div class="whiteBoxTop"></div>
    <div class="whiteBoxTopRightCorner"></div>
    <div class="inlineDivReset"></div>
</div>
<div class="whiteBoxLeft">
    <div class="whiteBoxRight whiteBoxFont">
<div style="text-align: center;">
            <img src="/pf/img/fwd_btn2.gif" alt="" title="" />
            <a title="Ir para a gest&atilde;o prefer&ecirc;ncias" href="main.jsp?body=/external/slelei/SLELEI/preferencias.htm">Prefer&ecirc;ncias</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <img src="/pf/img/fwd_btn2.gif" alt="" title="" /> 
            <a title="Ir para a gest&atilde;o alertas" href="main.jsp?body=/external/slelei/SLELEI/alertas.htm">Alertas</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <img src="/pf/img/fwd_btn2.gif" alt="" title="" /> 
            <a title="Ir para as perguntas frequentes" href="main.jsp?body=/external/slelei/SLELEI/faq.htm">Perguntas Frequentes</a>&nbsp;
</div>
    </div>
</div>
<div class="whiteBox">
   <div class="whiteBoxBottomLeftCorner"></div>
   <div class="whiteBoxBottom"></div>
   <div class="whiteBoxBottomRightCorner"></div>
   <div class="inlineDivReset"></div>
</div>

<input name="body" type="hidden" value=""/>

</form>

<!-- Acaba aqui a aplicação  --></td></tr></table>
                            </div>
                            <div style="clear:both"></div>
                            <div class="bodyBoxInnerElement">
                                
                            </div>
                            <div class="bodyBoxExpander"></div>
                        </div>

                    </td>
                    <td class="right iframe_width iframe_height" rowspan="2" >
                        <!-- LOGIN -->
                        <iframe src="/pt/oSeuEspaco.action" marginwidth="0" marginheight="0" id="seuEspaco" frameborder="0" scrolling="no" class="iframe_width iframe_height">
                        </iframe>
                    </td>
                </tr>

            </table>
        </td>
        <td class="right_margin" ><img src="/pf/img/pixel.gif" height="500" width="2" alt="" title="" /></td>

    </tr>
    <tr class="footer_tr template_main">
        <td class="left_margin" ><img src="/pf/img/pixel.gif"  width="2" alt="" title="" /></td>
        <td class="middle">
            <!-- FOOTER -->
            <table  cellpadding="0" cellspacing="0" id="footer">
                <tr>
                    <td id="footer_template" class="footer">
                        <!-- FOOTER -->

<table cellpadding="0" cellspacing="0" class="footer">
    <tr>
        <td><img src="/pf/img/pixel.gif"  width="2" alt="" title="" /></td>
        <td class="middle">
            <table cellspacing="0" cellpadding="0">
                <tr>
                    <td id="footer_left_menu" class="left">
                        <div class="col-width-50 pull-left">
                            <ul class="">
                                <li>
                                                                        <a href="http://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/carta_do_utente.htm">Carta do Utente</a>
                                </li>
                                <li>
                                                                        <a href="http://info.portaldasfinancas.gov.pt/pt/dgci/missao/">Conheça a Autoridade Tributária e Aduaneira</a>
                                </li>
                                <li>
                                                                        <a href="http://info.portaldasfinancas.gov.pt/pt/apoio_contribuinte/questoes_frequentes/">Questões Frequentes</a>
                                </li>
                                <li>
                                                                        <a href="http://info.portaldasfinancas.gov.pt/pt/dgci/divulgacao/estatisticas/">Estatísticas</a>
                                </li>
                                <li>
                                                                        <a href="http://info.portaldasfinancas.gov.pt/pt/quem_somos/privacidade/">Privacidade</a>
                                </li>
                            </ul>
                        </div>

                        <div id="footer_middle_menu" class="col-width-25 pull-left">
                            <span class="footer_title">Área Pessoal</span>
                            <ul >
                                <li>
                                                                                                                                                                                    <a href="/menu.action?pai=660" target="_top" title="Dados Pessoais">Dados Pessoais</a>
                                </li>
                                <li>
                                    <a href="consultarMensagens.action" target="_top">Mensagens</a>
                                </li>
                                                                    <li>
                                        <a href="/pt/logoutSA.action" target=_top>Sair</a>
                                    </li>
                                                            </ul>
                        </div>

                        <div id="footer_right_menu" class="col-width-25 pull-left" >
                            <ul >
                                <li>
                                    <a href="http://www.w3.org/WAI/WCAG1AA-Conformance" target="_blank">
                                        <img src="/pf/img/wcag1AA-blue.png" alt="Acessibilidade" title="Acessibilidade" height="31" width="88"/>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="atualizacao_footer">Última atualização em 2015-12-30 | 2.1.18.0553 | Autoridade Tributária e Aduaneira</td>
                </tr>

            </table>
        </td>
        <td class="right_margin"><img src="/pf/img/pixel.gif" height="20" width="2" alt="" title=""></td>
    </tr>

</table>

                    </td>
                </tr>
            </table>
        </td>
        <td class="right_margin" ><img src="/pf/img/pixel.gif" width="2" alt="" title="" /></td>
    </tr>

</table>
</body>
</html>

 

Can you copy the checkbox code only.
Then I will see if I can get some responses.
You are using _IE, the site does not offer some form of API?
Would make your  life easier most likely and able to use WinHTTP.

Link to comment
Share on other sites

Ye shure, but the problem is not the checkbox code, it is that the _oIE object does not refresh.
I cant even get the form where the check box is using 

_IEFormGetObjByName($oIE, "formulario")

i keep getting the forms on the previous page.the ones that where present before i used the 

_IELinkClickByText($oIE, "Checkbox")

 

checkbox code :

      
        <input type="checkBox" id="condicao" name="condicao" class="checkBoxLicitar" title="Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o."  value="1" > <label class="alertaCondicao" for="condicao">Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o.</label>

 

Link to comment
Share on other sites

Ye shure, but the problem is not the checkbox code, it is that the _oIE object does not refresh.
I cant even get the form where the check box is using 

_IEFormGetObjByName($oIE, "formulario")

i keep getting the forms on the previous page.the ones that where present before i used the 

_IELinkClickByText($oIE, "Checkbox")

 

checkbox code :

      
        <input type="checkBox" id="condicao" name="condicao" class="checkBoxLicitar" title="Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o."  value="1" > <label class="alertaCondicao" for="condicao">Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o.</label>

 

Link to comment
Share on other sites

Ye shure, but the problem is not the checkbox code, it is that the _oIE object does not refresh.
I cant even get the form where the check box is using 

_IEFormGetObjByName($oIE, "formulario")

i keep getting the forms on the previous page.the ones that where present before i used the 

_IELinkClickByText($oIE, "Checkbox")

 

checkbox code :

      
        <input type="checkBox" id="condicao" name="condicao" class="checkBoxLicitar" title="Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o."  value="1" > <label class="alertaCondicao" for="condicao">Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o.</label>

 

Link to comment
Share on other sites

Ye shure, but the problem is not the checkbox code, it is that the _oIE object does not refresh.
I cant even get the form where the check box is using 

_IEFormGetObjByName($oIE, "formulario")

i keep getting the forms on the previous page.the ones that where present before i used the 

_IELinkClickByText($oIE, "Checkbox")

 

checkbox code :

      
        <input type="checkBox" id="condicao" name="condicao" class="checkBoxLicitar" title="Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o."  value="1" > <label class="alertaCondicao" for="condicao">Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o.</label>

 

Maybe you should use _IENavigate to the page you got those details on, then after its navigated to the site, run the rest of the script.

Link to comment
Share on other sites

checkbox code :

      
        <input type="checkBox" id="condicao" name="condicao" class="checkBoxLicitar" title="Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o."  value="1" > <label class="alertaCondicao" for="condicao">Li e Concordo com as condi&ccedil;&otilde;es de licita&ccedil;&atilde;o.</label>

This line was wrong:

_IEFormElementCheckBoxSelect($oForm1, "condicao", "", 1, "byvalue")

You should use it like this:

_IEFormElementCheckBoxSelect($oForm1, "1", "condicao", 1, "byValue")
 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • 2 weeks later...

mLipok, 

after some deserved hollidays i am back at it.

 

Even if the expression was wrong it still doesn't work. I don't know how to better explain the problem but i will try to deconstruct it.

  1. I load a webpage with IEcreate assigning to $oIE
  2. Then i assign to $oforms the forms in that page
  3. Then i pick a field in  $oforms[1] (lets call it field[1] and insert a value into it.

Since i cant submit the form because it uses javascript in a link i use _IELinkClickByText($oIE, "LINKTOSUBMIT")

 

The page loads into a new page (because i just cliked the link) and i have a check box there 

However this time my $oIE ofcourse still has the previous page elements  (so no checkbox there )

 

How can i use 

Local $oForm1 = _IEFormGetObjByName($oIE, "formulario")
_IEFormElementCheckBoxSelect($oForm1,"1", "condicao", 1, "byValue")

 

if the element isn't there.....

 

 

#include <IE.au3>
#include <MsgBoxConstants.au3>

Local $oIE = _IECreate("http://website.example")

Local $oForms = _IEFormGetCollection($oIE)
local $leilaocod
local $i


For $oForm In $oForms
   ConsoleWrite ("Form Info :  " & $oForm.name & @CRLF)
    $oelements = _IEFormElementGetCollection($oform)
        For $oelement In $oelements
            if $oelement.name = "" then $oelement.name = "*********"
            ConsoleWrite ("Element Info | Name : " & $oelement.name & " Type : " & $oelement.Type & " Value : " & $oelement.Value & @CRLF)
            if $oelement.name = "leilaoCod" then $leilaocod = $oelement.value
            if $oelement.name = "valorLicitar" then
            _IEFormElementSetValue($oelement, 11113)
            _IELinkClickByText($oIE, "linktosubmit")
            _IELoadWait ($oIE)
            ;condicoesclick()
            EndIf
    Next
Next

func condicoesclick()
#cs    ;Dirty way ... hate sending tabs
sleep (1000)
            While $i <29
            sleep(10)
            Send("{TAB}")
            $i = $i +1
            Wend
Send("{SPACE}")
#ce

Local $oForm1 = _IEFormGetObjByName($oIE, "formulario")
_IEFormElementCheckBoxSelect($oForm1,"1", "condicao", 1, "byValue")

EndFunc

 

And i get a   IE.au3 T3.0-2 Warning from function _IEFormElementCheckBoxSelect, $_IESTATUS_NoMatch

 

 

 

 

 

Edited by Mendes
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...