JustLikeIcarus
Members-
Posts
430 -
Joined
-
Last visited
Everything posted by JustLikeIcarus
-
Strategy for keeping development in synch with test?
JustLikeIcarus replied to davidannis's topic in MySQL Help
You could use something like MySQL workbench which allows you to generate db diffs and manage migrations. http://dev.mysql.com/downloads/workbench/ -
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(); }); });
-
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/
-
Azure Sql - Freetds - Specific Database
JustLikeIcarus replied to GavMJM's topic in Microsoft SQL - MSSQL
Per the following from MSDN try changing your username to username@database. See if that gets you anywhere -
Chrome and Safari are both webkit browsers so they will both prove true for your media query and use the included style.
-
Change Td Bgcolor On Jquery Ajax Callback With Checkbox
JustLikeIcarus replied to Wilf's topic in Javascript Help
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> -
Google Maps Help (Long And Lat Not Working)
JustLikeIcarus replied to Tenaciousmug's topic in Javascript Help
I dont belive those coordinates exist on the planet... Could be the issue you are seeing. -
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.
-
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
-
Per the documentation it would be wrapAll instead of wrap. $('footer h5, footer ul').wrapAll('<div></div>');
-
help with htaccess and multipie vars
JustLikeIcarus replied to Alechko's topic in Apache HTTP Server
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 -
help with htaccess and multipie vars
JustLikeIcarus replied to Alechko's topic in Apache HTTP Server
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 -
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;
-
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;
-
image slider to activate when images are clicked?!
JustLikeIcarus replied to jarv's topic in Javascript Help
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') }); -
Refresh div on parent page on close of Greybox
JustLikeIcarus replied to dawg1's topic in Javascript Help
Do you have multiple elements being created using the same id? If your creating #mini multiple times that could be your issue. -
Refresh div on parent page on close of Greybox
JustLikeIcarus replied to dawg1's topic in Javascript Help
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. -
Help with ajax loading paganation with live sql update
JustLikeIcarus replied to blacknight's topic in Javascript Help
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/ -
Refresh div on parent page on close of Greybox
JustLikeIcarus replied to dawg1's topic in Javascript Help
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. -
Having trouble with a conditional statement.
JustLikeIcarus replied to facarroll's topic in PHP Coding Help
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") -
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.
-
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'); }); });
-
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.
-
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.