Opening outer page without refresh

-2

How can I show a link or a div when I click a sem refresh on the page

<li>
                    <a data-toggle="collapse" href="#pagesExamples">
                        <i class="pe-7s-gift"></i>
                        <p>Comprar BCC | Buy BCC
                           <b class="caret"></b>
                        </p>
                    </a>
                    <div class="collapse" id="pagesExamples">
                        <ul class="nav">
                            <li>
                                <a href="#">
                                    <span class="sidebar-mini">BTC</span>
                                    <span class="sidebar-normal">Bitcoin</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </li>
            </ul>
        </div>
    </div>

Div that should appear when you click on span Bitcoin

<div class="btn-content-rc">
   <div class="rc-btn-payment"
  data-amount="100" 
  data-iso4217="BRL" 
  data-button="white" 
  data-refer_id="****" 
  data-token="976808fb-********33" 
  data-email_client="****[email protected]"> <!-- --> </div>
  <div class="btc-address-rc">
  </div>
 </div>
    
asked by anonymous 21.08.2018 / 02:19

1 answer

-1

For a more complete answer it would be necessary for you to post some code from your page, but assuming it could be a simple link:

You need to insert some anchor in your HTML.

<a href='/oi.php'>Ir para página</a>

href is an attribute used to define to which link a particular html tag is attached, and that the user will be sent if a specific iteration is performed with this tag .

Example: user clicks a link with tag:

<a href="www.google.com">Clique aqui</a>

is sent to the page www.google.com .

EDIT:

To open a page in a part of the site you can use iframe , following an example implementation:

<div>
  <a id="link">Mostrar página</a>
  <iframe id="myIframe" src="user/login">
  </iframe>
</div>

Javascript:

document.getElementById('link').onclick = showIframe;

function showIframe(){

  document.getElementById('myIframe').style.display = 'block';
  console.log('called')
}

CSS:

#myIframe { display:none; }

Link to working code: link

    
21.08.2018 / 02:50