Imported code not working in DW

I inherited a website that was coded in notepad++.  I've imported all the files into DW but the pages don't display.  I also get an syntax error, don't know where to begin looking.   I've tried to play around with the code and can get some things to display.  If you want to look at the coding the website is www.nusteel.ca. Any help would be appreciated!

it's still blank
here's another page
<?
$main_content .= '
          <script>
                    $(document).ready(function() {
                              $(".ui-widget-overlay").live("click", function() {
                                        $dialog.dialog("close");
                    $(".popUpImg").live("click", function() {
                              openImg($(this));
                    function changeProduct(menu, obj){
                              $(".productMenu").css({"color":"#000000"})
                              $(".prodContent").hide();
                              $(menu).css({"color":"#a50000"})
                              $(obj).fadeIn();
                    function openImg(obj){
                              $dialog = $("<div></div>")
                                        .html("<img src=\'"+$(obj).attr("src")+"\'>")
                                        .dialog({
                                                  modal: true,
                                                  show: {effect: "fade", duration: 500},
                                                  hide: {effect: "fade" , duration: 500},
                                                  draggable: false,
                                                  width: 600,
                                                  resizable: false,
                                                  open: function(event, ui) {
                                                            $(".ui-dialog").css({"padding":"0px","margin":"0px"});
                                                            $(".ui-dialog-content").css({"padding":"0px","margin":"0px" });
                                                            $(".ui-dialog-titlebar").hide();
                                                  close: function(event, ui) {
                                                                      $dialog.html("");
                                                                      $dialog.dialog("destroy");
                              $dialog.dialog("open");
                    index1 = 0
                    imgArray1=new Array("images/trim/26-BF8-12 - Base Flashing.JPG","images/trim/26-DC-100 - Door + Window Drip Cap.JPG","images/trim/26DC-100 Door Window Drip Cap.JPG","images/trim/26DS-100.JPG","images/trim/26DSC-100 - Downspout Cap.JPG","images/trim/26-EF-NG - Eave Fascia No Gutters.JPG");
                    function nextPic(){
                              if(index1 + 1 < $(imgArray1).length){
                                        index1 = index1 + 1
                              }else{
                                        index1 = 0
                              $(\'#imagegroup1\').attr("src", "images/trim/"+imgArray1[index1]);
                    function prevPic(obj){
                              if(index1 == 0){
                                        index1 = $(imgArray1).length -1;
                              }else{
                                        index1 = index1 - 1
                              $(\'#imagegroup1\').attr("src", "images/trim/"+imgArray1[index1]);
          </script>
          <style>
                    .popUpImg{
                              cursor:pointer;
                    .header2{
                              font-size:22px;
                              margin-top:40px;
                    .sub-header2{
                              font-size:14px;
                              margin-top:10px;
                              margin-bottom:10px;
                    .mainLeft{
                              width:30%;
                    .content2{
                              width:70%;
          </style>
          <div style="padding-top:0px; padding-bottom:50px;">
                    <div class="pageHeader">
                              PRODUCT
                    </div>
                    <div style="padding:20px 0px 20px 0px;">
                              <span onclick="changeProduct($(this),$(\'#buildingType\'))" class="productMenu" style="cursor:pointer; padding-right:20px; color:#a50000">BUILDING TYPE</span>
<!--
                              <span onclick="changeProduct($(this),$(\'#construction\'))" class="productMenu" style="cursor:pointer; padding-right:20px;">CONSTRUCTION</span>
-->
                              <span onclick="changeProduct($(this),$(\'#accessories\'))" class="productMenu" style="cursor:pointer; padding-right:20px;">ACCESSORIES</span>
                              <span onclick="changeProduct($(this),$(\'#standardTrim\'))" class="productMenu" style="cursor:pointer; padding-right:20px;">STANDARD TRIM</span>
                              <span onclick="changeProduct($(this),$(\'#standardColorChart\'))" class="productMenu" style="cursor:pointer; padding-right:20px;">STANDARD COLOR CHART</span>
                    </div>
                    <div class="prodContent" id="standardColorChart"  style="display:none">
                              <img src="images/Nusteel-TrimColors.jpg" style="width:900px;">
                              <hr>
                              <div style=" float:right; width:650px">
                                        <div style="padding:40px;">
                                                  Click to download the above image.
                                        </div>
                                        <hr style="">
                              </div>
                              <div style="text-align:center; float:left; width:150px; padding:40px">
                                        <a href="pdf/Nusteel-TrimColors.pdf" style="color:#a50000;  text-decoration: none;">
                                        Standard Color Chart<br><br>
                                        <img border=0 style="width:150px;" src="images/DownloadBtn.jpg"></a>
                              </div>
                              <div style="clear:both"></div>
                    </div>
                    <div class="prodContent" id="standardTrim"  style="display:none">
                              <img src="images/SteelBuildingTrimDiagram.jpg" style="width:900px;">
                              <hr>
                              <div style=" float:center; width:900px">
                                        <div style="padding:40px;">
                                                  Any of the below profiles or measurements can be customized to fit the project requirments and are available in a variety of colors.
                                        </div>
                                        <hr style="">
                              </div>
                              <div style="clear:both"></div>
                              <img class="popUpImg" src="images/trim/26-BF8-12 - Base Flashing.jpg" style="float:left; width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/26-DC-100 - Door + Window Drip Cap.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/26DC-100 Door Window Drip Cap.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/26DS-100.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/26DSC-100 - Downspout Cap.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/26-EF-NG - Eave Fascia No Gutters.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/26-EF-WG - Eave Fascia with Gutters.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/26EG-200 - Gutter.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/26RC-100 - Ridge Cap Fascia.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/26REC-S - NG Seam Rdige End Cap.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/26-USS Snow Stop.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/29GC-100 - Liner Gable Cover.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/29GC-200 - Liner Gable Cover Alternate.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/29JM - T2 J-Mold.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/29OC832-300 - Outside Corner.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/Base Framing.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/Gable Trim for NS 1236 Roof 26GT1236.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/GDC-100 - Garage Door Cap.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/J-Mold for NS 800.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/Liner Door Window and Jamb Fascia 29-JM-832.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/Liner Gable + Eave Fascia 29-LJM-832.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/Liner Inside Corner Fascia 29-IC-832.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/MRFC - 200 - Metal Roof Fascia Cap.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/MRFC-100- Metal Roof Fascia Cap.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/NS 1236 JM 1236 - J-Mold.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/OHC - 200 - Over Head Door Cap.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/OHC-300 - Overhead Door Cap.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/Outside Corner Fascia - 26OC-300.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/Outside Corner Fascia NS 800 26OC-100.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/Outside Corner for 1236 29OC-200.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/Overhead Door Post + header Cover 26-ODC.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/REF-100 - Reinforced Fascia.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/SSR 26GT-SSR324 - Gable Trim for Standing Seam Roof.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/Standing Seam Ridge Block.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/Standing Seam Snow Stop Base.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/TBDB 28 - Door Backing.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/TBDRR - Deluxe Roof Ridge Cap.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/TBGT - Gable Trim.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/TBIC - Inside Corner.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/TBOCP - Outside Corner Post.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/TBRE34 - Roof Edge.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/TBREF - Eave Flashing.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                              <img class="popUpImg" src="images/trim/TBWTR - Wall to Roof Flashing.jpg" style="float:left;width:170px; margin-right:10px;margin-bottom:10px;">
                    </div>
                    <div class="prodContent" id="buildingType">
                              <div>
                                        <div style="width:50%;float:left;">
                                                  <img src="images/Pre-EngSteelBuilding.jpg">
                                        </div>
                                        <div style="width:50%;float:left;">
                                                  <div class="header" style="text-align:left; padding:0px;">PRE-ENGINEERED BUILDING</div>
                                                  <p>
                                                            A Pre-Engineered building is a structure that consists of pre-engineered, pre-fabricated factory components
                                                            that are combined together and engineered structurally so that each component works together.  Our
                                                            pre-engineered buildings have a clear span up to 120\' wide.
                                                  </p>
                                                  <p>
                                                            Nu-Steel Pre-Engineered buildings help you in erecting your structures easily and conveniently. 
                                                            The structures are strong, easy to build and are also economically priced.  Many of our customers choose
                                                            to erect their buildings themselves.  All structural pieces come pre-drilled and pre-cut ready for
                                                            assembly - no welding required.  Nu-Steel buildings are shipped with user friendly manuals while the
                                                            knowledgeable staff can answer any questions you may have during assembly.  Pre-Engineered builings,
                                                            depending on complexity, are usually shipped within 4 - 6 weeks from the time the drafts are approved.
                                                  </p>
                                        </div>
                                        <div style="clear:both"></div>
                              </div>
                              <div style="margin-top:20px;">
                                        <div style="width:50%;float:left;">
                                                  <img src="images/conventionalsteelbuilding.jpg">
                                        </div>
                                        <div style="width:50%;float:left;">
                                                  <div class="header" style="text-align:left; padding:0px;">CONVENTIONAL STEEL BUILDING</div>
                                                            When choosing to construct a large steel structure, Conventional Steel buildings offer the
                                                            convenience of building as wide as you would like with columns or posts in place to maintain
                                                            the structural integrity of the building.  Box stores, malls, hospitals and office buildings
                                                            usually use this type of structure.
                                                  </div>
                                        <div style="clear:both"></div>
                              </div>
                    </div>
<!--
                    <div class="prodContent" id="construction" style="display:none">
                              <div>
                                        <div style="width:50%;float:left;">
                                                  <img src="images/bottomMenuLogo.png">
                                        </div>
                                        <div style="width:50%;float:left;">
                                                  <div class="header" style="text-align:left; padding:0px;">CONSTRUCTION</div>
                                                  Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim
                                        </div>
                                        <div style="clear:both"></div>
                              </div>
                              <div style="margin-top:20px;">
                                        <div style="width:50%;float:left;">
                                                  <img src="images/bottomMenuLogo.png">
                                        </div>
                                        <div style="width:50%;float:left;">
                                                  <div class="header" style="text-align:left; padding:0px;">CONSTRUCTION</div>
                                                  Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim
                                                  ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit
                                        </div>
                                        <div style="clear:both"></div>
                              </div>
                    </div>
-->
                    <div class="prodContent" id="accessories" style="display:none">
                              <div class="header2">NS 1236 ROLL FORMED SHEETING</div>
                              <div class="sub-header2">24 Gauge & 26 Gauge</div>
                              <div class="mainLeft" style="float:left;">
                                        <img src="images/accessories/NS 1236 (2)-2.jpg" style="width:200px;">
                              </div>
                              <div class="content2" style="float:left;">
                                        This versatile panel can be used for many applications:  it is a roof panel that can also be used for exterior walls.  If a stronger liner is needed, this is the panel to use.  The stock colour is galvalume but it can be ordered in any standard colour.
                                        <div style="padding-top:20px;">
                                                  <a href="pdf/NS 1236 (2).pdf" target="_new">
                                                            <img border=0 src="images/DownloadBtn.jpg" style="width:150px;">
                                                  </a>
                                        </div>
                              </div>
                              <div style="clear:both"></div>
                              <div class="header2">SSR 324 ROLL FORMED ROOFING</div>
                              <div class="sub-header2">24 Gauge & 26 Gauge</div>
                              <div class="mainLeft" style="float:left;">
                                        <img src="images/accessories/SSR 324-2.jpg" style="width:200px;">
                              </div>
                              <div class="content2" style="float:left;">
                                        With a three inch high flute and the clip and seam system, the SSR roof system is the ideal choice for a low slope roof.  The clips are designed to move as the roof sheets expand and contract from the heat and cold.  These sheets come cut to length and the standard galvalume can be upgraded to any of our standard colours.
                                        <div style="padding-top:20px;">
                                                  <a href="pdf/SSR 324.pdf" target="_new">
                                                            <img border=0 src="images/DownloadBtn.jpg" style="width:150px;">
                                                  </a>
                                        </div>
                              </div>
                              <div style="clear:both"></div>
                              <div class="header2">Z – PURLINS</div>
                              <div class="sub-header2">12, 14, & 16 Gauge</div>
                              <div class="mainLeft" style="float:left;">
                                        <img src="images/accessories/Zee-2.jpg" style="width:200px;">
                              </div>
                              <div class="content2" style="float:left;">
                                        All the light gauge components come galvanized coated.
                                        <div style="padding-top:20px;">
                                                  <a href="pdf/Zee.pdf" target="_new">
                                                            <img border=0 src="images/DownloadBtn.jpg" style="width:150px;">
                                                  </a>
                                        </div>
                              </div>
                              <div style="clear:both"></div>
                              <div class="header2">C – CHANNEL</div>
                              <div class="sub-header2">12, 14, & 16 Gauge</div>
                              <div class="mainLeft" style="float:left;">
                                        <img src="images/accessories/Cee-2.jpg" style="width:200px;">
                              </div>
                              <div class="content2" style="float:left;">
                                        All the light gauge components come galvanized coated.
                                        <div style="padding-top:20px;">
                                                  <a href="pdf/Cee.pdf" target="_new">
                                                            <img border=0 src="images/DownloadBtn.jpg" style="width:150px;">
                                                  </a>
                                        </div>
                              </div>
                              <div style="clear:both"></div>
                              <div class="header2">NS 636 STEEL DECK</div>
                              <div class="sub-header2">20 Gauge & 22 Gauge</div>
                              <div class="mainLeft" style="float:left;">
                                        <img src="images/accessories/NS 636-1.jpg" style="width:200px;">
                              </div>
                              <div class="content2" style="float:left;">
                                        Heavy duty steel deck comes in a satin coat or galvanized finish.  It is used for built up roofs or mezzanine floors.  The galvanized option can be used for a tough liner panel.
                                        <div style="padding-top:20px;">
                                                  <a href="pdf/NS 636.pdf" target="_new">
                                                            <img border=0 src="images/DownloadBtn.jpg" style="width:150px;">
                                                  </a>
                                        </div>
                              </div>
                              <div style="clear:both"></div>
                              <div class="header2">NS 800mm METAL WALL CLADDING</div>
                              <div class="sub-header2">24 Gauge & 26 Gauge</div>
                              <div class="mainLeft" style="float:left;">
                                        <img src="images/accessories/NS 800-2.jpg" style="width:200px;">
                              </div>
                              <div class="content2" style="float:left;">
                                        Standard exterior wall cladding cut to length at the factory for ease of installation.  Comes in a variety of colours.
                                        <div style="padding-top:20px;">
                                                  <a href="pdf/NS 800.pdf" target="_new">
                                                            <img border=0 src="images/DownloadBtn.jpg" style="width:150px;">
                                                  </a>
                                        </div>
                              </div>
                              <div style="clear:both"></div>
                              <div class="header2">NS 832 LINER PANEL</div>
                              <div class="sub-header2">26 Gauge & 29 Gauge</div>
                              <div class="mainLeft" style="float:left;">
                                        <img src="images/accessories/NS 832-2.jpg" style="width:200px;">
                              </div>
                              <div class="content2" style="float:left;">
                                        This is a low rib panel that is used for lining the inside of steel buildings for a clean and maintenance free, easy to clean interior.  This panel, along with CNC bent custom trims, can also be used for covering walls and roofs of existing wood buildings to make it mainteance free.  This strong and attractive panel is suitable for agriculture, commercial, and industrial applications.  Also available in PVC for high humidity areas (profile may differ).
                                        <div style="padding-top:20px;">
                                                  <a href="pdf/NS 832.pdf" target="_new">
                                                            <img border=0 src="images/DownloadBtn.jpg" style="width:150px;">
                                                  </a>
                                        </div>
                              </div>
                              <div style="clear:both"></div>
                    </div>
                    <div style="clear:both; text-align:justify; text-align-last:justify;padding-top:50px;">
                              AGRICULTURAL | COMMERCIAL | RESIDENTIAL & GARAGES | GOVERNMENT | INDUSTRIAL | INSTITUTIONAL | RECREATIONAL
                    </div>
                    <div style="clear:both"></div>
          </div>';
?>

Similar Messages

  • Audio CD import is not working the cd is ejected before itunes can read it

    audio CD import is not working the cd is ejected before itunes can read it. Does anyone know how to fix this?
    Lainey

    Does this happen with all cd's or one in particular?
    Reset the SMC http://support.apple.com/kb/HT3964
    Reset the PRAM http://support.apple.com/kb/HT1379
    Try a cleaning disc. You can get them at places like Radio Shack.
    If nothing helps your optical drive has probably failed. You can replace it or purchase an inexpensive external drive. Don't buy the Apple SuperDrive as it won't work with macs that have a built in drive.

  • PS4 Game Voucher Code not working

    my PS4 Game Voucher Code not working and says: "The code you entered may not be correct or may no longer be valid" "Please check your entry (e-820000134)  

    Voucher codes are region-specific. For instance a US voucher won't work with a UK account. First thing to check is whether the voucher's region matches your account's region.

  • Background-color:transparent !important; is not working in IE

    Hi,
    In my sharepoint site i have used "background-color:transparent !important;" css. It is not working in IE but in Mozilla is working fine.
    And I am using IE 11. Please let me know is there any thing wrong in the syntax. If that is the case please provide me correct solution for that.
    Any help would be greatly appreciated. 
    Regards,
    Saya 

    Thank you for your reply.
    I have checked given links. Those are not use for this issue.
    Actually in my sharepoint site the same code "background-color:transparent
    !important;" was working fine before installing sharepoint 2010 service pack 2. After installation we got this issue. And if i change "transparent"
    with any color, it is applying that color. Only "transparent"
    background css is not working in IE.

  • Jsp code not working

    hello
    we have some class files that are in a zip file that the nw admin has included in the CLASSPATH.
    The code works on Windows w/Tomcat but not the remote Sun Web Server, we cannot get the connection to database due to the code not reading the class files.
    Has anyone come up against anything of this nature. Any thoughts are appreciated.

    yeah we're not getting the str replace error any more - heres index.jsp
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ include file="admin/include/db.jsp" %>
    <html>
    <head>
    <title>Toshiba Industrial Systems</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="common/css/master.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" language="Javascript" src="common/js/master.js"></script>
    <script>
    var strBCLink1 = "placeholder.html";
    var strBCLink2 = "index_oc.jsp";
    var strBCLink3 = "prod_100.jsp";
    var strBCText1 = "Industrial Systems";  
    var strBCText2 = "Uninterruptible Power Systems";
    var strBCText3 = "1000 Series";
    </script>
    <script language="JavaScript" type="text/JavaScript">
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    <style type="text/css">
    </style>
    </head>
    <body>
    <table height="100%" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="87">
    <%@ include file="_header.jsp" %>
    </td>
    </tr>
    <tr>
    <td align="left" class="backGlobalNav" valign="top" height="21" >
    <%@ include file="_nav_global.jsp" %>
    </td>
    </tr>
    <tr>
    <td align="left" valign="top" height="23">
    <%@ include file="_breadcrumb.jsp" %>
    </td>
    </tr>
    <tr>
    <td align="left" valign="top">
    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="160">
    <%@ include file="_nav_side_ups.jsp" %>
    </td>
    <td width="8" align="center" valign="middle"><img src="common/images/spacer.gif" alt="" width="1" height="1"></td>
    <td width="605" align="left" valign="top">
              <TABLE cellSpacing=0 cellPadding=0 width="100%"
    border=0>
    <TBODY>
                   <tr><td height="5"></td></tr>
                        <%
                        if(((request.getParameter("id3")==null))){
                        %>
    <TR>
    <TD width=605 align="left" valign="top">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="605" height="250">
    <param name="movie" value="admin/index_images/index.swf">
    <param name="quality" value="high">
    <embed src="admin/index_images/index.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="605" height="250"></embed></object>                                        
                        </TD>
    </TR>
                        <%}
                        else{
                        str1="";
                        Statement smt4l = conn.createStatement();
                        str1 ="select * from tbl_item where int_parent_id=" + request.getParameter("id3");
                        ResultSet rs_4l=smt4l.executeQuery(str1);
                        %>
    <TR>
    <TD width=605 align="left" height="250" valign="middle" bgcolor="#F0F0F0">
                             <table border="0" width="100%">
                                  <%while (rs_4l.next()){ %>
                                  <tr>
                                       <td>
                                            <a href="./<%=rs_4l.getString(str_link")%">?id1=<%=request.getParameter("id1")%>&id2=<%=request.getParameter("id2")%>&id3=<%=request.getParameter("id3")%>&id4=<%=rs_4l.getInt("int_item_id")%>" class="nav2ndOff">
                                            <%=rs_4l.getString("str_title")%>
                                            </a>
                                       </td>
                                  </tr>
                                  <%}%>
                             </table>
                        </TD>
    </TR>
                        <%
                        }%>
    <TR>
    <TD vAlign=top align=left></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left height=5><IMG height=1
    alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left> <TABLE cellSpacing=0 cellPadding=0 border=0>
    <TBODY>
    <TR>
    <TD vAlign=top align=left> <TABLE cellSpacing=0 cellPadding=0 width=605
    border=0>
    <TBODY>
    <TR>
    <TD class=backGrayMed height=17 align="left" valign="middle"><SPAN
    class=contentBoxOC> Featured Products</SPAN> </TD>
    <TD class=backWhite width=1><IMG height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD class=backGrayMed align="left" valign="middle"><SPAN
    class=contentBoxOC> News</SPAN></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left width=399><IMG
    height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD class=backGrayLight vAlign=top align=left
    width=1 rowSpan=2><IMG height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD vAlign=top align=left width=200 height=10>
    <!-- LiveEdit marker DO NOT REMOVE -->
    <IMG
    height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    </TR>
    <TR>
    <TD vAlign=top align=left><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td height="237" align="left" valign="top">
    <table width="405" border="0" cellspacing="0" cellpadding="0">
    <!---->
                                                           <!---->
    <%
                                                                Statement smt_featured = conn.createStatement() ;
                                                                ResultSet rs_featured=smt_featured.executeQuery("select * from tbl_item where int_parent_id= 0 and bit_featured=1");
                                                           %>
    <tr>
    <%
                                                           int i=0;
                                                           while(rs_featured.next()){
                                                           i++;
                                                           Statement smt_featured1 = conn.createStatement() ;
                                                           ResultSet rs_featured1=smt_featured1.executeQuery("select * from tbl_item where int_item_id= "+rs_featured.getInt("int_item_id"));
                                                           rs_featured1.next();
                                                           %>
    <td width="1"></td>
    <td width="190" height="190" align="left" valign="top" style="cursor:hand">
    <table width="100%" height="190" border="0" background="common/images/featured/back_box.gif" cellpadding="0" cellspacing="0">
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td height="18" colspan="2" align="left" valign="bottom" class="headerMainProdFeature">
                                                                     <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>" class="headerMainProdFeature" >
                                                                     <%
                                                                     if((rs_featured.getString("str_title").length() )>20){
                                                                          out.print(rs_featured.getString("str_title").substring(0,20));
                                                                     else{
                                                                          out.print(rs_featured.getString("str_title"));
                                                                     %>
                                                                     </td>
    </tr></a>
    </a>
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td height="10" colspan="2" align="left" valign="bottom" ><a href="#" class="navfeat"><%=rs_featured.getString("str_subtitle")%></td></tr></a>
    </a>
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td height="94" colspan="2" align="center" valign="middle"><a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>"><img src="admin/product_images/<%=rs_featured.getString("str_image")%>" border="0"></td></tr></a>
    </a>
                                                                <a href="<%=rs_featured1.getString("str_link")%>?<%=current_url_paramenters%>&<%=next_url_paramenter%>=<%=rs_featured.getInt("int_item_id")%>">
    <tr>
    <td width="100%" height="16" align="right" valign="middle"><img src="common/images/featured/arrow.gif" width="17" height="18">  </td>
    </tr></a>
    </table>
                                                                </td>
    <td width="9"></td>
    <%if((i%2)==0){%>
    </tr>
    <tr>
    <td height="9"></td>
    </tr>
    <tr>
    <%}
                                                                }%>
    <td></td>
    </tr>
    <tr>
    <td height="8"></td>
    </tr>
    <tr>
    <td height="8"></td>
    </tr>
    </table> </td>
    </tr>
    </table> </TD>
    <TD vAlign=top align=middle> <TABLE cellSpacing=0 cellPadding=0 width="95%"
    border=0>
    <TBODY>
    <%
                                                      Statement smt_news = conn.createStatement() ;
                                                      ResultSet rs_news=smt_news.executeQuery("select * from tbl_news where bit_active=1 and bit_featured=1");
                                                      while(rs_news.next()){
                                                      %>
    <TR>
    <TD vAlign=top align=center><IMG
    src="common/images/featured/82.gif" alt="" width="3" height="5"
    border=0></TD>
    <TD vAlign=top align=left> <A class="pr" href="./admin/news/<%=rs_news.getString("str_link")%>" target="_blank">
    <%=rs_news.getString("str_title")%>
    </A> </TD>
    </TR>
    <TR>
    <TD vAlign=top align=left><IMG height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    <TD vAlign=top align=left height=6>
    <!-- LiveEdit marker DO NOT REMOVE -->
    <IMG
    height=1 alt=""
    src="Hard Drives & Optical Drives_files/spacer.gif"
    width=1></TD>
    </TR>
    <%}%>
    <TR>
    <TD vAlign=top
    align=left></TD>
    </TR>
    </TBODY>
    </TABLE></TD>
    </TR>
    </TBODY>
    </TABLE>
                                       </TD>
    </TR>
    </TBODY>
    </TABLE></TD>
    </TR>
    </TBODY>
    </TABLE></td>
    <td align="left" valign="top"> </td>
    </tr><tr>
    <td height="5" colspan="4"><img src="common/images/spacer.gif" width="1" height="1"></td>
    </tr>
    <tr>
    <td height="30" align="left" valign="top" colspan="4">
    <%@ include file="_footer.jsp" %>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    and here is db.jsp
    <%@ page import="com.oreilly.servlet.MultipartRequest,java.io.*;"%>
    <%!
    String nl2br(String str){
         str=blanknull(str);
         return str.replaceAll("\n", "<br>");
    String addslashes(String str){
         str = str.replaceAll("'", "''");
         return str;     
    String getExtention(String str){
         int pos = str.indexOf(".");
         return str.substring(pos,str.length());
    String getExtention1(String str){
         int pos = str.indexOf(".");
         return str.substring(pos+1,str.length());
    String convertFileSize(long size) {
         int divisor = 1;
         String unit = "b";
         if (size >= 1024 * 1024) {
              divisor = 1024 * 1024;
              unit = "M";
         else if (size >= 1024) {
              divisor = 1024;
              unit = "K";
         if (divisor == 1) return size / divisor + " " + unit;
         String aftercomma = "" + 100 * (size % divisor) / divisor;
         if (aftercomma.length() == 1) aftercomma = "0" + aftercomma;
         return size / divisor +  " " + unit;
    String highlight_key(String str, String key,String color){
         //str = str.replaceAll("(?i)"+key, "<font color='"+color+"'><b>"+key+"</b></font>");
         return str;
    String first_sentence(String str, String key){
         int pos = str.indexOf(".");
         if(pos==-1){
              pos=str.length();
              return str;
         String str1=str.substring(0,pos);
         int pos1 = str1.indexOf(key);
         if(pos1==-1 && pos!=str.length()){
              str=str.substring(pos+1,str.length());
              return first_sentence(str,key);
         else{
              return str1;
    String blanknull(String s) {
    return (s == null) ? "" : s;
    String removeslashes(String str){
         str = str.replaceAll("''", "'");
         return str;     
    void sendmail(String to,String from, String subject, String message){
    //String from="[email protected]";
    //String to="[email protected]";
    try{
         SmtpClient client = new SmtpClient("mail.xxxxx.xxx");
         client.from(from);
         client.to(to);
         PrintStream message = client.startMessage();
         message.println("To: " + to);
         message.println("Subject:  "+subject+"!");
         message.println(message);
         message.println();
         message.println();
         client.closeServer();
      catch (IOException e){     
         System.out.println("ERROR SENDING EMAIL:"+e);
    %>
    <%
    Connection conn = null;
    //String dbUrl = new String("jdbc:mysql://localhost/toshiba?user=root&password=");
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    conn = DriverManager.getConnection("jdbc:oracle:thin:@10.0.112.92:1524:cweb","mhunter","chester");
    Statement smt = conn.createStatement() ;
    String path=getServletConfig().getServletContext().getRealPath("admin");
    String imagepath=path+"/product_images";
    String tagpath=path+"/tag_files";
    String newspath=path+"/news";
    String envpath=path+"/env_images";
    String resumepath=path+"/resume_files";
    String pagepath=path+"/pages_files";
    String downloadpath=path+"/download_files";
    %></a>

  • Xml code not working with new version

    Hi,
    my following code is not working with the xalan 2.7.0 version. Any one can help to convert this to work on new version.
    import java.io.*;
    import java.util.*;
    import org.xml.sax.*;
    import org.apache.xalan.xslt.*;
    public class XML2Edifact
    public static void main(String args[])
    throws SAXException, IOException
    if(args.length < 3)
    throw new IllegalArgumentException(
    "Usage is XML2Edifact in.xml xsl.xsl out.edi");
    InputStream sin = new FileInputStream(args[0]),
    sxsl = new FileInputStream(args[1]);
    OutputStream sout = new FileOutputStream(args[2]);
    EdifactFormatter formatter = new EdifactFormatter(sout);
    XSLTProcessor processor =
    XSLTProcessorFactory.getProcessor();
    XSLTInputSource in = new XSLTInputSource(sin),
    xsl = new XSLTInputSource(sxsl);
    XSLTResultTarget out = new XSLTResultTarget(formatter);
    processor.process(in,xsl,out);
    }

    Solved, had to repair the Z10 with the PC!  Would have thought that upgrading software would have saved the environment so that this step was not needed (played with this for several weeks on-and-off).

  • Code not working... again :P

    This is my 'paddle' game. You bounce a ball around the around the screen, and it's all working. I'm on the final part, which is what happens when you miss the ball (it goes off the left side of the screen). I'd like to print out a message to the middle of my screen saying "Press R to Reset", while the ball is not anywhere to be seen on the screen (is there a way I can get it to stop moving? my method right now is just to place it far away off screen, which just doesn't seem very professional to me). I made an if statement that should control this, but it's not working (when the you miss the ball, it disappears but nothing prints to the screen, and pressing R doesn't do anything either ) .
    To skip quickly to the if statement just use the find option in your browser and put in 'PROBLEM'
    This is all written in an applet.
    This is my code:
    int width, height, x, ypaddle, xball = 1, yball = 1, xctrl = 1, yctrl = 1, speed = 5, scorekeeper = 0, startkeeper = 0, keykeeper;
        Graphics g;
        String startagain;
        char move;
        Thread run;
        private Random random = new Random ();
        int ballstart = random.nextInt (400);
         *Initializes variables
        public void init ()
            resize (700, 500);
            setBackground (Color.white);
            addKeyListener (this);
            addMouseListener (this);
            addMouseMotionListener (this);
            run = new Thread (this);
            run.start ();
            startagain = "To Reset Press R";
            xball = ballstart;
            yball = ballstart;
        public void run ()
            while (true)
                try
                    run.sleep (50);
                    if (xctrl == 1 && startkeeper == 0)
                        xball = xball + speed;
                    if (yctrl == 1 && startkeeper == 0)
                        yball = yball + speed;
                    if (xctrl == 0 && startkeeper == 0)
                        xball = xball - speed;
                    if (yctrl == 0 && startkeeper == 0)
                        yball = yball - speed;
                    if (xball + 50 >= 660 && startkeeper == 0)
                        xball = xball - speed;
                        xctrl = 0;
                    if ((xball + 50) < 15 && yball <= ypaddle + 50 && yball >= ypaddle - 70 && startkeeper == 0)
                        xball = xball + speed;
                        xctrl = 1;
                    if (yball + 50 >= 460 && startkeeper == 0)
                        yball = yball - speed;
                        yctrl = 0;
                    if (yball + 50 <= 35 && startkeeper == 0)
                        yball = yball + speed;
                        yctrl = 1;
    //PROBLEM BELOW
                    if (xball + 50 <= 0 && startkeeper == 0)
                        if (xball + 50 <= 0)
                            yball = -100;
                            xball = -100;
                            repaint ();
                            g.drawString (startagain, 300, 300);
                        if (xball + 50 <= 0 && startkeeper == 1)
                            scorekeeper = scorekeeper + 1;
                            xball = ballstart;
                            yball = ballstart;
                            startkeeper = 0;
                    repaint ();
                catch (Exception e)
        public void keyPressed (KeyEvent e)
            keykeeper = e.getKeyChar ();
            if (keykeeper == 'r')
                startkeeper = 1;
                keykeeper = 'x';
        }

    For a public Usenet forum, most readers will stop reading by 20Kb, and start complaining at 30Kb.
    lol, I have a long way to go before i make programs that big :P
    By incompatible snippet, do you mean I should post the whole thing? Here it is:
    // The "Ping" class.
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Random;
    *Ping
    *@author Lenny
    public class Ping extends Applet
        implements KeyListener, MouseListener, MouseMotionListener, Runnable
        int width, height, x, ypaddle, xball = 1, yball = 1, xctrl = 1, yctrl = 1, speed = 5, scorekeeper = 0, startkeeper = 0, keykeeper;
        Graphics g;
        String startagain;
        char move;
        Thread run;
        private Random random = new Random ();
        int ballstart = random.nextInt (400);
         *Initializes variables
        public void init ()
            resize (700, 500);
            setBackground (Color.white);
            addKeyListener (this);
            addMouseListener (this);
            addMouseMotionListener (this);
            run = new Thread (this);
            run.start ();
            startagain = "To Reset Press R";
            xball = ballstart;
            yball = ballstart;
        public void run ()
            while (true)
                try
                    run.sleep (50);
                    if (xctrl == 1 && startkeeper == 0)
                        xball = xball + speed;
                    if (yctrl == 1 && startkeeper == 0)
                        yball = yball + speed;
                    if (xctrl == 0 && startkeeper == 0)
                        xball = xball - speed;
                    if (yctrl == 0 && startkeeper == 0)
                        yball = yball - speed;
                    if (xball + 50 >= 660 && startkeeper == 0)
                        xball = xball - speed;
                        xctrl = 0;
                    if ((xball + 50) < 15 && yball <= ypaddle + 50 && yball >= ypaddle - 70 && startkeeper == 0)
                        xball = xball + speed;
                        xctrl = 1;
                    if (yball + 50 >= 460 && startkeeper == 0)
                        yball = yball - speed;
                        yctrl = 0;
                    if (yball + 50 <= 35 && startkeeper == 0)
                        yball = yball + speed;
                        yctrl = 1;
    //PROBLEM HERE
                    if (xball + 50 <= 0 && startkeeper == 0)
                        if (xball + 50 <= 0)
                            yball = -100;
                            xball = -100;
                            repaint ();
                            g.drawString (startagain, 300, 300);
                        if (xball + 50 <= 0 && startkeeper == 1)
                            scorekeeper = scorekeeper + 1;
                            xball = ballstart;
                            yball = ballstart;
                            startkeeper = 0;
                    repaint ();
                catch (Exception e)
        public void keyPressed (KeyEvent e)
            keykeeper = e.getKeyChar ();
            if (keykeeper == 'r')
                startkeeper = 1;
                keykeeper = 'x';
        public void keyReleased (KeyEvent e)
        public void keyTyped (KeyEvent e)
        public void mouseEntered (MouseEvent e)
        public void mouseExited (MouseEvent e)
        public void mousePressed (MouseEvent e)
        public void mouseReleased (MouseEvent e)
        public void mouseClicked (MouseEvent e)
        public void mouseMoved (MouseEvent e)
            ypaddle = e.getY ();
            repaint ();
        public void mouseDragged (MouseEvent e)
        public void paint (Graphics g)
            paddle (g, ypaddle);
            walls (g);
            //enemies (g);
            ball (g);
         * Creates the paddle for hitting the ball
         *@param    y   value used to move the paddle vertically
        public void paddle (Graphics g, int y)
            g.fillRect (10, y - 25, 15, 70);
         *Creates the walls for the ball to bounce off of.
        public void walls (Graphics g)
            g.setColor (Color.yellow);
            g.fillRect (25, 10, 675, 25);
            g.setColor (Color.red);
            g.fillRect (675, 10, 25, 475);
            g.setColor (Color.cyan);
            g.fillRect (25, 475, 675, 25);
         *Creates the enemies to avoid.
        public void enemies (Graphics g)
            int place1 = random.nextInt (1000);
            int place1a = random.nextInt (1000);
            int place2 = random.nextInt (1000);
            int place2a = random.nextInt (1000);
            g.setColor (Color.black);
            g.fillOval (place1, place1a, 10, 10);
        public void ball (Graphics g)
            g.setColor (Color.black);
            g.fillRect (xball + 50, yball + 50, 20, 20);
            g.setColor (Color.white);
            g.fillRect (xball + 53, yball + 55, 5, 5);
            g.fillRect (xball + 63, yball + 55, 5, 5);
            g.fillRect (xball + 56, yball + 63, 9, 5);
    } // Ping classEdited by: soundweave on Jan 16, 2010 7:54 PM

  • Code not working, anyone know why?

    I'm making a simple pong game, and it's important to me that I use JAVA as efficient as possible (that is, use object orientated stuff, mostly). So, for drawing the ball and the players, I had thought up the following steps:
    - the applet has an array list that contains drawables*
    - if the ball and players need to be drawn, the applet uses a for-each loop, wich will call the draw(Graphics g) of all the drawables in the array list.
    * interface, guarantees that the method public void draw(Graphics g) is pressent.
    This is how I programmed it:
    http://willhostforfood.com/access.php?fileid=32821
    Only problem is, it doesn't work. The method paint() of the applet should result in "Hello World" being drawn on the screen (I know this seems like an eleborate method, but using seperate objects will help organise things once I have like, 20 - 30 balls on screen), but it doesn't.
    Does anyone know why it is not working?

    Here ya go, this is something I did quite a while ago, knock yourself out:
    package RandomColor;
    import java.awt.Canvas;
    import java.awt.Color;
    import java.awt.Cursor;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    import java.awt.Image;
    import java.awt.image.MemoryImageSource;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    import java.awt.event.MouseWheelEvent;
    import java.awt.event.MouseWheelListener;
    import java.awt.Point;
    import java.awt.Toolkit;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.util.Random;
    public class RandomColor extends JFrame implements MouseListener, MouseMotionListener, MouseWheelListener{
      private BufferedImage myImage = null;
      private Canvas myCanvas = null;
      private Color bgColor = Color.BLACK;
      public RandomColor() throws java.lang.Exception {
        super();
        setUndecorated(true);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setBackground(bgColor);
        Dimension myDimension = Toolkit.getDefaultToolkit().getScreenSize();
        setSize(myDimension);
        setMinimumSize(myDimension);
        JPanel myJP = new JPanel();
        myJP.setBackground(bgColor);
        Dimension dImage = new Dimension(this.getAccessibleContext().getAccessibleComponent().getSize());
        myCanvas = new Canvas();
        myCanvas.addMouseListener(this);
        myCanvas.addMouseMotionListener(this);
        myCanvas.addMouseWheelListener(this);
        myCanvas.setSize(dImage.width, dImage.height);
        myJP.add(myCanvas);
        add(myJP);
    // start of code to hide the cursor   
        int[] pixels = new int[16 * 16];
        Image image = Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(16, 16, pixels, 0, 16));
        Cursor transparentCursor = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(0, 0), "invisiblecursor");
        getContentPane().setCursor(transparentCursor);
    // end of code to hide cursor   
        pack();
        setVisible(true);
        Random myR = new Random();
        myImage = new BufferedImage((int) (dImage.getWidth()+0.99), (int) (dImage.getHeight()+0.99), BufferedImage.TYPE_INT_RGB);
        int i = myImage.getWidth();
        int j = myImage.getHeight();
        Ball[] myBall = {new Ball(), new Ball(), new Ball()};
        for (int k=0; k<myBall.length; k++){
          myBall[k].setBackGroundColor(Color.BLACK);
          myBall[k].setBounds(0, i, 0, j);
          myBall[k].setRandomColor(true);
          myBall[k].setLocation(myR.nextInt(i), myR.nextInt(j));
          myBall[k].setMoveRate(32, 32, 1, 1, true);
          myBall[k].setSize( 289, 167);
        Graphics g = myImage.getGraphics();
        while(true) {
          for (int k=0; k<myBall.length; k++){
            g.setColor(myBall[k].fgColor);
            g.fillOval(myBall[k].x, myBall[k].y, myBall[k].width, myBall[k].height);
          invalidate();
          paint(getGraphics());
          for (int k=0; k<myBall.length; k++){
            g.setColor(myBall[k].bgColor);
            g.fillOval(myBall[k].x, myBall[k].y, myBall[k].width, myBall[k].height);
            myBall[k].move();
      public void mouseClicked(MouseEvent e){
        exit();
      public void mouseDragged(MouseEvent e){
    //    exit();
      public void mouseEntered(MouseEvent e){
    //    exit();
      public void mouseExited(MouseEvent e){
    //    exit();
      public void mouseMoved(MouseEvent e){
    //    exit();
      public void mousePressed(MouseEvent e){
        exit();
      public void mouseReleased(MouseEvent e){
        exit();
      public void mouseWheelMoved(MouseWheelEvent e){
        exit();
      private void exit(){
        System.exit(0);
      public void paint(Graphics g){
        super.paint(g);
        myCanvas.getGraphics().drawImage(myImage, 0, 0, null);
      public static void main(String[] args) throws java.lang.Exception {
        new RandomColor();
        System.out.println("Done -- RandomColor");
    }Ball Class:
    package RandomColor;
    import java.awt.Color;
    import java.util.Random;
    public class Ball {
      private int iLeft      = 0;
      private int iRight     = 0;
      private int iTop       = 0;
      private int iBottom    = 0;
      private int moveX      = 1;
      private int moveY      = 1;
      private int xScale     = moveX;
      private int yScale     = moveY;
      private int xDirection = 1;
      private int yDirection = 1;
      private boolean moveRandom = false;
      private boolean colorRandom = false;
      private Random myRand = null;
      public Color fgColor = Color.BLACK;
      public Color bgColor = Color.BLACK;
      public int x = 0;
      public int y = 0; 
      public int width  = 1;
      public int height = 1;
      public Ball(){
        myRand = new Random();
        setRandomColor(colorRandom);
      public void move(){
        x = 5 + x + (xScale*xDirection);
        y = 5 + y + (yScale*yDirection);
        if(x<=iLeft){
          x = 0;
          if(moveRandom) xScale = myRand.nextInt(moveX);else xScale = moveX;
          xDirection *= (-1);
          if(colorRandom) setRandomColor(colorRandom);
        if(x>=iRight-width){
          x = iRight-width;
          if(moveRandom) xScale = myRand.nextInt(moveX);else xScale = moveX;
          xDirection *= (-1);
          if(colorRandom) setRandomColor(colorRandom);
        if(y<=iTop){
          y = 0;
          if(moveRandom) yScale = myRand.nextInt(moveY);else xScale = moveY;
          yDirection *= (-1);
          if(colorRandom) setRandomColor(colorRandom);
        if(y>=iBottom-height){
          y = iBottom-height;
          if(moveRandom) yScale = myRand.nextInt(moveY);else xScale = moveY;
          yDirection *= (-1);
          if(colorRandom) setRandomColor(colorRandom);
      public void setColor(Color c){
        fgColor = c;
      public void setBackGroundColor(Color c){
        bgColor = c;
      public void setBounds(int Left, int Right, int Top, int Bottom){
        iLeft   = Left;
        iRight  = Right;
        iTop    = Top;
        iBottom = Bottom;
      public void setLocation(int x, int y){
        this.x = x;
        this.y = y;
      public void setMoveRate(int xMove, int yMove, int xDir, int yDir, boolean randMove){
        moveX       = xMove;
        moveY       = yMove;
        moveRandom  = randMove;
        xDirection  = xDir;
        yDirection  = yDir;
      public void setRandomColor(boolean random){
        colorRandom = random;
        switch (myRand.nextInt(3)+1){
          case 1:  fgColor = Color.BLUE;
                   break;
          case 2:  fgColor = Color.GREEN;
                   break;
          case 3:  fgColor = Color.RED;
                   break;
          default: fgColor = Color.BLACK;
                   break;
      public void setSize(int width, int height){
        this.width  = width;
        this.height = height;
    }

  • Lucene import statements not working

    I'm new to Tomcat, Lucene, and JSP, so bare with me...
    I just installed all three and Tomcat and JSP are working and Lucene is working. Now I'm trying to get them working together but I don't know where my issue is. I have a sample page I found and it's not working and giving me the following error messages...
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 6 in the generated java file
    Only a type can be imported. com.knowledgebooks.servlet.StartupWorkServlet resolves to a package
    An error occurred at line: 7 in the generated java file
    Only a type can be imported. org.apache.lucene.document.Document resolves to a package
    An error occurred at line: 8 in the generated java file
    Only a type can be imported. org.apache.lucene.search.Searcher resolves to a package
    An error occurred at line: 9 in the generated java file
    Only a type can be imported. org.apache.lucene.search.IndexSearcher resolves to a package
    An error occurred at line: 10 in the generated java file
    Only a type can be imported. org.apache.lucene.analysis.Analyzer resolves to a package
    An error occurred at line: 11 in the generated java file
    Only a type can be imported. org.apache.lucene.analysis.standard.StandardAnalyzer resolves to a package
    An error occurred at line: 14 in the generated java file
    Only a type can be imported. org.apache.lucene.search.Query resolves to a package
    An error occurred at line: 15 in the generated java file
    Only a type can be imported. org.apache.lucene.queryParser.QueryParser resolves to a package
    An error occurred at line: 16 in the generated java file
    Only a type can be imported. org.apache.lucene.search.Hits resolves to a package
    An error occurred at line: 17 in the generated java file
    Only a type can be imported. com.knowledgebooks.API resolves to a packageI'm not even sure where to begin looking. Does anyone have any idea?
    Thanks in advance!

    can you provide me your jsp code? so i can look into and advice you.

  • End Routine Code not Working after Support Pack Upgrade

    Hi BI Community,
    We have recently upgraded to SPS17 (BW SP19) for our production system and the code deriving the values of several attributes in the end routine of the transformation for one InfoObject (as info provider) does not work anymore. We have been trying to identify the root cause but the fact is that we did not change anything to the InfoObject and its transformation and this used to work fine. The strange thing is that when we debugged the code we could see the value of the aforementioned attributes was derived correctly but the value is just not updated to the InfoObject where we still see the old values for these attributes.
    We have a similar InfoObject with the same end routine code in the transformation and it is working fine. We are out of idea what could have caused this during the SP upgrade.
    Thanks in advance for your feedback.
    Regards,
    Peter

    Cannot say what might have caused it but one check you can perform.
    Open your transformation in change mode and you can see a button next to create end routine button, titled ' Update Behavior of End Routine Change', click on that and say all fields.
    Hope it helps...
    Regards,
    Ashish

  • .oam file of html5 video trigger code not working in Muse

    I simply want to have a video play on page load. I have done the code for a trigger on one <div> to automatically play a video in Edge. The video plays perfectly in browser preview, even with transparency intact! Just the way I want it. The problem is when I insert .oam file in Muse it doesn't work. Other animations of simple objects and key frames work fine in Muse. But, I can make much more beautiful animations for certain elements in After Effects, with transparency and integrate them with elements in Muse. The video, its transparency and other objects work great from Edge to browser preview but not when .oam file is exported and placed into Muse. I know, I wouldn't build an entire site like this, I just want one or two animations to play automatically, with out controls (which I've been able to do), when the page is loaded.
    I publish with business catalyst to a my own domain, with Creative Cloud.
    Attached is a video where I'm at.
    What is the code or method to get to work?

    HI,
    Ok. I know that mov is not supported in Firefox nor Chrome, now.
    When I put the trigger in Edge to play the .mov file, it works when I preview from Edge to Safari, and not in any of the other browsers. This leads me to think that Safari supports .mov files, with and without transparency.
    However, when I try to put the .oam file generated by Edge into Muse and run the page in Safari the video doesn't work. Is this a .mov support with Muse? Does the video need to be uploaded to the Adobe Business Catalyst server? Where I publish my site?
    .mov and transparency aside, I can't get any video to play in any browser from the .oam file placed in Muse. Nothing plays in preview nor when I publish in Muse. I get the previews to work from Edge for the corresponding video for each browser. And yes, when controls in put in it says wether the video is supported or not. But I would want no controls and the video to play automatically on page load. Ideally I would like transparency. But I realize that's a browser support thing.  I don't see why all browsers don't support all video types and WITH transparency. C'mon now it's almost 2014! Am I right or am I right? Ok, sorry.
    I followed everything in this Tom Green video. Pretty sure all my code is correct.
    http://layersmagazine.com/embedding-video-in-adobe-edge-animate.html
    Picture shows code for working .ogv in Edge preview but not from .oam file in Muse in preview nor publish.
    Not sure why it won't even show in preview from Muse. But thinking when I publish, the video must have to be local on the publish server right?
    Am I missing something? Do I need to insert HTML into Muse, not the .oam?

  • Open my closed hotmail account , code not worked

    Hi
    I closed my account hotmal by mistake , and I tray to open it 
    saliraouf​@hotmail​.com​ will be closed on 8/17/2014
    You're trying to sign in to an account that's going to be closed. If you continue, we'll reopen the account. If you cancel, your account stays marked for closure. 
    What do you want to do?
    I tray to use all the code sending by Windows but it appeerl le code does not work , tray another time , I have a week trying to open it but it still closed
    i posed the problem to technical support but i have not get any answors
    can you help me

    Hi,
    Seems this question is that you closed your Microsoft Account by mistake but now you can't cancel the action.
    Please note we provide support for Excel in the current forum, this question is beyond the scope. I think you can get this issue resolved with the help from this link below:
    http://windows.microsoft.com/en-us/windows-live/id-support
    I hope this will help.
    Regards,
    Melon Chen
    TechNet Community Support

  • On iphoto my stop import is not working and the force quit does not work either

    please help - the stop import and force quit on iphoto both not working. thx!

    This happened to me today on the iPad; I put in the password 4 or 5 times. I began to think my account had been hacked. I tried again on my iPhone and it worked first time. Then I tried again on the iPad and same thing—worked first time. Maybe just a temporary glitch in the server?
    Michael

  • JQuery Code Not Working (Positioning Nav at a fixed point)?

    Hello So lets just cut to the cace,
    This code does work outside of Edge but doesn't work in edge. . . .
    $(window).bind('scroll', function () {
            sym.$("arroworb").addClass('fixed');
    The Object i want to keep in its place at all times even if the scroll bar is moved has the div ID of arroworb. . .
    I have no Idea what i am doing wrong but yeah the code does work it just doesn't when put into Edge
    My guess would be the window or blind has something to do with it not working but I have no idea how to fix this,
    Any idea's?
    Thanks In Advance!

    Here is a small example, using animate, as Joe mentions.
    In Stage > compostionReady
    $(window).scroll(function(){
           var element = sym.$("arroworb");
           element.stop()
      .animate({"marginTop": ($(window).scrollTop() + 30) + "px"}, "slow" );
    View here http://www.heathrowe.com/edge/scroll_with_page/
    Download here http://www.heathrowe.com/edge/scroll_with_page/scrollwithpage.zip
    hth
    Darrell

  • Import statement not working

    i created a package named "pkg1", it contains 4 classes named
    1) Base
    2) Subclass1 (extends Base)
    3) Subclass2 (extends Subclass1)
    4) Subclass3 (extends Subclass2)
    now when i try to use the package using
    import pkg1.*
    and in main method, if i write,
    Subclass3 obj = new Subclass3();
    It does not work, error msg says "makes sure Subclass3 is in the correct sub-directory."
    However, when i tried
    import pkg1.Subclass3;
    It worked fine, Why is then import pkg1.* not working??

    I don't think that's going to help.
    Try and see.
    When the java compiler looks for a class
    pkg1.Subclass1 it looks for pkg1\Subclass1.java
    relative to the current directory and
    pkg1\Subclass1.class relative to each directory on
    the classpath.
    When the javac compiler (at least version 1.4) looks for a dependent class, it looks in the Classpath directories. It only looks relative to the current directory if the current directory is in the Classpath. When it looks for a dependent class, it looks for both .java and .class files. If it only finds a .java file or the .java file is newer than a .class file, it will try to compile the file.
    You need to compile from the directory above
    pkg1, in this case (unfortunately) d:\
    This makes it sound like it is a requirement to compile from the directory. It isn't required.

Maybe you are looking for