Click here to Skip to main content
15,880,392 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,

I need your suggestions. I am working on cmsms using smarty.

<div class="links">
                <a href="#" class="active" id="lnk-page-2"  >Syllabus</a>
                <a href="#" id="lnk-page-4">Requirements</a>
                <a href="#"  id="lnk-page-1">Dates</a>
                <a href="#" id="lnk-page-3">Register</a>
</div>


i have four tab's on single page and i need a separate URL links for each tabs. class="active" will be use to activate the current tab.

I need your suggestion/help to get separate URL for each tab.
Any kind of link, suggestion and specially expert advice would be highly appreciated.


Thanks,
Balkrishna Raut
Posted

Hi Balakrishna

You can use iframe to load the another page with in the page

Happy Coding... :)
Seshu
 
Share this answer
 
Comments
Arunprasath Natarajan 25-May-12 6:54am    
He have mentioned that without reloading the page, but in iframe the page will be get posted.
Prasad_Kulkarni 25-May-12 6:55am    
Not relevant answer Seshu OP wants to change change url, how does an iFrame works to change URL??
Arunprasath Natarajan 25-May-12 7:01am    
Using iframe we can create a web page structure like tabs or menu to the end user. I guess, so he might have suggested that.
meBalkrishna 25-May-12 7:42am    
HI Seshu

i dont want to call another page..within page i need to create different URL. Each tab will give me a different URL. Tab is nothing but a content block within a page not a separate page.

thanks for your suggestion i need more from your side.
Thanks all...

Happy Coding..:)
Balkrishna
Dear Balkrishna,

Check this link, there is Demo plus Source, Guess it would help you.

http://tutorialzine.com/2010/01/sweet-tabs-jquery-ajax-css/[^]

Regards,
AP
 
Share this answer
 
Thanks for your suggestions... Issue is resolved.

XML
<div class="links">
               <a href="#syllabus" class="active custom-tabs syllabus" id="lnk-page-2">Syllabus</a>
               <a href="#requirement"  class="custom-tabs requirement" id="lnk-page-4">Requirements</a>
               <a href="#dates"  class="custom-tabs dates" id="lnk-page-1">Dates</a>
               <a href="#register" class="custom-tabs register" id="lnk-page-3">Register</a>
           </div>



I have single page with i am redirecting it with different URL's
Please follow the function...

C#
$(document).ready(function(){

setInterval(function() {
var lnk = window.location.href;
lnk1 = lnk.substr(lnk.indexOf("#")+1);
$(".custom-tabs").removeClass('active');
$("."+lnk1).addClass("active");
var id=jQuery(".active").attr("id");
var arr=id.split("-");
jQuery(".content").hide();
jQuery(".content:first").show();
jQuery("#"+arr[1]+"-"+arr[2]).show();
  }, 30);

jQuery(".hideDiv").css('display','none');
var listname  = $("#aweber_name").html();
if(listname == "") {
    $(".notify_link").remove();
}
$(".notify_link[rel]").overlay({top:"55%", onBeforeLoad: function(){$("#step1").show();$("#step2").hide();}});
$("#button_form").click(function(){
    /*Important to hide the thanks div*/
    var email_notify  = $("#email_form").val();
    listname = jQuery.trim(listname);
    if(email_notify == "") {
        $(".email_error").show();
    } else {
        $(".email_error").hide();
        $(".ajax_loader").show();

        jQuery.ajax({url: "/js/add_lead.php?email="+email_notify+"&listname="+listname,
            cache: false,
            success: function(html){
                $(".ajax_loader").hide(); //hiding the loader image
                $("#step1").hide();
                $("#step2").show();
            }
        });
    }
});
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900