#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    14
    Rep Power
    0

    Several links, only one file


    I'm developing a site plan internet, and of course visit a site, I found an interesting way to update the information where there is button for each plan, but the update is done within the same page. If anyone understood what I tried to speak, follows the course page link: http://www.vendasclaro.com.br/pacotes.html

    Clicking on the desired package channel list changes depending on the package. It is this modification of data that I want to do.
    Could anyone help me?

    My level in PHP is not the best, but I'm trying here and there ... but I need a push to get where I want ... lol, I understand the site of course, is that the code is divided into 4 stages:
    1. Local to choose the package:
    Code:
    <div id="pacotes_main" class="site">
    <img width="956" height="192" style="margin-bottom: 15px;" title="Claro TV" alt="Claro TV" src="http://www.vendasclaro.com.br/uploads/banners/claro_tv/banner_ronaldo.jpg">
    <div id="pacote_facil" class="fLeft">
    <div class="tituloConteudo" style="width: 202px;">
    <div class="border_left"></div>
    <div class="border_right"></div>
    <span class="text_titulo" style="text-align: center;">Fácil</span>
    </div>
    <div class="descricaoConteudo" style="width: 210px;">
    <ul class="listagemOpcoes">
    <li id="li_pacote2" class="li_pacote">
    <a id="pacote2" class="seleciona_pacote" style="width: 100%;display: table;">
    <span class="nomePacote fLeft" style="width: 120px">Fácil</span>
    <span class="valorPacote fLeft">* R$ 39,90</span>
    </a>
    </li>
    ...
    <div class="reset"></div>
    <div id="resposta_ajax" class="site">
    As I understand it, each button has an ID, which will be interpreted by a JS in the second stage:
    2nd. Interpretation of choice by JS, generating a form.
    Code:
    $(".seleciona_pacote").click(function(){        
        var id_pacote = $(this).attr("id").replace("pacote", "");
        
        $(".li_pacote").each(function() {
          $(this).removeClass("selected");      
        });  
        
        $('#li_pacote'+id_pacote).addClass('selected');
      
        $('#resposta_ajax').html('<img src="images/loading.gif" class="centralize" />');
        $.ajax({        
          type: "POST",
          url: "busca_pacote.php",
          data: {
            acao : 'busca_pacote',
            id_pacote : id_pacote
          },
    
          success: function (retorno) {        
            if (retorno != 0) {
              $('#resposta_ajax').html(retorno);
            }
          }
        });    
      });
    The PHP then retrieves the information from JS causing the result to the HTML site.
    3rd. Data recovery by PHP

    After the result of PHP, HTML is placed in a DIV
    Code:
    <div id="resposta_ajax" class="site">
    for the result, since the correct structure of HTML.
    4th. Result of PHP in HTML format.
    Code:
    <div class="tituloPacote" style="width: 936px;">
    <div class="border_left"></div>
    <div class="border_right"></div>
    <img class="fLeft" style="margin-left: 3px" src="http://www.vendasclaro.com.br/images/icn_tv.png">
    <span class="text_titulo fLeft" style="margin-left: 14px;">Família</span>
    <a href="http://www.vendasclaro.com.br/assinar/claro-tv-familia.html">
    <img class="btn_assine_aqui fRight" title="Assine Aqui" alt="Assine Aqui" src="http://www.vendasclaro.com.br/images/btn_assine_aqui.png">
    </a>
    </div>
    <div class="descricaoPacote" style="width: 920px;">
    <div id="categoria1" class="canais_categoria">
    <div class="tipoCategoria tv fLeft">
    <strong>Filmes e Séries</strong>
    </div>
    <ul class="listagemCanais fLeft">
    <li class="fLeft" style="margin-left: 0px">
    <img id="icn_canal_1" width="65" height="40" title="AXN" alt="AXN" src="http://www.vendasclaro.com.br/uploads/canais/canal_85.jpg">
    <div id="informacoes_canal_1" class="balao1" style="display: none;">
    <div class="box_balao1">
    <div class="balao_top1"></div>
    <div class="balao_bottom1"></div>
    <h4>Canal 85 - AXN</h4>
    <p>Altas emoções atravéz de uma programação diversificada: grandes filmes e reality shows e séries consagradas como Lost, CSI, Criminal Minds e Law&Order.</p>
    </div>
    </div>
    </li>
    ...
    So I am not developing knowing PHP, to receive data and structure a return JS in HTML format. Receive the data, I believe that is the same as if it was receiving data from a simple form. But in return generate HTML're catching me.

    Someone manages to come help me?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,500
    Rep Power
    594
    Unfortunately your English is a bit difficult to understand and the non-English variables obscure what you are trying to do (not really your fault but this is primarily an English forum). In any case I see no PHP code which makes it even more difficult to help you.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    14
    Rep Power
    0
    Really none of the code is in PHP. What I want is just the PHP code is missing to make the call that put the codes.

    Log vendasclaro.com.br/pacotes.html That's what I do.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    14
    Rep Power
    0
    Clicking plans, channels are updated on the same page. I can not do this using HTML + CSS + JS + PHP.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,500
    Rep Power
    594
    This is a PHP help forum. You are expected to do the work and we help you over the humps and suggest better techniques. If you want someone to write the code for you, you need to repost what you want in the hire a programmer forum.

    Comments on this post

    • Jacques1 agrees
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    14
    Rep Power
    0
    thx

IMN logo majestic logo threadwatch logo seochat tools logo