Results 1 to 1 of 1

Thread: Get content/page load after link click

  1. #1
    Join Date
    Jul 2014
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Get content/page load after link click

    Hello. I am looking to be able to click a link and have a content loading after the click, it does not have to be necessarily another page, truth is it would do best if the opened content can be a php code.

    For now i have this example but it does not work. I have no javascript errors on console, and therefore i think it is because of the library, i've used "jquery-1.11.1.min.js", "jquery-2.1.1.min.js" and/or "jquery-latest.js" hosted on my website but it does not work. ¿Which library do i have to use?

    Code:
    <script type="text/javascript" src="jquery.min.js"></script>
    <script type="text/javascript">
    function doSomething() {
        $.get("somepage.php");
        return false;
    }
    </script>
    
    <a href="#" onclick="doSomething();">Click Me!</a>
    I think this code should pass the requested php id that is declared after it to the page that is "getting". (Example: getting for a movie post its respective trailer)
    ¿How can it be done? ¿Any alternative?

    EDIT: I was thinking of something like "if HREF name is '1' > do 'this'" and so on...
    Last edited by Rodrigo8; 12-18-2014 at 05:48 AM.

Similar Threads

  1. StickyBar contents showing on load of page and not on click
    By rawkr in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 10-18-2012, 07:00 AM
  2. Interstitial Content Box (v1.1) on click instead of onl page load?
    By cozzy1984 in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 10-15-2009, 07:24 PM
  3. click on image on page load
    By lord22 in forum JavaScript
    Replies: 11
    Last Post: 08-03-2008, 09:05 PM
  4. Replies: 0
    Last Post: 06-29-2008, 04:33 AM
  5. Auto click link on page load
    By cameling in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 03-20-2007, 06:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •