Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6371961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:09:54+00:00 2026-05-25T01:09:54+00:00

Hi i am using the slider code mentioned in the link workshop.rs/projects/coin-slider..Well it work

  • 0

Hi i am using the slider code mentioned in the link workshop.rs/projects/coin-slider..Well it work fine independently but when i use an onclick event which calls this page through AJAX and then shows the contents into a div , this is not working . Only images are showing without any effect .. please suggest!!!!!!

html file:

<div id="nav">
        <ul>

          <li><a href="dbuelem.html">DBU Elimination</a></li>
          <li><a href="contact.html">Contact us</a></li>
        </ul>

      </div>
<div id ="welcome">
</div>

JS code:

window.onload = initAll;

function initAll() {
    allLinks[i].onclick = mainProcess;
}

function mainProcess(evt){

    if ((this.innerHTML)=='Contact us'){
        document.getElementById("right1").innerHTML = "Contacts";
        Contacts();
        return false;   
    }
}

function Contacts(){

    if (window.XMLHttpRequest) {
        xhr = new XMLHttpRequest();
    }
    else {
        if (window.ActiveXObject) {
            try {
                xhr = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e) { }
        }
    }

    if (xhr) {
        url = 'contactslide.html';
        xhr.onreadystatechange = showContacts;
        xhr.open("GET", url, true);
        xhr.send(null);
    }
    else {
        alert("Sorry, but I couldn't create an XMLHttpRequest");
    }
    return false;
}

function showContacts() {

    if (xhr.readyState == 4) {
        if (xhr.status == 200) {
            var outMsg = xhr.responseText;
        }
        else {
            var outMsg = "There was a problem with the request " + xhr.status;
        }
        document.getElementById("welcome").innerHTML=outMsg;
    }
}

contactslide.html

<script type="text/javascript" src="jquery-1.6.2.js"></script>
<script type="text/javascript" src="coin-slider.min.js"></script>
<link rel="stylesheet" href="coin-slider-styles.css" type="text/css" />

</head>
<body>
<div id='coin-slider'>
<img src="images/1.jpg"/>
<span>Abhinav Singh</span>
<img src="images/2.jpg" />
<span>Pradeep sethi</span>
<img src="images/3.jpg" />
<span>Tracey Hare</span>
<img src="images/4.jpg" />
<span>Amarish Patel</span>
<img src="images/5.jpg" />
<span>Richa Misra</span>
<img src="images/6.jpg" />
<span>Vishal Anand</span>
</div>
<script type="text/javascript">

    $(document).ready(function() {
        $('#coin-slider').coinslider();
    });
</script>

</body>
</html>

Where contactslide.html is the file that is mentioned in the link … this file independently is working fine where as when i call this with AJAX its not showing any effects..please suggest!!!!!!!!!!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:09:55+00:00Added an answer on May 25, 2026 at 1:09 am

    You need to initialize the slider plugin again on the element after you make a ajax call and set the innerHTML.

    Assuming you are using jQuery we can modify Contacts and showContacts method as below

    function Contacts(){
        $.ajax({
          url: 'contactslide.html',
          success: showContacts,
          error: function(xhr, errorStatus){
             $("#welcome").html("There was a problem with the request. " + errorStatus);
          }
        });
    
        return false;
    }
    
    function showContacts(response) {
        var html = $(response);
        $("#welcome").html(html.find('body').html());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am trying to create slider movement graphics. The code explain better this. using
I have a Coda slider on one webpage (hand-crafted, not using the plugin, but
I'm trying to put together a horizontal content slider using JQueryMobile. The following code
I am working at a site http://thesunkissedgirls.com.au/ and using Easy Slider 1.7, but i
I want to achieve above type of UI using slider... But Slider should stop
I am using the jQuery UI range slider demo code ( http://jqueryui.com/demos/slider/#range ) to
I'm using someone elses code for my slider. His code looks like this UISlider
I'm using Easy Slider : http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider Integrated it well on my open cart 1.5.1
I am trying to automate a Jquery UI slider using watir-webdriver and ruby but
I using coda slider in my page. View it here: http://www.ndoherty.com/demos/coda-slider/1.1.1/ Each tab causes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.