1

http://pytools.webfactional.com/capstoneTemp/

so I've implemented jquery datatables here on this example using a php serverside processing file which is pulling the data from mysql. probably not really relevant at all but i thought id share that info. the problem i'm having is as follows:

the Sign-in button used to work. now it just reloads the same index page. when I manually type in the address that it shows when I hover over the link,

http://pytools.webfactional.com/capstoneTemp/signIn.html

this page loads. but when i click it just reloads the index.html page and appends a "?" to the URL. I played with the javascript at the bottom of the body which is as follows:

<script src="js/jquery-1.11.0.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-switch.js"></script>
  <script src="js/DataTables.js"></script>
  <script src="js/jquery.dataTables.js"></script>
<script>
    $( document ).ready(function() {
        $('#login').submit(function(){
        console.log($(this));
            return false;
        });
        $('#prettyTable').dataTable({
            "aLengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]],
            "iDisplayLength" : 10,
            "bProcessing": true,
            "bServerSide": true,
            "sAjaxSource": "listOwners2.php"
        });


    });
</script>

whats really bothering me is I've used datatables before in another assignment, and didn't have any issues like this, as demonstrated here

http://collegedata.pytools.webfactional.com/question9

in this page the navigation links still work.

HOW CAN I GET TO THE SIGN-IN PAGE FOR MY PHP app??

3
  • 1
    are you sure its datatables thats breaking the nav links? ---- I'm using datatables and theres no issues with links for me. Commented Mar 30, 2014 at 4:38
  • You are importing DataTables twice. <script src="js/DataTables.js"></script> <script src="js/jquery.dataTables.js"></script> Commented Mar 30, 2014 at 6:39
  • Delete the first one, it's causing errors. Commented Mar 30, 2014 at 6:47

1 Answer 1

1

Actually the button should do nothing, as it's not linked to JavaScript event. Change it too:

<a class="btn btn-primary" href="http://pytools.webfactional.com/capstoneTemp/signIn.html">Sign-In..</a>

Adding button styles to HTML anchors is valid in Bootstrap. It will give you the same layout.

Or wrap the HTML anchor with the button not the opposite, but the first approach is more valid!

Sign up to request clarification or add additional context in comments.

1 Comment

@Kinghenry14 You are welcome..if it worked for you kindly mark it as the right answer.. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.