Welcome Guest, Not a member yet? Register   Sign In
Problem with javascript ???
#1

[eluser]Coyoterj[/eluser]
Hi friends ! (sorry, my english is poor)

I have used the CI in my sites without problem.
At last, the following occurs:
By loading the url, the site loses the layout and menu do not work properly.
The menu uses some hacks in javascript
If I get the same page without the CI, it carries normal.

I use:
CI 161
Rewrite

Controller:
Code:
function index() {

    $this->data['divTopo'] = '';
    $this->data['divMiolo'] = $this->load->view('vi_home', '', true);
    $this->data['divLMenu'] = '';
    $this->data['divFooter'] = '';
        $this->load->view( 'vi_container', $this->data );
}

vi_container.php
Code:
<body class="twoColFixLtHdr">

<div id="container">
  <div id="header">
   <div id="link_home"><a href="#">home</a></div>

            <div id="busca">
                &lt;!-- código busca --&gt;
            &lt;!--/busca--&gt;</div>

            <div id="menusup">
                <ul>
                    <li></li>
                    &lt;!-- (...) --&gt;                    
                  </ul>
            </div>
  &lt;!-- end #header --&gt;</div>

    <div id="sidebar1">

    <img src="&lt;?php echo base_url(); ?&gt;images/menu/topo.jpg" />
    <ul id="MenuBar1" class="MenuBarVertical">

      <li><a href="#" class="MenuBarItemSubmenu">Opcao 1</a>
          <ul>
            <li>Opcao 1.1</li>
              <li>Opcao 1.2</li>
           </ul>
      </li>
      
      <li><a href="#" class="MenuBarItemSubmenu">Opcao 2</a>
          <ul>
            <li>opcao 2.1</li>
              <li>opcao 2.2</a></li>
        </ul>
      </li>
    </ul>
    <img src="images/menu/bottom.jpg" />

    <div id="logos">
        <img src="&lt;?php echo base_url(); ?&gt;img1" />
        <img src="&lt;?php echo base_url(); ?&gt;img2" />
        &lt;!-- (...) --&gt;
    <h3>&nbsp;</h3>
      &lt;!-- end #sidebar1 --&gt;</div>

  <div id="mainContent">

    &lt;?php echo $divMiolo; ?&gt;

  &lt;!-- end #mainContent --&gt;</div>

  &lt;!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --&gt;<br class="clearfloat" />
  <div id="footer">
    <ul>
        <li><a href="#">home</a></li>
        <li>|</li>
        <li><a href="#">quem somos</a></li>
        <li>|</li>
        <li><a href="#">fale conosco</a></li>
    </ul>
  &lt;!-- end #footer --&gt;</div>
&lt;!-- end #container --&gt;</div>


&lt;!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"&lt;?php echo base_url(); ?&gt;SpryAssets/SpryMenuBarRightHover.gif"});
//--&gt;



&lt;!--
var MenuBar2 = new Spry.Widget.MenuBar0("MenuBar2", {imgRight:"&lt;?php echo base_url(); ?&gt;SpryAssets/SpryMenuBarRightHover.gif"});
//--&gt;



&lt;!--
var MenuBar3 = new Spry.Widget.MenuBar1("MenuBar3", {imgRight:"&lt;?php echo base_url(); ?&gt;SpryAssets/SpryMenuBarRightHover.gif"});
//--&gt;



&lt;/body&gt;
&lt;/html&gt;

Thanks and best regards !
#2

[eluser]Coyoterj[/eluser]
Hi !

I put the css within the html and error persists when using the CI.

I noticed links, htaccess and disable $ config [ 'permitted_uri_chars'] without success.

Anyone could help me?

Best regards !
#3

[eluser]Noah David[/eluser]
Oh, so you're trying to load two views on top of each other? Try using includes instead for the footer.
#4

[eluser]Nick Husher[/eluser]
Are you sure the necessary resources are being loaded? Try using firebug in firefox to make sure that your image URLs are pointing to the right place. After that, validate through W3C.
#5

[eluser]Coyoterj[/eluser]
[quote author="EA Noah" date="1204594894"]Oh, so you're trying to load two views on top of each other? Try using includes instead for the footer.[/quote]

Hi Noah!

In this case I don't use multiple views to facilitate the debug. Look:

Code:
function index() {
    $this->data['divTopo'] = '';
    $this->data['divMiolo'] = ''; // $this->load->view('vi_home', '', true);
    $this->data['divLMenu'] = '';
    $this->data['divFooter'] = '';
        $this->load->view( 'vi_container', $this->data );

In the vi_container, i put the "pure" html code, css and js links, but not resolve. Sad

Thanks and lucky for us!
#6

[eluser]Coyoterj[/eluser]
[quote author="Nick Husher" date="1204595361"]Are you sure the necessary resources are being loaded? Try using firebug in firefox to make sure that your image URLs are pointing to the right place. After that, validate through W3C.[/quote]

Hi Nick Husher !

Thank's! I love you ! :cheese:

Because your question, I did a further analysis and found that some gif images had been changed to png, by "the layout's man"... >Sad

Thanks, thanks, thanks.

I am very grateful to you.

Lucky for us




Theme © iAndrew 2016 - Forum software by © MyBB