Jump to content

cesarcesar

Members
  • Posts

    200
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cesarcesar's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. SOLVED! Specials Thanks to @tfburges from codingforums.com <!DOCTYPE html> <html> <head> <title>Test</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script> <style type="text/css"> .UpMenus { position:absolute; bottom:50%; left:50%; width:102px; height:126px; margin:63px 0px 0px -50px; padding:0px; border:0px; border-bottom:1px solid #00f; list-style-type:none; overflow:visible; } .UpMenus li { position:relative; float:left; width:100px; height:16px; padding:2px 0px; border:1px solid #00f; border-bottom:0px; background:#fff; font:normal 12px sans-serif; text-align:center; overflow:visible; cursor:pointer; cursor:hand; } .UpMenus li:hover { background:#00f; color:#fff; } .UpMenus li ol { position:absolute; bottom:21px; width:98px; height:0px; margin:0px; padding:0px; border:1px solid #00f; border-top:0px; border-bottom:0px; list-style-type:none; overflow:hidden; } .UpMenus li ol.Up { border-top:1px solid #00f; } .UpMenus li ol li { color:#000; border:0px; border-bottom:1px solid #99f; } .UpMenus li ol li:hover { background:#99f; color:#fff; } </style> <script type="text/javascript"> $(function(){ $('.UpMenus > li').click(function(){ var ol = $(this).children('ol'); var h = ol.height()?0:ol.children('li').length*21; var d = 0; ol.parent().parent().children('li').each(function(){ if (d) { $(this).children('ol').animate({height:'0px'},800,function(){$(this).removeClass('Up');}); $(this).animate({top:'0px'},800); } else if (!$(this).is(ol.parent())) { $(this).children('ol').animate({height:'0px'},800,function(){$(this).removeClass('Up');}); $(this).animate({top:(h?-h:'0')+'px'},800); } else { if (h) ol.addClass('Up'); ol.animate({height:h+'px'},800); $(this).animate({top:'0px'},800,function(){if(!h){ol.removeClass('Up')}}); d = 1; } }); }); }); </script> </head> <body> <ul class="UpMenus"> <li> Menu 1 <ol> <li>Sub 1 for Menu 1</li> <li>Sub 2 for Menu 1</li> </ol> </li> <li> Menu 2 <ol> <li>Sub 1 for Menu 2</li> <li>Sub 2 for Menu 2</li> <li>Sub 3 for Menu 2</li> <li>Sub 4 for Menu 2</li> </ol> </li> <li> Menu 3 <ol> <li>Sub 1 for Menu 3</li> <li>Sub 2 for Menu 3</li> <li>Sub 3 for Menu 3</li> </ol> </li> <li> Menu 4 <ol> <li>Sub 1 for Menu 4</li> <li>Sub 2 for Menu 4</li> <li>Sub 3 for Menu 4</li> <li>Sub 4 for Menu 4</li> <li>Sub 5 for Menu 4</li> </ol> </li> <li> Menu 5 <ol> <li>Sub 1 for Menu 5</li> <li>Sub 2 for Menu 5</li> <li>Sub 3 for Menu 5</li> <li>Sub 4 for Menu 5</li> <li>Sub 5 for Menu 5</li> <li>Sub 6 for Menu 5</li> <li>Sub 7 for Menu 5</li> </ol> </li> <li> Menu 6 <ol> <li>Sub 1 for Menu 6</li> <li>Sub 2 for Menu 6</li> </ol> </li> </ul> </body> </html>
  2. Howdy Community, I have spent the past 4 hours strait looking for and trying to modify an accordion style vertical menu who's elements slide out of the top and up instead of the normal slide out of the bottom and down action. I would like it in jQuery, but at this point I will take any library. Thanks for your help. I know some have wondered "What have you tried making work".. jQuery Tools, Jquery UI and about 3 other scripts that looked updateable. All I couldn't get to work. I also made an attempt to fake an accordion using show/hide toggles and this sorta worked, but it didnt have the nice slide as well as my data didnt move on page in the right direction. Headache!!! Help!! Thanks, Cesar
  3. I hope this question is in the right forum. I figured since the end result is a PHP result it fits here. I have a normal HTML form. In it are text fields. Some of my customers will be filling the form with Kanji and Katakana characters. The form shows as filling fine, but when submitted, the returning POST values are empty. I have checked all over the web and i just cant seem to find anything about what I'm missing. I do have meta tag <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> Any help is much appreciated. Thanks.
  4. I am placing this in the PHP sections because I think you all will know this answer the quickest. I am creating a podcast. I have created the XML file successfully. I have placed the file on my server and have gotten one of my podcast clients (Media Monkey) to pick it up and the mp3 files within it successfully. My issue is that when i try an get iTunes to work with it there is problems. iTunes will read the XML, but will not download the mp3's. I'm pretty sure I know why, but there is a huge catch-22 in the deal. To protect my content my CDN offers a method by where I add some query parameters to the end of the mp3 file to protect it from illegal downloads. It look like this (not actual file) http://www.sitename.com/2011-03-14.mp3?px-hash%3Db42c227e36ef27aee6e96ae9c4f32214%26px-time%3D1300704254 Using this string in the XML makes it validate correctly. The issue is because this link is urlencoded, the XML validates, but iTunes will not process the link as a valid link. Now if I remove the urlencoded part of the link, the XML will not validate and then iTunes will not even read the XML file. This is the link without encoding. http://www.sitename.com/2011-03-14.mp3?px-hash=98c7759588a9add0728350dd69871cdf&px-time=1300731722 See where I'm going? Anyone have a solution? How do I get around this catch-22? I need a way to pass the un-encoded link in the XML file, but still make it validate. Thanks for your help. (yes i see the links are different. Its ok as an example.)
  5. http://sb.cesarvillaca.com/footer-bug.html (code at the bottom) I have been trying like crazy to get the positioning of this nav correct. I need to get each of the navs to position exactly over their respective links. So the white "Products" word (over state) should sit exactly over the purple "Products" link. It should stick in the correct position on screen resolution change too. This nave will be localized too so more letter should be able to be added to each line of the pop-ups and still stick in its spot. These are all the issues I am having. PLEASE HELP! I have spent soooo much time on this and its driving me crazy!! <!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-type" content="text/html; charset=UTF-8"/> <meta http-equiv="Content-Language" content="en-us"/> <meta http-equiv="imagetoolbar" content="no"/> <meta name="robots" content="index,follow,archive"/> <style type="text/css" title=""> body { font-family: Arial, Helvetica, sans-serif; line-height: 115%; font-size:10px; background-color: #000000; height:100%; color:#FDB813; } .auto-width { display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline; } #footer-container { background-color:#000; height:420px; } #footer{ margin:0 auto; width:980px; background-color:#000; } #footer-nav { margin:30px 0 0 0px; width:980px; position:relative; } .fnpc { position:absolute; display:none; top:0px; left:19px; z-index:10; } .fnp { border:1px solid #555555; background-color:#252526; color:#888888; text-align:left; padding:10px; position:relative; z-index:10; top:-34px; left:0px; } .fto { border-top-style:none; border-right-style:solid; border-bottom-style:solid; border-left-style:solid; border-width:1px; border-color:#555555; background-color:#252526; position:absolute; bottom:-1px; left:0px; z-index:11; } .fnc { font-size:10px; color:#ffffff; padding:10px; height:15px; cursor:pointer; } </style> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> </head> <body> <!-- Footer Starts Here. Everything Below should be stuck in an include. --> <div id="footer-container" style="margin-top:200px;"> <div id="footer"> <div id="footer-nav"> <div style="float:left; margin-right:50px;"> <div id="fnp-container-Products" class="fnpc"> <div id="fnp-Products" class="fnp auto-width"> <a href="" class="">Aaaaaaa bbbbbb</a><br> <a href="" class="">Baaaaaa bbbbbb</a><br> <a href="" class="">Caaaaaa bbbbbb</a><br> <a href="" class="">Daaaaaa bbbbbb</a><br> <a href="" class="">Eaaaaaa bbbbbb</a><br> <a href="" class="">Faaaaaa bbbbbb</a><br> </div> <div id="footnav-Products" class="fto"> <div class="fnc auto-width">Products</div> </div> </div> <a href="" class="footer-nav-link footer-Products">Products</a> <script type="text/javascript"> <!-- $('.footer-Products').mouseenter(function() { $('.fnpc').hide(); $('#fnp-container-Products').show(); $("#fnp-container-Products").css({ "top": $("#fnp-Products").height() + "px", "left": $("#fnp-Products").height() + "px" }); }); //--> </script> </div> <div style="float:left; margin-right:50px;"> <div id="fnp-container-Solutions_Center" class="fnpc"> <div id="fnp-Solutions_Center" class="fnp auto-width"> <a href="" class="">Aaaaaaa bbbbbb ccccc</a><br> <a href="" class="">Baaaaaa bbbbbb ccccc</a><br> <a href="" class="">Caaaaaa bbbbbb ccccc</a><br> <a href="" class="">Daaaaaa bbbbbb ccccc</a><br> <a href="" class="">Eaaaaaa bbbbbb ccccc</a><br> <a href="" class="">Faaaaaa bbbbbb ccccc</a><br> </div> <div id="footnav-Solutions_Center" class="fto"> <div class="fnc auto-width">Solutions Center</div> </div> </div> <a href="" class="footer-nav-link footer-Solutions_Center">Solutions Center</a> <script type="text/javascript"> <!-- $('.footer-Solutions_Center').mouseenter(function() { $('.fnpc').hide(); $('#fnp-container-Solutions_Center').show(); $("#fnp-container-Solutions_Center").css({ "top": $("#fnp-Solutions_Center").height() + "px", "left": $("#fnp-Solutions_Center").height() + "px" }); }); //--> </script> </div> </div> </div> </div> <script type="text/javascript"> <!-- $('.fnpc').mouseleave(function() { $('.fnpc').hide(); }); //--> </script> </body> </html>
  6. I'm building a navigation that is built heavily on jQuery. I have it working as needed except that when mousing over links to quickly it spikes the processor and the navigation hangs. By hangs i mean it stops working and even the links will not show rollover states. I thought it was just a matter of adding a stop() but this changed nothing. Any ideas? Here it is online http://sb.cesarvillaca.com/nav/nav.html The code is below. <div id="ProductsNav-ov" style="display:none;"></div> <div id="main-nav"> <ul> <li class="mainnav-click" id="ProductsNav">PRODUCTS</li> </ul> <script type="text/javascript"> <!-- $(function() { $('.mainnav-click').mouseenter(function() { //alert($(this).attr('id')); buildNav($(this).attr('id')); }); }); function buildNav(nav,sub){ //alert(nav); var Shredders = new Array({ Deskside: '', Professional: '', Commercial: '', Government_Approved: '', Supplies: '' }); var Records_Storage = new Array({ Storage_Drawers: '', Storage_Boxes: '', Earth_Series: '', Classroom_Organization: '', Moving_Boxes: '', Magazine_Holders: '', Sorters: '' }); var Workspace_Ergonomics = new Array({ Keyboard_Trays_and_Drawers: '', Palm_and_Wrist_Supports: '', Monitor_Supports: '', Back_Supports: '', Foot_Supports: '', Copyholders: '', Monitor_Filters: '', Machine_Stands: '' }); var Workspace_Organization = new Array({ Desk_Organizers: '', Cubicle_Organizers: '', Literature_Organizers: '', Mail_Carts: '' }); var Computer_Accessories = new Array({ Keyboards_and_Mice: '', Mouse_Pads: '', Cleaning_Supplies: '', Power_Protection: '', Keyguards: '' }); var CD_DVD_Products = new Array({ Jewel_Cases_and_Inserts: '', Desktop: '' }); var Binding_Machines = new Array({ Plastic_Comb: '', Wire: '', Thermal: '', Supplies: '' }); var Laminating_Machines = new Array({ Personal: '', General_Office: '', Supplies: '' }); var Cutters_and_Trimmers = new Array({ Cutters: '', Rotary_Trimmers: '', Supplies: '' }); var Mobile_Accessories = new Array({ Mobile_Accessories: '' }); var Refurbished_Shredders = new Array({ Refurbished_Shredders: '' }); var Where_To_Buy = new Array({ Where_To_Buy: '' }); var ProductsNav = { "Shredders": Shredders, "Records_Storage": Records_Storage, "Workspace_Ergonomics": Workspace_Ergonomics, "Workspace_Organization": Workspace_Organization, "Computer_Accessories": Computer_Accessories, "CD_DVD_Products": CD_DVD_Products, "Binding_Machines": Binding_Machines, "Laminating_Machines": Laminating_Machines, "Cutters_and_Trimmers": Cutters_and_Trimmers, "Mobile_Accessories": Mobile_Accessories, "Refurbished_Shredders": Refurbished_Shredders, "Where_To_Buy": Where_To_Buy }; if (sub==undefined) { var navPOP=''; navPOP+= '<div id="drop-down-container">'+ '<div id="mainnav-title-ov">'+ '<div class="sprite main-nav-left lfloat"></div>'+ '<div class="main-nav-center auto-width">PRODUCTS</div>'+ '<div class="sprite main-nav-right lfloat"></div>'+ '<br class="clear">'+ '</div>'+ '<div id="drop-down" class="auto-width">'+ '<div id="mainnav-container" class="dots">'+ '<ul id="mainnav">'; var navname = ""; $.each(eval(nav), function(mainNav, mainNavobject) { $.each(mainNavobject, function(i, subNavobject) { $.each(subNavobject, function(property, value) { if (navname != mainNav) { navname = mainNav; navPOP+= '<li><a href="' + value + '" class="subnav-click" id="' + mainNav + '">'+str_replace("_"," ",mainNav)+'</a></li>'; } }); }); }); navPOP+= '</ul>'+ '</div>'+ '<div id="drop-down-sub"></div>'+ '<br class="clear">'+ '</div>'+ '</div>'; var whatmenu = nav+'-ov'; $('#'+whatmenu).html(navPOP); $('#mainnav-container').removeClass('dots'); $('#'+whatmenu).position({ my: "left top", at: "left top"}); $('#'+whatmenu).show(); }else{ //$("#drop-down-sub").stop(); $('#drop-down-sub').empty(); var navPOPsub=''; navPOPsub+= '<ul id="subnav">'; $.each(eval(nav), function(mainNav, subNavobject) { $.each(subNavobject, function(property, value) { navPOPsub+= '<li><a href="' + value + '">'+str_replace("_"," ",property)+'</a></li>'; }); }); navPOPsub+= '</ul>'; $('#mainnav-container').addClass('dots'); $('#drop-down-sub').html(navPOPsub); $('#drop-down-sub').show(); } $('.subnav-click').mouseover(function() { buildNav($(this).attr('id'),1); }); $('#drop-down-container').mouseleave(function() { $('#ProductsNav-ov').hide(); }); } //--> </script> </div> </div>
  7. Yes thats a good one. I dud though just word about http://flowplayer.org/tools/demos/rangeinput/scrollbar.html which is awesome because im very firmiliar with this library.
  8. Hey fellow coders. I've been searching for a script, but I'm coming up empty. The script will display products in a single row full screen left to right. To slide the products there is a pull bar. You can see how the exact script works on http://www.logitech.com/en-us/keyboards/keyboards. Does anybody know of a complete script, or at least one that is close enough to alter. Thanks much.
  9. I want to completely avoid any transactions between the buyer and seller.
  10. The idea would be that customers come to my site to see products from many sites that I have created partnerships with, then once they choose what they like, they go to the website the product is on and make the purchase. My question is how to I get paid for hooking up the buyer to the seller? I know the standard would be that I will have some type of affiliate marketing or advertising on my site, but is there a way I can get paid for the actual referral of the product sale? I really don't want to really on the honor system! If I did I think I would see no money. Most of the sites I will be working with will not have any type of affiliate system setup or anyway to do tracking of my referred clients. I thought of having some type of promo-code for a discount, but then there is no way to ensure the buyer will not just make a deal with the seller around my back. Would it be worth it to offer a rebate on confirmed orders? Say once a sale is made, they buyer shows proof via reciept and I offer a small rebate or gift card somewhere. This way I can have proof the sale was made and then take it up with the seller to get my referral share. If they dont pay the referral I drop them from the site. What about if I where to collect all the info for the sale (billing & shipping info, credit card info) and then pass that info to the sellers to finish up process the transaction and ship. I would be upfront to the buyers that their data is being transferred to the seller website for final processing. This way I know about the sale and can request my referral. Does anyone have any suggestions here or comments to my ideas? Thanks much.
  11. adding the sleep didnt effect anything. Yes that is the whole script.
  12. How would I determine the byte count?
  13. I'm using the following script to download large file (>100Mb). It works well except that it seems to not ever save the final chunk. If the file is 149,499 on the server, it finishes its download at 145,996. Why? How do I get the last 2% or so to flush and complete the download? Thank much for your help. FYI, this also happens the same on smaller files so its not stopping for time or file size issues. $path = "the/file/path.mp4"; $headsize = get_headers($path,1); $ext = str_from_last_occurrence($_vars['filepath'],"."); if ($ext=="mp3") { $type = "audio"; } elseif ($ext=="mp4") { $type = "video"; } function readfile_chunked($filename,$retbytes=true) { // Stream file $handle = fopen($filename, 'rb'); $chunksize = 1*(1024*1024); // how many bytes per chunk $buffer = ''; $cnt =0; if ($handle === false) { return false; } while (!feof($handle)) { $buffer = fread($handle, $chunksize); echo $buffer; ob_flush(); flush(); if ($retbytes) { $cnt += strlen($buffer); } } $status = fclose($handle); if ($retbytes && $status) { return $cnt; // return num. bytes delivered like readfile() does. } return $status; } header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate'); header("Content-type: ".$type."/".$ext); header('Content-Length: ' . (string)($headsize['Content-Length'])); header('Content-Disposition: attachment; filename="'.str_from_last_occurrence($_vars['filepath'],"/").'"'); header("Content-Transfer-Encoding: binary"); readfile_chunked($path); exit;
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.