Search Results

Search found 13 results on 1 pages for 'adardesign'.

Page 1/1 | 1 

  • [javascript - jQuery] creating nested array's on the fly

    - by adardesign
    What i am trying to do is to loop this HTML and get an nested array of this HTML values that i want to grab. This script is just part of a whole function. html <div class="configureData"> <div title="Large"> <a href="yellow" title="true" rel="$55.00" name="sku22828"></a> <a href="green" title="true" rel="$55.00" name="sku224438"></a> <a href="Blue" title="true" rel="$55.00" name="sku22222"></a> </div> <div title="Large"> <a href="yellow" title="true" rel="$55.00" name="sku22828"></a> <a href="green" title="true" rel="$55.00" name="sku224438"></a> <a href="Blue" title="true" rel="$55.00" name="sku22222"></a> </div> <div title="Large"> <a href="yellow" title="true" rel="$55.00" name="sku22828"></a> <a href="green" title="true" rel="$55.00" name="sku224438"></a> <a href="Blue" title="true" rel="$55.00" name="sku22222"></a> </div> </div> javascript // this is part of a script..... parseData:function(dH){ dH.find(".configureData div").each(function(indA, eleA){ colorNSize.tempSizeArray[indA] = [eleA.title,[],[],[],[]] $(eleZ).find("a").each(function(indB, eleB){ colorNSize.tempSizeArray[indA][indB+1] = eleC.title }) }) }, I expect the end array should look like this. [ ["large", ["yellow", "green", "blue"], ["true", "true", "true"], ["$55", "$55","$55"] ], ["Medium", ["yellow", "green", "blue"], ["true", "true", "true"], ["$55", "$55","$55"] ] ] // and so on....

    Read the article

  • javascript trying to get 3rd nested array.length and value

    - by adardesign
    How can i get the 3rd nested array (in this case the array starting with "yellow") the array looks like this: [ ["Large", ["yellow", "green", "Blue"], ["$55.00", "$55.00", "$55.00"] ["Medium", ["yellow", "green", "Blue", "Red"], ["$55.00", "$55.00", "$55.00", "$55.00"] ] ["small", ["yellow", "green", "Blue", "Red"], ["$55.00", "$55.00", "$55.00", "$55.00"] ] ] I am trying to get to the ["yellow", "green", "Blue"] array's length and loop to get the values for(i=0; colorNSize.dataArray[0][0][1].length<i; i++){ alert(colorNSize.dataArray[colorNSize.Sizeindex][0][0][i])// alert's nothing } It actually alerts the length of "Large" which is "5" is there a limit for nested arrays? Can this be done?

    Read the article

  • PHP behaves weird, mixing up HTML markup.

    - by adardesign
    Thanks for looking on this problem. I have a page that is totally valid page, and there is a PHP loop that brings in a <li> for each entry of the table. When i check this page locally it looks 100% OK, but when veiwing the page online the left side bar (which creates this markup is broken randomly mixing <div>'s and <li>'s and i have no clue what the problem is. See page (problem is on the left side) php code <?php do { ?> <li class="clear-block" id="<?php echo $row_Recordset1['penSKU']; ?>"> <a title="Click to view the <?php echo $row_Recordset1['penName']; ?> collection" rel="<?php echo $row_Recordset1['penSKU']; ?>"> <img src="prodImages/small/<?php echo $row_Recordset1['penSKU']; ?>.png" alt="" /> <div class="prodInfoCntnr"> <div class="basicInfo"> <span class="prodName"><?php echo $row_Recordset1['penName']; ?></span> <span class="prodSku"><?php echo $row_Recordset1['penSKU']; ?></span> </div> <div class="secondaryInfo"> <span>As low as .<?php echo $row_Recordset1['price25000']; ?>¢ <!--<em>(R)</em>--></span> <div class="colorPlacholder" rel="<?php echo $row_Recordset1['penColors']; ?>"></div> </div> </div> <div class="additPenInfo"> <div class="imprintInfo"><span>Imprint area: </span><?php echo $row_Recordset1['imprintArea']; ?></div> <div class="colorInfo"><span>Available in: </span><?php echo $row_Recordset1['penColors']; ?></div> <table border="0" cellspacing="0" cellpadding="0"> <tr> <th>Amount</th> <th>500</th> <th>1,000</th> <th>2,500</th> <th>5,000</th> <th>10,000</th> <th>20,000</th> </tr> <tr> <td>Price <span>(R)</span></td> <td><?php echo $row_Recordset1['price500'];?>¢</td> <td><?php echo $row_Recordset1['price1000'];?>¢</td> <td><?php echo $row_Recordset1['price2500'];?>¢</td> <td><?php echo $row_Recordset1['price5000'];?>¢</td> <td>Please Contact</td> <td>Please Contact</td> </tr> </table> </div> </a> </li> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>

    Read the article

  • CSS renders Input in firefox mac vs firefox PC. can i detect os via javascript? or maybe a CSS hack

    - by adardesign
    I have a input[type="text"] the that has padding applied to it behaves differently in firefox PC then on a mac. Any hacks that can target firefox PC? These styles are what its seen on firefox PC firebug .searchContainer input { border-color:#7C7C7C #C3C3C3 #DDDDDD; border-style:solid; border-width:1px; color:#555555; float:left; height:12px; padding:3px; } These styles are what its seen on firefox PC firebug .searchContainer input { border-color:#7C7C7C #C3C3C3 #DDDDDD; border-style:solid; border-width:1px; color:#555555; float:left; height:12px; padding:3px; } No other styles are applied to these inputs. Here is a snapshot of FF PC http://tinyurl.com/2wdxmq5 Here is a snapshot of FF mac http://tinyurl.com/2u7f2nl any suggestions?

    Read the article

  • javaScript .splice() not working on correctly

    - by adardesign
    I am setting a cookie for each navigation container that is clicked on. It sets an array that is joined and set the cookie value. if its clicked again then its removed from the array. It somehow buggy. It only splices after clicking on other elements. and then it behaves weird. Thanks much. var navLinkToOpen; var setNavCookie = function(value){ var isSet = false; var checkCookies = checkNavCookie() setCookieHelper = checkCookies? checkCookies.split(","): []; console.log("value passed", value) for(i in setCookieHelper){ if(value == setCookieHelper[i]){ setCookieHelper.splice(value,1); isSet = true; } } if(!isSet){ setCookieHelper.push(value) } setCookieHelper.join(",") document.cookie = "navLinkToOpen"+"="+setCookieHelper; } var checkNavCookie = function(){ var allCookies = document.cookie.split( ';' ); for (i = 0; i < allCookies.length; i++ ){ temp = allCookies[i].split("=") if(temp[0].match("navLinkToOpen")){ var getValue = temp[1] } } return getValue || false } $(document).ready(function() { $("#LeftNav li").has("b").addClass("navHeader").not(":first").siblings("li").hide() $(".navHeader").click(function(){ $(this).toggleClass("collapsed").nextUntil("li:has('b')").slideToggle(300); setNavCookie($('.navHeader').index($(this))) return false }) console.log("init",document.cookie) var testCookies = checkNavCookie(); if(testCookies){ finalArrayValue = testCookies.split(",") for(i in finalArrayValue){ $(".navHeader").eq(finalArrayValue[i]).toggleClass("collapsed").nextUntil(".navHeader").slideToggle (0); } } });

    Read the article

  • Creating nested arrays on the fly

    - by adardesign
    I am trying to do is to loop this HTML and get a nested array of this HTML values that i want to grab. It might look complex at first but is a simple question... This script is just part of a Object containing methods. html <div class="configureData"> <div title="Large"> <a href="yellow" title="true" rel="$55.00" name="sku22828"></a> <a href="green" title="true" rel="$55.00" name="sku224438"></a> <a href="Blue" title="true" rel="$55.00" name="sku22222"></a> </div> <div title="Medium"> <a href="yellow" title="true" rel="$55.00" name="sku22828"></a> <a href="green" title="true" rel="$55.00" name="sku224438"></a> <a href="Blue" title="true" rel="$55.00" name="sku22222"></a> </div> <div title="Small"> <a href="yellow" title="true" rel="$55.00" name="sku22828"></a> <a href="green" title="true" rel="$55.00" name="sku224438"></a> <a href="Blue" title="true" rel="$55.00" name="sku22222"></a> </div> </div> javascript // this is part of a script..... parseData:function(dH){ dH.find(".configureData div").each(function(indA, eleA){ colorNSize.tempSizeArray[indA] = [eleA.title,[],[],[],[]] $(eleZ).find("a").each(function(indB, eleB){ colorNSize.tempSizeArray[indA][indB+1] = eleC.title }) }) }, I expect the end array should look like this. [ ["large", ["yellow", "green", "blue"], ["true", "true", "true"], ["$55", "$55","$55"] ], ["Medium", ["yellow", "green", "blue"], ["true", "true", "true"], ["$55", "$55","$55"] ] ] // and so on....

    Read the article

  • CSS renders Input in firefox mac diffrent then firefox PC. can i detect OS via javascript? or maybe

    - by adardesign
    I have a input[type="text"] the that has padding applied to it behaves differently in firefox PC then on a mac. Any hacks that can target firefox PC? These styles are what its seen on firefox PC firebug .searchContainer input { border-color:#7C7C7C #C3C3C3 #DDDDDD; border-style:solid; border-width:1px; color:#555555; float:left; height:12px; padding:3px; } These styles are what its seen on firefox Mac firebug .searchContainer input { border-color:#7C7C7C #C3C3C3 #DDDDDD; border-style:solid; border-width:1px; color:#555555; float:left; height:12px; padding:3px; } No other styles are applied to these inputs. Here is a snapshot of FF PC http://tinyurl.com/2wdxmq5 Here is a snapshot of FF mac http://tinyurl.com/2u7f2nl any suggestions?

    Read the article

  • splice() not working on correctly

    - by adardesign
    I am setting a cookie for each navigation container that is clicked on. It sets an array that is joined and set the cookie value. if its clicked again then its removed from the array. It somehow buggy. It only splices after clicking on other elements. and then it behaves weird. It might be that splice is not the correct method Thanks much. var navLinkToOpen; var setNavCookie = function(value){ var isSet = false; var checkCookies = checkNavCookie() setCookieHelper = checkCookies? checkCookies.split(","): []; for(i in setCookieHelper){ if(value == setCookieHelper[i]){ setCookieHelper.splice(value,1); isSet = true; } } if(!isSet){setCookieHelper.push(value)} setCookieHelper.join(",") document.cookie = "navLinkToOpen"+"="+setCookieHelper; } var checkNavCookie = function(){ var allCookies = document.cookie.split( ';' ); for (i = 0; i < allCookies.length; i++ ){ temp = allCookies[i].split("=") if(temp[0].match("navLinkToOpen")){ var getValue = temp[1] } } return getValue || false } $(document).ready(function() { $("#LeftNav li").has("b").addClass("navHeader").not(":first").siblings("li").hide() $(".navHeader").click(function(){ $(this).toggleClass("collapsed").nextUntil("li:has('b')").slideToggle(300); setNavCookie($('.navHeader').index($(this))) return false }) var testCookies = checkNavCookie(); if(testCookies){ finalArrayValue = testCookies.split(",") for(i in finalArrayValue){ $(".navHeader").eq(finalArrayValue[i]).toggleClass("collapsed").nextUntil(".navHeader").slideToggle (0); } } });

    Read the article

  • Trying to build a dynamic PHP mysql_query string to update a row and getting back the updated row

    - by adardesign
    I have a form that jQuery tracks the onChage .change() event so when something is changed it runs a ajax request and i pass in the column, id, and the values in the url. Here i have the PHP code that should update the data. My question is now how do i build the mySQl string dynamically. and how do i echo back the changes/updates that where just changed on the db. Here is the PHP code i am trying to work with. <?php require_once('Connections/connect.php'); ?> <?php $id = $_GET['id']; $collumn = $_GET['collumn']; $val = $_GET['val']; ?> <?php mysql_select_db($myDB, $connection); // here i try to build the query string and pass in the passed in values $sqlUpdate = 'UPDATE `plProducts`.`allPens` SET `$collumn` = '$val' WHERE `allPens`.`prodId` = '$id' LIMIT 1;'; // here i want to echo back the updated row (or the updated data) $seeResults = mysql_query($sqlUpdate, $connection); echo $seeResults ?>

    Read the article

1