Jump to content

JustLikeIcarus

Members
  • Posts

    430
  • Joined

  • Last visited

Everything posted by JustLikeIcarus

  1. You could use something like MySQL workbench which allows you to generate db diffs and manage migrations. http://dev.mysql.com/downloads/workbench/
  2. Here us a js fiddle with an up all night off the top of my head method http://jsfiddle.net/MtBSe/1/ Hope it helps Html: <body> <ul class="blogroll"> <li><a href="#">Title 1</a></li> <li><a href="#">Title 2</a></li> <li><a href="#">Title 3</a></li> <li><a href="#">Title 4</a></li> <li><a href="#">Title 5</a></li> <li><a href="#">Title 6</a></li> <li><a href="#">Title 7</a></li> <li><a href="#">Title 8</a></li> <li><a href="#">Title 9</a></li> <li><a href="#">Title 10</a></li> <li><a href="#">Title 11</a></li> <li><a href="#">Title 12</a></li> <li><a href="#">Title 13</a></li> <li><a href="#">Title 14</a></li> <li><a href="#">Title 15</a></li> <li><a href="#">Title 16</a></li> </ul> <a href="#" class="pager" data-page="1"> Next </a> </body> jQuery: $(function (){ var pageSize = 4; var count = 0; currentPage = $('.pager').data('page'); $(".blogroll li").each(function(i){ count = i % 4 == 0 ? count + 1 : count; $(this).addClass("listGroup" + count); }).not(".listGroup" + currentPage).hide(); $('.pager').on("click", function(e){ currentPage = currentPage < count ? currentPage + 1 : 1; $(this).data("page", currentPage); $(".blogroll").find("li").hide().end().find(".listGroup" + currentPage).show(); }); });
  3. When you build the link if you encode "&" as "&" this should no longer be an issue. A lot of people always encode the ampersand to prevent issues such as this. So the link would resemble <a href="http://somesite.com/page.php?var=1&ltid=1211" />...</a>
  4. start by changing #nav ul li:hover ul{ /*diplay when hovered*/ display: block; } to #nav ul li:hover > ul{ /*diplay when hovered*/ display: block; } test that it should put you in the right direction. Here is a fiddle with the change http://jsfiddle.net/6TGaf/13/
  5. Per the following from MSDN try changing your username to username@database. See if that gets you anywhere
  6. Chrome and Safari are both webkit browsers so they will both prove true for your media query and use the included style.
  7. Maybe something like this would help <script type="text/javascript"> jQuery(function($){ $('input[name=alm]').click(function(){ var parentTD = $(this).parents('td'); var id=$(this).attr('id'); var alm=$(this).val(); $.ajax({ type:'GET', url:'inc/villas_allotment_ajax_update.php', data:'id='+id+'&alm='+alm, success: function(html) { if(html=="1"){//change td bg to green if succeed parentTD.css("background-color", "#66cc00"); }else{ parentTD.css("background-color", "#ff8080"); } } }); }); }); </script>
  8. I dont belive those coordinates exist on the planet... Could be the issue you are seeing.
  9. If you give the clickable rows a class for example <tr class="clickable"><tr> then you could do something like $("#MyTable tr.clickable").click(function(){ $(this).nextUntil(".clickable").toggle(); } This would select all the sibling rows until it hit the next with the class of clickable.
  10. Try something like this. select `website`, sum(case when YEAR(FROM_UNIXTIME(`date_assigned`)) = YEAR(CURDATE()) then 1 else 0 end) AS c_year, count(*) as c_all from `assignments` group by `website` order by `website` asc
  11. Per the documentation it would be wrapAll instead of wrap. $('footer h5, footer ul').wrapAll('<div></div>');
  12. Well the following rule would split the url by '/' and set the vars vendor/category/product RewriteRule ^(.+)/(.+)/(.+)$ script.php?vendor=$1&category=$2&product=$3
  13. If you have 3 different scripts I would think you would want 3 different rules for example: RewriteRule ^vendor/(.+)$ vendor.php?name=$1 RewriteRule ^category/([0-9]+)$ cat.php?id=$1 RewriteRule ^product/([0-9]+)$ product.php?id=$1 Otherwise you may be better off passing the url to a php script to parse out using its regex engine. RewriteRule ^(.+)$ parse.php?url=$1
  14. Should be able to do something along the lines of SELECT id, CASE WHEN col1 = 'true' OR col2 = 'true' OR col3 = 'true' THEN 'true' ELSE 'false' END as newcol1, CASE WHEN col4 = 'true' OR col5 = 'true' OR col6 = 'true' THEN 'true' ELSE 'false' END as newcol2 FROM table;
  15. This should point you in the right direction if I understand you correctly. SELECT id, CASE WHEN col2 = 'true' OR col2 = 'true' OR col3 = 'true' THEN 'true' ELSE 'false' END FROM table;
  16. I tested this and it worked for what you want. All i added was the "next" attribute. $('#slideshow1').after('<div id="nav1" class="nav">').cycle({ fx: 'fade', speed: 'fast', timeout: 0, pager: '#nav1', before: onBefore next: $('#slideshow1 img') });
  17. Do you have multiple elements being created using the same id? If your creating #mini multiple times that could be your issue.
  18. I took a look at the site (saw the url in your screenshots) Are you using firebug to check it because I get 3 JS errors when I hit an "Add to cart" button you should start there.
  19. I recommend using jQuery with the Data tables plugin found here datatables.net He has some good example code for using it with a serverside pagination script as well http://datatables.net/development/server-side/
  20. That is indeed weird. I would suggest changing your callback function to something like alert($('#mini').html()); so you know that its being fired each time and knows who 'mini' is each time.
  21. If its in quotes I dont think it can be equal to a number i.e "1" == 1 try if ($row1['passState'] == 1) or maybe if ("{$row1['passState']}" == "1")
  22. As your perl code is currently written (going off of whats posted in the forum) in order to access the perl functions defined in functions.pl you have to go through index.pl. So that is why the request is being made to index.pl. Now since index.pl is currently coded to return the entire page im using jquery to pull out the contents of the #degrees div (since that is all needed from this request) and then append them to the #degrees div that currently exists. That is done with this $(data).find('#degrees').appendTo('#degrees'); "data" is the entire html page returned of which im telling it to find degrees within that and place it in the current degrees. That should probably be changed to $('#degrees').replaceWith($(data).find('#degrees')); but it works for the example. The jQuery $.post() function is a shorter way to do an $.ajax() post call.
  23. yeah but now you aren't performing any request using ajax. It is now doing a full form submit to index.pl and reloading the page. To show you what im talking replace your chooseDeg() function with the one i threw together below and remove the call to submit from your onChange sections. You should then see the result your looking for. function chooseDeg() { var select_degree = $('input[name=select_degree]:checked').val(); $.post('../../index.pl', {select_degree: select_degree}, function(data) { $(data).find('#degrees').appendTo('#degrees'); }); });
  24. Yes theyre called in index but you are not calling index when you submit your ajax call. if you call index instead of functions.pl in the ajax request I think you will get back something more desirable since index returns the correct information if you call it directly with the variable. Since you are concentrating on perl I'll try to target my help there. in your perl code you could try doing something like this. if(param('select_degree')) { my $which_degree = param('select_degree'); #choose which program under under/graduate chooseProgram($dbc,$tbl_prog,$which_degree); } else { print "<div id='box'>"; &chooseDegree; print "<div class='msg_body'>"; } That way your only returning the content you want to be appended to message body. This will not be returned as json so you want to change your jquery as needed.
  25. Here is a tutorial on what you want to accomplish. http://www.thebuzzmedia.com/html5-drag-and-drop-and-file-api-tutorial/ Keep in mind that support for this varies.
×
×
  • 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.