Search Results

Search found 2953 results on 119 pages for 'charlene li'.

Page 62/119 | < Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >

  • jQuery validate and tabs

    - by ntan
    Hi i am using jQuery validate for my form validation. The form is inside tabs.When i get an error i add an icon to the tab that error exist to be visual by the user So far so good. My problem is that after correct the error i can not remove the error in tab icon. I was assuming that validator is accessible via success but its not Assuming that the first tab (tab0) has 3 field for validation (field1,field2,field3) Here is the full code $("form#Form1") .validate({ invalidHandler: function(form, validator) { //TAB 0 if (validator.errorMap.field1 != "" && validator.errorMap.field2 != "" && validator.errorMap.field3 != "") { if ($("#tabs>ul>li").eq(0).find("img").length == 0) { $("#tabs>ul>li").eq(0).prepend("<img src=\"error.gif\">"); } } }, errorClass: "errorField", errorElement: "p", errorPlacement: function(error, element) { var parent = element.parent(); parent.addClass("error"); error.prependTo( parent ); }, //validator in not accessible via success //so my code its not working success: function(element,validator) { var parent = element.parent(); parent.removeClass("error"); $(parent).children("p.errorField").remove(); //TAB 0 if (validator.errorMap.field1 == "" && validator.errorMap.field2 == "" && validator.errorMap.field2 == "") { if ($("#tabs>ul>li").eq(0).find("img").length == 0) { $("#tabs>ul>li").eq(0).find("img").remove(); } } }, rules: { field1: { required: true }, field2: { required: true }, field3: { required: true } } }); Any suggestion is welcome.

    Read the article

  • Foreach loop returning null values in PHP?

    - by Jascha
    Hello, I have a pretty simple problem. Basically I have an array called $list that is a list of titles. If I do a print_r($list) I get these results: Array ( [0] => Another New Title [1] => Awesome Movies and stuff [2] => Jascha's Title ) Now, I'm running a foreach loop to retrieve their values and format them in an <ul> like so... function get_film_list(){ global $categories; $list = $categories->get_film_list(); if(count($list)==0){ echo 'No films are in this category'; }else{ echo '<ul>'; foreach($list as $title){ echo '<li>' . $title . '<li>'; } echo '</ul>'; } } The problem I'm having is my loop is returning two values per value (is it the key value?) The result of the preceding function looks like this: Another New Title   Awesome Movies and stuff   Jascha's Title   I even tried: foreach($list as $key => $title){ echo '<li>' . $title . '<li>'; } With the same results: Another New Title   Awesome Movies and stuff   Jascha's Title   What am I missing here? Thanks in advance.

    Read the article

  • Switching languages on a website with PHP

    - by jnkrois
    Hello everybody, I'm just looking for some advice. I'm creating a website that offers (at least) 2 languages. The way I'm setting it up is by using XML files for the language, PHP to retrieve the values in the XML nodes. Say you have any XML file, being loaded as follows: <?php $lang = "en"; $xmlFile = simplexml_load_file("$lang/main.xml"); ?> Once the file contents are available, I just output each node into an HTML tag like so: <li><?php echo $xmlFile->navigation->home; ?></li> which in turn is equal to : <li><a href="#">Home</a></li> as a nav bar link. Now, the way in which I'm switching languages is by changing the value of the "$lang" variable, through a "$_POST", like so: if(isset($_POST['es'])){ $lang = "es"; }elseif(isset($_POST['en'])){ $lang = "en"; } The value of the "$lang" variable is reset and the new file is loaded, loading as well all the new nodes from the new XML file, hence changing the language. I'm just wondering if there is another way to reset the "$lang" variable using something else, other than "$_POST" or "$_GET". I don't want to use query string either. I know I could use JavaScript or jQuery to achieve this, but I'd like to make the site not too dependable on JavaScript. I'd appreciate any ideas or advice. Thanks

    Read the article

  • Hide anchors using jQuery

    - by Eric Di Bari
    I've created a dynamic page that, depending on the view type, will sometimes utilize the anchor tags and other times not. Essentially, I want to be able to control if on click the page jumps to the anchor. Is it possible to hide anchor tags using jQUery, so they are essentially removed? I need to be able to re-enable the anchors when necessary, and always show the current anchor in the browser's address bar. It seems to work in FireFox, but not in Internet Explorer. I have three sections: the 'table of contents', the content, and the javascript (jQuery) code Table of Contents <a id="expandLink0" class="expandLinksList" href="#green">What is green purchasing</a><br> <a id="expandLink1" class="expandLinksList" href="#before">Before you buy</a><br> Contents <ul id="makeIntoSlideshowUL">' <li id="slideNumber0" class="slideShowSlide"> <a name="green"></a> <div>Green Purchasing refers to the procurement of products and service...<a href="#topOfPageAnchor" class="topOfPageAnchorClass">Back to Top</a></div> </li> <li id="slideNumber1" class="slideShowSlide"> <a name="before"></a> <div>We easily accomplish the first four bullet points under...<a href="#topOfPageAnchor" class="topOfPageAnchorClass">Back to Top</a></div> </li> </ul> jQuery On Page Load $(".slideShowSlide").each(function() { $(this).children(":first-child").hide(); }); jQuery to re-enable links $(".slideShowSlide").each(function() { $(this).children(":first-child").show(); });

    Read the article

  • jQuery check offset

    - by Glister
    HTML: <ul class="clients"> <li> <div class="over left">Description</div> <div class="inner">Image</div> </li> </ul> CSS: .clients { margin-right: -20px; } .clients li { float: left; width: 128px; height: 120px; margin: 0 20px 20px 0; border: 1px solid #c2c2c2; } .clients .over { display: none; position: absolute; width: 250px; font-size: 11px; line-height: 16px; background: #ecf5fb; margin: 3px 0 0 3px; padding: 18px; z-index: 25; } .clients .right { margin: 3px 0 0 -161px; } .clients .inner { width: 128px; height: 120px; overflow: hidden; } So, we have a list of floated squares and a popup blocks in each, which have absolute position. JS: jQuery(function($) { $('input[title!=""]').hint(); $(".clients li").bind('mouseover mouseout',function(){$(this).find("div.over").toggle()}); }); If over - show, else - hide. Quite ok, but it must be more advanced, we should catch an offset and give a class to .over block: if offset from right (corner of browser window) less than 150px, then add class "right" for a .over block. if offset from right more than 150px - add class "left" for a .over block. How can we do it?

    Read the article

  • RavenDB Ids and ASP.NET MVC3 Routes

    - by goober
    Hey all, Just building a quick, simple site with MVC 3 RC2 and RavenDB to test some things out. I've been able to make a bunch of projects, but I'm curious as to how Html.ActionLink() handles a raven DB ID. My example: I have a Document called "reasons" (a reason for something, just text mostly), which has reason text and a list of links. I can add, remove, and do everything else fine via my repository. Below is the part of my razor view that lists each reason in a bulleted list, with an Edit link as the first text: @foreach(var Reason in ViewBag.ReasonsList) { <li>@Html.ActionLink("Edit", "Reasons", "Edit", new { id = Reason.Id }, null) @Reason.ReasonText</li> <ul> @foreach (var reasonlink in Reason.ReasonLinks) { <li><a href="@reasonlink.URL">@reasonlink.URL</a></li> } </ul> } The Problem This works fine, except for the edit link. While the values and code here appear to work directly (i.e the link is firing directly), RavenDB saves my document's ID as "reasons/1". So, when the URL happens and it passes the ID, the resulting route is "http://localhost:4976/Reasons/Edit/reasons/2". So, the ID is appended correctly, but MVC is interpreting it as its own route. Any suggestions on how I might be able to get around this? Do I need to create a special route to handle it or is there something else I can do?

    Read the article

  • Why can I query with an int but not a string here? PHP MySQL Datatypes

    - by CT
    I am working on an Asset Database problem. I receive $id from $_GET["id"]; I then query the database and display the results. This works if my id is an integer like "93650" but if it has other characters like "wci1001", it displays this MySQL error: Unknown column 'text' in 'where clause' All fields in tables are of type: VARCHAR(50) What would I need to do to be able to use this query to search by id that includes other characters? Thank you. <?php <?php /* * ASSET DB FUNCTIONS SCRIPT * */ # connect to database function ConnectDB(){ mysql_connect("localhost", "asset_db", "asset_db") or die(mysql_error()); mysql_select_db("asset_db") or die(mysql_error()); } # find asset type returns $type function GetAssetType($id){ $sql = "SELECT asset.type From asset WHERE asset.id = $id"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($result); $type = $row['type']; return $type; } # query server returns $result (sql query array) function QueryServer($id){ $sql = " SELECT asset.id ,asset.company ,asset.location ,asset.purchaseDate ,asset.purchaseOrder ,asset.value ,asset.type ,asset.notes ,server.manufacturer ,server.model ,server.serialNumber ,server.esc ,server.warranty ,server.user ,server.prevUser ,server.cpu ,server.memory ,server.hardDrive FROM asset LEFT JOIN server ON server.id = asset.id WHERE asset.id = $id "; $result = mysql_query($sql); return $result; } # get server data returns $serverArray function GetServerData($result){ while($row = mysql_fetch_assoc($result)) { $id = $row['id']; $company = $row['company']; $location = $row['location']; $purchaseDate = $row['purchaseDate']; $purchaseOrder = $row['purchaseOrder']; $value = $row['value']; $type = $row['type']; $notes = $row['notes']; $manufacturer = $row['manufacturer']; $model = $row['model']; $serialNumber = $row['serialNumber']; $esc = $row['esc']; $warranty = $row['warranty']; $user = $row['user']; $prevUser = $row['prevUser']; $cpu = $row['cpu']; $memory = $row['memory']; $hardDrive = $row['hardDrive']; $serverArray = array($id, $company, $location, $purchaseDate, $purchaseOrder, $value, $type, $notes, $manufacturer, $model, $serialNumber, $esc, $warranty, $user, $prevUser, $cpu, $memory, $hardDrive); } return $serverArray; } # print server table function PrintServerTable($serverArray){ $id = $serverArray[0]; $company = $serverArray[1]; $location = $serverArray[2]; $purchaseDate = $serverArray[3]; $purchaseOrder = $serverArray[4]; $value = $serverArray[5]; $type = $serverArray[6]; $notes = $serverArray[7]; $manufacturer = $serverArray[8]; $model = $serverArray[9]; $serialNumber = $serverArray[10]; $esc = $serverArray[11]; $warranty = $serverArray[12]; $user = $serverArray[13]; $prevUser = $serverArray[14]; $cpu = $serverArray[15]; $memory = $serverArray[16]; $hardDrive = $serverArray[17]; echo "<table width=\"100%\" border=\"0\"><tr><td style=\"vertical-align:top\"><table width=\"100%\" border=\"0\"><tr><td colspan=\"2\"><h2>General Info</h2></td></tr><tr id=\"hightlight\"><td>Asset ID:</td><td>"; echo $id; echo "</td></tr><tr><td>Company:</td><td>"; echo $company; echo "</td></tr><tr id=\"hightlight\"><td>Location:</td><td>"; echo $location; echo "</td></tr><tr><td>Purchase Date:</td><td>"; echo $purchaseDate; echo "</td></tr><tr id=\"hightlight\"><td>Purchase Order #:</td><td>"; echo $purchaseOrder; echo "</td></tr><tr><td>Value:</td><td>"; echo $value; echo "</td></tr><tr id=\"hightlight\"><td>Type:</td><td>"; echo $type; echo "</td></tr><tr><td>Notes:</td><td>"; echo $notes; echo "</td></tr></table></td><td style=\"vertical-align:top\"><table width=\"100%\" border=\"0\"><tr><td colspan=\"2\"><h2>Server Info</h2></td></tr><tr id=\"hightlight\"><td>Manufacturer:</td><td>"; echo $manufacturer; echo "</td></tr><tr><td>Model:</td><td>"; echo $model; echo "</td></tr><tr id=\"hightlight\"><td>Serial Number:</td><td>"; echo $serialNumber; echo "</td></tr><tr><td>ESC:</td><td>"; echo $esc; echo "</td></tr><tr id=\"hightlight\"><td>Warranty:</td><td>"; echo $warranty; echo "</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr><tr><td colspan=\"2\"><h2>User Info</h2></td></tr><tr id=\"hightlight\"><td>User:</td><td>"; echo $user; echo "</td></tr><tr><td>Previous User:</td><td>"; echo $prevUser; echo "</td></tr></table></td><td style=\"vertical-align:top\"><table width=\"100%\" border=\"0\"><tr><td colspan=\"2\"><h2>Specs</h2></td></tr><tr id=\"hightlight\"><td>CPU:</td><td>"; echo $cpu; echo "</td></tr><tr><td>Memory:</td><td>"; echo $memory; echo "</td></tr><tr id=\"hightlight\"><td>Hard Drive:</td><td>"; echo $hardDrive; echo "</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr><tr><td colspan=\"2\"><h2>Options</h2></td></tr><tr><td colspan=\"2\"><a href=\"#\">Edit Asset</a></td></tr><tr><td colspan=\"2\"><a href=\"#\">Delete Asset</a></td></tr></table></td></tr></table>"; } ?> __ /* * View Asset * */ # include functions script include "functions.php"; $id = $_GET["id"]; if (empty($id)):$id="000"; endif; ConnectDB(); $type = GetAssetType($id); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> <title>Wagman IT Asset</title> </head> <body> <div id="page"> <div id="header"> <img src="images/logo.png" /> </div> </div> <div id="content"> <div id="container"> <div id="main"> <div id="menu"> <ul> <table width="100%" border="0"> <tr> <td width="15%"></td> <td width="30%%"><li><a href="index.php">Search Assets</a></li></td> <td width="30%"><li><a href="addAsset.php">Add Asset</a></li></td> <td width="25%"></td> </tr> </table> </ul> </div> <div id="text"> <ul> <li> <h1>View Asset</h1> </li> </ul> <?php if (empty($type)):echo "<ul><li><h2>Asset ID does not match any database entries.</h2></li></ul>"; else: switch ($type){ case "Server": $result = QueryServer($id); $ServerArray = GetServerData($result); PrintServerTable($ServerArray); break; case "Desktop"; break; case "Laptop"; break; } endif; ?> </div> </div> </div> <div class="clear"></div> <div id="footer" align="center"> <p>&nbsp;</p> </div> </div> <div id="tagline"> Wagman Construction - Bridging Generations since 1902 </div> </body> </html>

    Read the article

  • jQuery Accordion + OL + IE6 bug

    - by DA
    Sample page: http://jsbin.com/ohuze/2 This is a simple jQuery UI Accordion. Each accordion panel has an UL (an OL works the same) with this markup: <ol> <li><a href="">Lorep ipsum dolor lorem ipsum dolor lorem ipsum dolor</a>?</li> <li><a href="">Lorep ipsum dolor lorem ipsum dolor lorem ipsum dolor</a>?</li> </ol> In IE6, you'll see that the <a> tag appears to be getting rendered as a block element, so the question mark ends up being pushed outside and not at the end of the line of text. In addition, the bullet and/or list item number is now bottom-aligned with the text rather than top-aligned. I've narrowed it down to the javascript that executes to make the accordion. It's not an issue with jQuery's CSS as disabling that, alone, doesn't resolve the issue. Anyone know what might be going on in IE6 to cause this rendering issue? UPDATE: Apparently, this is also an IE7 issue.

    Read the article

  • PHP error problem.

    - by TaG
    I get the following error on line 8: Undefined index: real_name which is $privacy_policy = mysqli_real_escape_string($mysqli, $_POST['privacy_policy']); I was wondering how can I fix this problem? Here is the PHP. if (isset($_POST['submitted'])) { $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc = mysqli_query($mysqli,"SELECT users.* FROM users WHERE user_id=3"); $privacy_policy = mysqli_real_escape_string($mysqli, $_POST['privacy_policy']); if (mysqli_num_rows($dbc) == 0) { $mysqli = mysqli_connect("localhost", "root", "", "sitename"); $dbc = mysqli_query($mysqli,"INSERT INTO users (user_id, privacy_policy) VALUES ('$user_id', '$privacy_policy')"); } if ($dbc == TRUE) { $dbc = mysqli_query($mysqli,"UPDATE users SET privacy_policy = '$privacy_policy' WHERE user_id = '$user_id'"); echo '<p class="changes-saved">Your changes have been saved!</p>'; } if (!$dbc) { print mysqli_error($mysqli); return; } } Here is the HTML. <form method="post" action="index.php"> <fieldset> <ul> <li><input type="checkbox" name="privacy_policy" id="privacy_policy" value="yes" <?php if (isset($_POST['privacy_policy'])) { echo 'checked="checked"'; } else if($privacy_policy == "yes") { echo 'checked="checked"'; } ?> /></li> <li><input type="submit" name="submit" value="Save Changes" class="save-button" /> <input type="hidden" name="submitted" value="true" /> <input type="submit" name="submit" value="Preview Changes" class="preview-changes-button" /></li> </ul> </fieldset> </form>

    Read the article

  • jQuery XML loading and then innerfade effect

    - by Ryan Max
    Hello, I think I can explain myself without code, so for brevity's sake here we go: I am using jquery to pull data from an xml and put it into a ul on the page with each xml entry as a li. This is working great! However, what I am trying to do afterwards is use the innerfade plugin to make a simple animation between each of the li's. It's not working though, as it is still just loading the static list with each item visible (whereas if innerfade was working it would only display the first....then fade into the second, etc) It's not an innerfade problem however, because if I add the list in manually to the page (not injecting it with jquery) then the innerfade works fine. I'm relatively new to DOM scripting, so I think I am missing something here. I'm not quite sure how jQuery sequences everything, and I'm having trouble phrasing my question in a search engine friendly manner so here I am. Is it possible to have jquery pull the data from xml, then inject it into the page, then have innerfade work it's magic? Or am I thinking about this the wrong way? xml code: $.ajax({ type: "GET", url: "xml/playlist.xml", dataType: "xml", success: function(xml) { $(xml).find('song').each(function(){ var name = $(this).attr('title'); var date = $(this).attr('artist'); var message = $(this).attr('path'); $('<li></li>').html('<span id="an_name">'+name+'</span><span id="an_date">'+date+'</span><span id="an_message">'+message+'</span>').appendTo('#anniversary'); }); } }); innerfade code: <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready( function(){ jQuery('#anniversary').innerfade({ speed: 1000, timeout: 5000, type: 'sequence', }); });

    Read the article

  • jQuery tooltip: Trouble with remove()

    - by Rosarch
    I'm using a jQuery tooltip plugin. I have HTML like this: <li class="term ui-droppable"> <strong>Fall 2011</strong> <li class="course ui-draggable">Biological Statistics I<a class="remove-course-button" href="">[X]</a></li> <div class="term-meta-data"> <p class="total-credits too-few-credits">Total credits: 3</p> <p class="median-GPA low-GPA">Median Historical GPA: 2.00</p> </div> </li> I want to remove the .course element. So, I attach a click handler to the <a>: function _addDeleteButton(course, term) { var delete_button = $('<a href="" class="remove-course-button" title="Remove this course">[X]</a>'); course.append(delete_button); $(delete_button).click(function() { course.remove(); return false; }).tooltip(); } This all works fine, in terms of attaching the click handler. However, when course.remove() is called, Firebug reports an error in tooltip.js: Line 282 tsettings is null if ((!IE || !$.fn.bgiframe) && tsettings.fade) { What am I doing wrong? If the link has a tooltip attached, do I need to remove it specially? UPDATE: Removing .tooltip() solve the problem. I'd like to keep it in, but that makes me suspect that my use of .tooltip() is incorrect here.

    Read the article

  • background image not showing in html

    - by Registered User
    I am having following css <!DOCTYPE html > <html> <head> <meta charset="utf-8"> <title>Black Goose Bistro Summer Menu</title> <link href='http://fonts.googleapis.com/css?family=Marko+One' rel='stylesheet' type='text/css'> <style> body { font-family: Georgia, serif; font-size: 100%; line-height: 175%; margin: 0 15% 0; background-image:url(images/bullseye.png); } #header { margin-top: 0; padding: 3em 1em 2em 1em; text-align: center; } a { text-decoration: none; } h1 { font: bold 1.5em Georgia, serif; text-shadow: .1em .1em .2em gray; } h2 { font-size: 1em; text-transform: uppercase; letter-spacing: .5em; text-align: center; } dt { font-weight: bold; } strong { font-style: italic; } ul { list-style-type: none; margin: 0; padding: 0; } #info p { font-style: italic; } .price { font-family: Georgia, serif; font-style: italic; } p.warning, sup { font-size: small; } .label { font-weight: bold; font-variant: small-caps; font-style: normal; } h2 + p { text-align: center; font-style: italic; } ); </style> </head> <body> <div id="header"> <h1>Black Goose Bistro &bull; Summer Menu</h1> <div id="info"> <p>Baker's Corner, Seekonk, Massachusetts<br> <span class="label">Hours: Monday through Thursday:</span> 11 to 9, <span class="label">Friday and Saturday;</span> 11 to midnight</p> <ul> <li><a href="#appetizers">Appetizers</a></li> <li><a href="#entrees">Main Courses</a></li> <li><a href="#toast">Traditional Toasts</a></li> <li><a href="#dessert">Dessert Selection</a></li> </ul> </div> </div> <div id="appetizers"> <h2>Appetizers</h2> <p>This season, we explore the spicy flavors of the southwest in our appetizer collection.</p> <dl> <dt>Black bean purses</dt> <dd>Spicy black bean and a blend of mexican cheeses wrapped in sheets of phyllo and baked until golden. <span class="price">$3.95</span></dd> <dt class="newitem">Southwestern napoleons with lump crab &mdash; <strong>new item!</strong></dt> <dd>Layers of light lump crab meat, bean and corn salsa, and our handmade flour tortillas. <span class="price">$7.95</span></dd> </dl> </div> <div id="entrees"> <h2>Main courses</h2> <p>Big, bold flavors are the name of the game this summer. Allow us to assist you with finding the perfect wine.</p> <dl> <dt class="newitem">Jerk rotisserie chicken with fried plantains &mdash; <strong>new item!</strong></dt> <dd>Tender chicken slow-roasted on the rotisserie, flavored with spicy and fragrant jerk sauce and served with fried plantains and fresh mango. <strong>Very spicy.</strong> <span class="price">$12.95</span></dd> <dt>Shrimp sate kebabs with peanut sauce</dt> <dd>Skewers of shrimp marinated in lemongrass, garlic, and fish sauce then grilled to perfection. Served with spicy peanut sauce and jasmine rice. <span class="price">$12.95</span></dd> <dt>Grilled skirt steak with mushroom fricasee</dt> <dd>Flavorful skirt steak marinated in asian flavors grilled as you like it<sup>*</sup>. Served over a blend of sauteed wild mushrooms with a side of blue cheese mashed potatoes. <span class="price">$16.95</span></dd> </dl> </div> <div id="toast"> <h2>Traditional Toasts</h2> <p>The ultimate comfort food, our traditional toast recipes are adapted from <a href="http://www.gutenberg.org/files/13923/13923-h/13923-h.htm"><cite>The Whitehouse Cookbook</cite></a> published in 1887.</p> <dl> <dt>Cream toast</dt> <dd>Simple cream sauce over highest quality toasted bread, baked daily. <span class="price">$3.95</span></dd> <dt>Mushroom toast</dt> <dd>Layers of light lump crab meat, bean and corn salsa, and our handmade flour tortillas. <span class="price">$6.95</span></dd> <dt>Nun's toast</dt> <dd>Onions and hard-boiled eggs in a cream sauce over buttered hot toast. <span class="price">$6.95</span></dd> <dt>Apple toast</dt> <dd>Sweet, cinnamon stewed apples over delicious buttery grilled bread. <span class="price">$6.95</span></dd> </dl> </div> <div id="dessert"> <h2>Dessert Selection</h2> <p>Be sure to save room for our desserts, made daily by our own <a href="http://www.jwu.edu/college.aspx?id=19510">Johnson & Wales</a> trained pastry chef.</p> <dl> <dt class="newitem">Lemon chiffon cake &mdash; <strong>new item!</strong></dt> <dd>Light and citrus flavored sponge cake with buttercream frosting as light as a cloud. <span class="price">$2.95</span></dd> <dt class="newitem">Molten chocolate cake</dt> <dd>Bubba's special dark chocolate cake with a warm, molten center. Served with or without a splash of almond liqueur. <span class="price">$3.95</span></dd> </dl> </div> <p class="warning"><sup>*</sup> We are required to warn you that undercooked food is a health risk.</p> </body> </html> but the background image does not appear in body tag you can see background-image:url(images/bullseye.png); this html page is bistro.html and the directory in which it is contained there is a folder images and inside images folder I have a file bullseye.png .I expect the png to appear in background.But that does not happen. For sake of question I am posting the image here also Let me know if the syntax of css wrong? following is image http://i.stack.imgur.com/YUKgg.png

    Read the article

  • jQuery Autocomplete with _renderItem and catagories

    - by LillyPop
    As a newb to jQuery im wondering if its possible to have both jQuery _renderItem (for custom list item HTML/CSS) AND the categories working together in harmony? Ive got my _renderItem working great but I have no idea how to incorporate categories into the mix. My code so far $(document).ready(function () { $(':input[data-autocomplete]').each(function () { $(':input[data-autocomplete]').autocomplete({ source: $(this).attr("data-autocomplete") }).data("autocomplete")._renderItem = function (ul, item) { var MyHtml = "<a>" + "<div class='ac' >" + "<div class='ac_img_wrap' >" + '<img src="../../uploads/' + item.imageUrl + '.jpg"' + 'width="40" height="40" />' + "</div>" + "<div class='ac_mid' >" + "<div class='ac_name' >" + item.value + "</div>" + "<div class='ac_info' >" + item.info + "</div>" + "</div>" + "</div>" + "</a>"; return $("<li></li>").data("item.autocomplete", item).append(MyHtml).appendTo(ul); }; }); }); The jQuery documentation for the autocomplete gives the following code example : $.widget("custom.catcomplete", $.ui.autocomplete, { _renderMenu: function (ul, items) { var self = this, currentCategory = ""; $.each(items, function (index, item) { if (item.category != currentCategory) { ul.append("<li class='ui-autocomplete-category'>" + item.category + "</li>"); currentCategory = item.category; } self._renderItem(ul, item); }); } }); Id like to get my custom HTML (_renderItem) and categories working together, can anyone help me to merge these two together or point me in the right direction. Thanks

    Read the article

  • Scriptaculous problem in IE

    - by Django Reinhardt
    Hi there. We've got this very annoying problem with Scriptaculous and Internet Explorer 7/8. We have two Effect.toggles on the same page, but only one of them is ever working (the first one). I hope it's some simple mistake in my implementation, but I can't seem to find any decent documentation. Hopefully somebody here can help. The HTML/JS looks like this: <ul> <li id="LinkA" class="icon"> <a onclick="new Effect.toggle('divA', 'slide', { duration: 0.6 }); return false;" href="#">Show List A</a> </li> </ul> <div id="divA" style="display:none"> <div> -- Things to display -- </div> </div> <ul> <li id="LinkB" class="icon"> <a onclick="new Effect.toggle('divB', 'slide', { duration: 0.6 }); return false;" href="#">Show List B</a> </li> </ul> <div id="divB" style="display:none"> <div> -- Things to display -- </div> </div> It works perfectly in Chrome and Firefox, but the second one never works in IE 7 or 8, no matter what I do. Any help would be greatly appreciated!

    Read the article

  • ambient values in mvc2.net routing

    - by Muhammad Adeel Zahid
    Hello Everyone, i have following two routes registered in my global.asax file routes.MapRoute( "strict", "{controller}.mvc/{docid}/{action}/{id}", new { action = "Index", id = "", docid = "" }, new { docid = @"\d+"} ); routes.MapRoute( "default", "{controller}.mvc/{action}/{id}", new { action = "Index", id = "" }, new { docConstraint = new DocumentConstraint() } ); and i have a static "dashboard" link in my tabstrip and some other links that are constructed from values in db here is the code <ul id="globalnav" class = "t-reset t-tabstrip-items"> <li class="bar" id = "dashboard"> <%=Html.ActionLink("dash.board", "Index", pck.Controller, new{docid =string.Empty,id = pck.PkgID }, new { @class = "here" })%> </li> <% foreach (var md in pck.sysModules) { %> <li class="<%=liClass%>"> <%=Html.ActionLink(md.ModuleName, md.ActionName, pck.Controller, new { docid = md.DocumentID}, new { @class = cls })%> </li> <% } %> </ul> Now my launching address is localhost/oa.mvc/index/11 clearly matching the 2nd route. but when i visit any page that has mapped to first route and then come back to dash.board link it shows me localhost/oa.mvc/7/index/11 where 7 is docid and picked from previous Url. now i understand that my action method is after docid and changing it would not clear the docid. my question here is that can i remove docid in this scenario without changing the route. regards adeel

    Read the article

  • jQuery Ajax load images problem

    - by jackysee
    I have a code that would call $.load() to get an HTML fragment. In the fragment there will be a list of images and a script that would do some calculation based on the list size. The fragment looks like <div> <ul> <li><img .../></li> <li><img .../></li> ... </ul> </div> <script> //... script to do calculation on the list width </script> Originally, I use css's max-width to ensure that the image would not exceed 180px. But as IE has no max-width, I use the expression hack. However, it seems when the image are first load, the script cannot get a correct width of image list. Seems like the script load earlier than the CSS expression. If it is a new page, I can certainly call $(window).load() to ensure all the images are loaded. But what can I do in an ajax html fragment request?

    Read the article

  • Problem with my Jquery loading in my Codeigniter views

    - by sico87
    Hello, I am working on a one page website that allows the users to add and remove pages from there navigation as and when they would like too, the way it works is that if the click 'Blog' on the main nav a 'Blog' section should appear on the page, if they then click 'News' the 'News' section should also be visible, however the way I have started to implement this it seems I can only have one section at a time, can my code be adpated to allow multiple sections to shown on the main page. Here is my code for the page that has the main menu and the users selections on it. <!DOCTYPE html> <head> <title>Development Site</title> <link rel="stylesheet" href="/media/css/reset.css" media="screen"/> <link rel="stylesheet" href="/media/css/generic.css" media="screen"/> <script type="text/javascript" src="/media/javascript/jquery-ui/js/jquery.js"></script> <script type="text/javascript" src="/media/javascript/jquery-ui/development-bundle/ui/ui.core.js"></script> <script type="text/javascript" src="/media/javascript/jquery-ui/development-bundle/ui/ui.accordion.js"></script> <script type="text/javascript"> $(document).ready(function() { $('a.menuitem').click(function() { var link = $(this), url = link.attr("href"); $("#content_pane").load(url); return false; // prevent default link-behavior }); }); </script> </head> <body> <li><a class="menuitem" href="inspiration">Inspiration</a></li> <li><a class="menuitem" href="blog">Blog</a></li> <div id="content_pane"> </div> </body> </html>

    Read the article

  • photo upload with codeigniter

    Hi friends, I know there are many tutorials online, but I could not make them work :( maybe something particularly wrong with my system :/ My Controller localpath is: /localhost/rl/applications/backend/controller/ Controller: function do_upload() { $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '100'; $config['max_width'] = '1024'; $config['max_height'] = '768'; $this->load->library('upload', $config); if ( ! $this->upload->do_upload()) { $error = array('error' => $this->upload->display_errors()); $this->load->view('add_image', $error); } else { $data = array('upload_data' => $this->upload->data()); $data['id'] = $this->input->post['id_work']; $this->load->view('add_image', $data); } } My View localpath is: /localhost/rl/applications/backend/view/ View: echo form_open_multipart('do_upload'); <ul class="frm"> <li><label>File: *</label><input type="file" name="userfile" class="frmlmnt" size="50" /></li> <li><label></label><input type="submit" class="btn" value="Upload" /></li> </ul> </form> Maybe I do something wrong with path

    Read the article

  • How would i go about showing the closest paragraph element to a unique link with jQuery?

    - by Nike
    The title is a bit rusty, sorry about that. Now let me explain what i'm trying to do. I have a few listed items, like this: <li> <a id="toggle" class="0"><h4>ämne<small>2010-04-17 kl 12:54</small></h4></a> <p id="meddel" class="0">text</p> </li> <li class='odd'> <a id="toggle" class="1"><h4>test<small>2010-04-17 kl 15:01</small></h4></a> <p id="meddel" class="1">test meddelande :) [a]http://youtube.com[/a]</p> </li> The function i'm trying to achieve, is that when a user clicks a "toggle" link (the h4 text), i want the paragraph element below it to fade in. I thought of the idea of giving both the toggle link and the paragraph the same class, and then somehow make it get the paragraph with the same class as the toggle link clicked, and show it? But i'm not entirely sure how to do that either, and tbh, it doesn't sound like the greatest idea, but maybe that's the only way? I don't know... Is there some way to just simply get the nearest paragraph (below the link) with the id "meddel" and fade it in? That sounds a bit easier... I hope you can at least give me a few hints. Thanks in advance, -Nike

    Read the article

  • javascript onmouseover hide a div block

    - by Loki
    SO this is my code so far: JS: <script type="text/javascript"> function Hide(srcField) { var x = srcField.getAttribute('name'); var string = new RegExp("hide_ID",'gi'); switch (x) { case "1": var dataRows= document.getElementsByID("obrazovanje"); alert (dataRows[0].innerHTML); dataRows[0].className.replace('',string); break; case "2": var dataRows= document.getElementsByID("rad_iskustvo"); dataRows[0].className.replace('',string); break; case "3": var dataRows= document.getElementsByID("strani_jezici"); dataRows[0].className.replace('',string); break; case "4": var dataRows= document.getElementsByID("znanja_vjestine"); dataRows[0].className.replace('',string); break; case "5": var dataRows= document.getElementsByID("osobine_interesi"); dataRows[0].className.replace('',string); break; } } </script> CSS: .hide_ID, { display:none } HTML: <a name="1"><h4><span name="1" onmouseover="Hide(this)">OBRAZOVANJE:</span></h4></a> <div ID="obrazovanje"> <ul> <li>2001.-2005. elektrotehnicar</li> <li>2009.-2012. racunarstvo</li> </ul> </div> the idea is that i want to hide the div block when i hover over the title that's in h4, but it doesn't seem to hide it... any ideas? i started using replace but it still didn't work, before that it was just 'dataRows[0].className = "hide_ID"' but that didn't work either.

    Read the article

  • jQuery .html not writing span on page load, rights the span on ajax response

    - by pedalpete
    I've got a bit of a calendar I'm building with events that go beyond the boundary of one day. I've got a graph which shows how many events are running concurrently. In order to graph out the events which go into another day, I look for hours24, and run an extra bit of code. jQuery('li#hour'+placeGroup+'_'+schedDay2+'_'+thisHour,nextDay).data('count', numStaff).html(''+printHour+''+numEvents+' scheduled').css('height',numEvents*5+'px'); The code is working, the li items are being found, proper height is the css is being applied, data is set, which I've checked by running alert(jQuery('li#hour'+placeGroup+'_'+schedDay2+'_'+thisHour,nextDay).data('count')); right after the pervious bit of code. The only thing that isn't being done is the .html(add span) stuff. I run this code in two places. Once when the page loads, and once when an action is taken which changes the number of events via an ajax response. The li DOM object I'm writting to is created before the script is run, and the height is being applied, but not the span, and only on page load. Any ideas on this one? I'm stumped.

    Read the article

  • Wordpress Event list

    - by kwek-kwek
    Hi I have followed a tutorial to create and event list in wordpress using post and Custom Fields view demo here is my code: <?php // Get today's date in the right format $todaysDate = date('M d'); ?> <?php query_posts('showposts=5&category_name=events&meta_key=Date&meta_compare=>=&meta_value='.$todaysDate.'&orderby=meta_value=order=ASC'); ?> <ul> <?php if (have_posts()) : while (have_posts()) : the_post(); $eventMeta = get_post_meta($post->ID, 'Date', true); $eventDate = strtotime($eventMeta); $displayDate = date ('M d', $eventDate);?> <li> <span class="date"><?php echo $displayDate ; ?></span> <span><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span> </li> <?php endwhile; else: ?> <li>Sorry, no upcoming events!</li> <?php endif; ?> </ul> <?php wp_reset_query(); ?> Now my problem is that it doesn't show any events for the future events e.g. (June, July etc. ...). On one of the the discussion there someone had said about putting "In your query_posts, just use the parameter ‘post_status=future’ ". Can you please let me know exactly where? I have added it but nothing happened.

    Read the article

  • juqery image fading with tabs

    - by StealthRT
    Hey all, i am trying my best to figure out how to go about doing this: I have 2 tabs. When the page loads tab1 is selected automatically. This shows the tab as 1.0 transparency while tab2 stays at 0.7. Once the user clicks on tab2, tab1 goes to 0.7 transparency and tab2 goes to 1.0. However, i can not seem to get it to do that! Here is my code: function checkTab(theTab) { $('#tab1').fadeTo(250, 0.70); $('#tab2').fadeTo(250, 0.70); if ($("#tabActive").val() == theTab) { $(theTab).fadeTo(250, 1); } } $(document).ready(function() { $('#tab1').hover(function() {$(this).fadeTo(250, 1)}, function() {checkTab('#tab1')}); $('#tab2').hover(function() {$(this).fadeTo(250, 1)}, function() {checkTab('#tab2')}); $('#tab2').fadeTo(250, 0.70); $('#tabActive').val('tab1'); }); </script> <li class="stats"><img src="images/Stats.png" name="nav1" width="70" height="52" id="tab1" onclick="$('#tabActive').val('tab1');" /></li> <li class="cal"><img src="images/cal.png" name="nav1" width="70" height="52" id="tab2" onclick="$('#tabActive').val('tab2');" /></li> <input name="tabActive" id="tabActive" type="text" /> Any help would be great! :) David

    Read the article

  • jquery image fading with tabs

    - by StealthRT
    Hey all, i am trying my best to figure out how to go about doing this: I have 2 tabs. When the page loads tab1 is selected automatically. This shows the tab as 1.0 transparency while tab2 stays at 0.7. Once the user clicks on tab2, tab1 goes to 0.7 transparency and tab2 goes to 1.0. However, i can not seem to get it to do that! Here is my code: <script type="text/javascript"> function checkTab(theTab) { $('#tab1').fadeTo(250, 0.70); $('#tab2').fadeTo(250, 0.70); if ($("#tabActive").val() == theTab) { $(theTab).fadeTo(250, 1); } } $(document).ready(function() { $('#tab1').hover(function() {$(this).fadeTo(250, 1)}, function() {checkTab('#tab1')}); $('#tab2').hover(function() {$(this).fadeTo(250, 1)}, function() {checkTab('#tab2')}); $('#tab2').fadeTo(250, 0.70); $('#tabActive').val('tab1'); }); </script> <li class="stats"><img src="images/Stats.png" name="nav1" width="70" height="52" id="tab1" onclick="$('#tabActive').val('tab1');" /></li> <li class="cal"><img src="images/cal.png" name="nav1" width="70" height="52" id="tab2" onclick="$('#tabActive').val('tab2');" /></li> <input name="tabActive" id="tabActive" type="text" /> Any help would be great! :) David

    Read the article

  • How can I map stored procedure result into a custom class with linq-to-sql?

    - by Remnant
    I have a stored procedure that returns a result set (4 columns x n Rows). The data is based on multiple tables within my database and provides a summary for each department within a corporate. Here is sample: usp_GetDepartmentSummary DeptName EmployeeCount Male Female HR 12 5 7 etc... I am using linq-to-sql to retrieve data from my database (nb - have to use sproc as it is something I have inherited). I would like to call the above sproc and map into a department class: public class Department { public string DeptName {get; set;} public int EmployeeCount {get; set;} public int MaleCount {get; set;} public int FemaleCount {get; set;} } In VS2008, I can drag and drop my sproc onto the methods pane of the linq-to-sql designer. When I examine the designer.cs the return type for this sproc is defined as: ISingleResult<usp_GetDepartmentSummaryResult> What I would like to do is amend this somehow so that it returns a Department type so that I can pass the results of the sproc as a strongly typed view: <% foreach (var dept in Model) { %> <ul> <li class="deptname"><%= dept.DeptName %></li> <li class="deptname"><%= dept.EmployeeCount %></li> etc... Any ideas how to achieve this? NB - I have tried amending the designer.cs and dbml xml file directly but with limited success. I admit to being a little out of my depth when it comes to updating those files directly and I am not sure it is best practice? Would be good to get some diretion. Thanks much

    Read the article

< Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >