Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Using a HTML5, CSS3 and jQuery website template, can't get the Java pop-ups to work..

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Using a HTML5, CSS3 and jQuery website template, can't get the Java pop-ups to work..

    This is a free template I am trying to adapt for a personal portfolio:
    http://www.priteshgupta.com/templates/vivid-photo

    I have edited the original template and uploaded it HERE
    This is the style.css:
    http://home.stoynev.net/test/css/style.css

    On the menu on the right, the template originally comes with three links - ME, MY WORK and CONTACT; when clicked, a Java pop-up shows the content of the links.

    However I need two more links - RESUME and REFERENCES.

    The pop-ups are defined in a separate file called pop-ups.js:
    http://home.stoynev.net/test/js/pop-ups.js

    I have added the respective code in pop-ups.js for the two additional menu entries that I need, and also in index.html so they show on the webpage,
    in style.css along with the code for the three pop-ups that work "out of the box".


    The problem is that after all done, when I click on ANY of the two new entries I added (be it References or Resume) - no pop-up shows...


    The two articles - References and Resume - are defined in index.html as such:
        <article id="popupResume" class="popupResume">
            <a id="popupResumeClose">
        </article>
     
        <article id="popupReferences" class="popupReferences">
            <a id="popupReferencesClose">
        </article>

    Here is the modified section from style.css - I added just two entries in each line (popupResume and popupReferences, etc):
        #popupAbout,#popupProjects,#popupResume,#popupReferences,#popupContact{height:600px;width:900px;overflow:auto;background-color:rgba(0, 0, 0, 0.75);border:2px solid #cecece;z-index:15;padding:20px;color:#FFF;-webkit-box-shadow:0px 0px 4px #000 inset;-moz-box-shadow:0px 0px 4px #000 inset;box-shadow:0px 0px 4px #000 inset;-webkit-border-radius:10px;-moz-border-radius:10px;-o-border-radius:10px;-ms-border-radius:10px;-khtml-border-radius:10px;border-radius:10px;margin-top:-50px;visibility:hidden}
        #popupAbout p,#popupProjects p,#popupResume p,#popupReferences p,#popupContact p{padding-left:10px;font-size:18px;line-height:20px}
        #popupAbout h1,#popupProjects h1,#popupResume h1,#popupReferences h1,#popupContact h1{text-align:left;font-size:30px;letter-spacing:1px;border-bottom:1px dotted #D3D3D3;padding-bottom:2px;margin-bottom:20px}
        #popupAboutClose,#popupProjectsClose,#popupResumeClose,#popupReferencesClose,#popupContactClose{right:6px;top:6px;position:absolute;display:block}
        *:focus{outline:none}

    And these are the two paragraphs I added to pop-outs.js:
      var popupResumeStatus=0;
        function loadPopupResume(){if(popupResumeStatus==0){$("#popupResume").fadeIn("slow");
        popupResumeStatus=1}}function disablePopupResume(){if(popupResumeStatus==1){$("#popupResume").fadeOut("slow");
        popupResumeStatus=0}}function centerPopupResume(){var b=document.documentElement.clientWidth;
        var d=document.documentElement.clientHeight;
        var c=$("#popupResume").height();
        var a=$("#popupResume").width();
        $("#popupResume").css({position:"absolute",top:d/2-c/2,left:b/2-a/2})}$(document).ready(function(){$("#popupResume").fadeOut();
        popupResumeStatus=0;
        $("#Resume").click(function(){$("#popupResume").css({visibility:"visible"});
        disablePopupAbout();
        disablePopupContact();
        disablePopupProjects();
        disablePopupReferences();
        centerPopupResume();
        loadPopupResume()});
        $("#popupResumeClose").click(function(){disablePopupResume()})});
        $(function(){$("#popupResume").jScrollPane();
        $(".popupResume").jScrollPane({showArrows:true,horizontalGutter:10})});
     
     
        var popupReferencesStatus=0;
        function loadPopupReferences(){if(popupReferencesStatus==0){$("#popupReferences").fadeIn("slow");
        popupReferencesStatus=1}}function disablePopupReferences(){if(popupReferencesStatus==1){$("#popupReferences").fadeOut("slow");
        popupReferencesStatus=0}}function centerPopupReferences(){var b=document.documentElement.clientWidth;
        var d=document.documentElement.clientHeight;
        var c=$("#popupReferences").height();
        var a=$("#popupReferences").width();
        $("#popupReferences").css({position:"absolute",top:d/2-c/2,left:b/2-a/2})}$(document).ready(function(){$("#popupReferences").fadeOut();
        popupReferencesStatus=0;$("#References").click(function(){$("#popupReferences").css({visibility:"visible"});
        disablePopupAbout();
        disablePopupContact();
        disablePopupResume();
        disablePopupProjects();
        centerPopupReferences();
        loadPopupReferences()});
        $("#popupReferencesClose").click(function(){disablePopupReferences()})});
        $(function(){$("#popupReferences").jScrollPane();
        $(".popupReferences").jScrollPane({showArrows:true,horizontalGutter:10})});


    I am not that good w/ Java so any help will be greatly appreciated, TIA!


  2. #2
    Forum VIP
    Join Date
    Oct 2010
    Posts
    275
    My Mood
    Cool
    Thanks
    32
    Thanked 54 Times in 47 Posts
    Blog Entries
    2

    Default Re: Using a HTML5, CSS3 and jQuery website template, can't get the Java pop-ups to wo

    I don't see any Java?

    JavaScript is Not Java

    Edit: That link is a bit outdated, SO has it under control:

    http://stackoverflow.com/questions/2...cript-and-java

    "Java and Javascript are similar like Car and Carpet are similar."
    Last edited by Tjstretch; April 6th, 2012 at 12:40 PM.

Similar Threads

  1. java script/PHP/Jquery Help
    By lovelyxalice in forum Other Programming Languages
    Replies: 4
    Last Post: March 25th, 2012, 10:59 AM
  2. need help with java API download from a website
    By alpha.rome in forum Java Theory & Questions
    Replies: 4
    Last Post: September 2nd, 2011, 04:11 AM
  3. Login website using Java
    By cgeier in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 22nd, 2011, 11:41 AM
  4. How to use VelocityContext to take values from template?
    By noFear in forum Java Theory & Questions
    Replies: 1
    Last Post: October 14th, 2010, 01:45 AM
  5. Help writing a Template Class
    By mamipapi in forum Object Oriented Programming
    Replies: 2
    Last Post: October 5th, 2010, 09:34 PM