redirect and ajax request |
[eluser]amipaxs[/eluser]
Hello, I have the following scenario, I am implementing a search box in the header, i use ajax to load results from db on the middle colum div="middle-column" , it works perfect! (Image 1) the Publish section of the site doesn't contain neither sidebar menu nor middle-colum, it only contains a wide div (image 2) in contrast to the other pages which contains side-bar menu, middle-column,etc. any suggestions, should i redirect to index so i'll have sidemenu and middle column available or should i load all the divs present in Index again in the publish section through ajax.? Thanxs in advance
[eluser]toopay[/eluser]
What template library you are using? I think this is a "design" stuff, not ajax problems.
[eluser]amipaxs[/eluser]
hi, I don't use a template library , I use my own template view Code: <div id="header">
[eluser]amipaxs[/eluser]
controller: Code: function search_ajax(){ Jquery : Code: /*************** Search box *****************/
[eluser]Abdul Malik Ikhsan[/eluser]
i think, by jQuery, you can easyly remove div or append if needed
[eluser]toopay[/eluser]
If i'm not wrong, this is what you want to do Code: <div id="header">
[eluser]amipaxs[/eluser]
toopay, thanxs for your help, but it wasn't exactly what i wanted, you can browse a working sample now http://www.phpchile.net/demo/portal/ then click on "Publicacion" , I did create a search_template , VIEW: Code: <div id="side-menu"> I get the search term through ajax and pass it to the controller, controller returns retrieved records, i load new search template in ajax and create neccesary divs , then load data on (#content-middle).load(html) CONTROLLER: Code: function buscar_ajax(){ Weirdly it seldom displays the searched data, for example "palace", also would like to receive some feedback about performance and loading time, Thanks in advance Rodrigo |
Welcome Guest, Not a member yet? Register Sign In |