Search Results

Search found 2593 results on 104 pages for 'span'.

Page 5/104 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • C# regex innert text between td, span, a tag

    - by mushtaq
    <table > <tr> <td colspan="2" style="height: 14px"> tdtext1 <a>hyperlinktext1<a/> </td> </tr> <tr> <td> tdtext2 </td> <td> <span>spantext1</span> </td> </tr> </table> This is my sample text how to write a regular expression in C# to get the matches for the innertext for td, span, hyperlinks. Thanks everyone.

    Read the article

  • How to unpack htmlAttributes in a span tag in ASP.NET MVC

    - by sleepy
    I have htmlAttributes generated - originally for the purpose of creating a link with the attribute using Html.ActionLink. Now, based on some condition, I would like to create a <span> tag instead and put the attributes in there. Is there anyway it can be done easily ? Eg: something like: <span <%= htmlAttributes.Unpack() %> > Some txt </span> OR <%= Html.SpanTag("Some txt", htmlAttributes) %> OR anything similar without wresling too much with the already generated htmlAttribues? Thanks

    Read the article

  • SPAN inside A inside H1 display in Chrome 5

    - by devils-avacado
    <h1> <a>Lorem ipsum <span>dolor</span> </a> </h1> In Chrome the contents of the SPAN have a line break in front of them, "dolor" is displayed on the line below, even with display:inline explicitly set. Expected it to display on same line as "Lorem ipsum". Displays fine in IE8 and FF3.5. Any fixes? Chrome 5.0.375.38 on Win7 x64

    Read the article

  • Add links to specific words within span tag in PHP

    - by dazhall
    I have a list of words that I'd like to add a link to, I can do this fairly easily using preg_match_all and preg_replace: $str = "<span class=\"cz\">Dám si jedno pivo prosím.</span> = I'll have a beer please."; preg_match_all('/[a-ztúuýžácdéeínórš]+/i',$str,$matches); $matches = array_unique($matches[0]); foreach ($matches as $match) { if(!empty($words[$match])) { $str = preg_replace("/(^|[^\w]){1}(".preg_quote($match,"/").")($|[^\w]){1}/i", '\\1<a href="#">\\2</a>\\3', $str); } } echo $str; What I'd like to do is restrict the linking to only within the span tag. My brain is all regex-ed out, so any help would be appreciated! Thanks! Darren.

    Read the article

  • javascript code not working with jquery, I will be using php as my server side language.

    - by Shantanu Gupta
    I am trying to call my function named isUrgencyTypeValid from my javascript code but it is not working. Please check what is the problem in my code. My javascript function is not being called. HTML Code <td colspan="2" align="center"><input id="btnSubmit" type="submit" value="submit" runat="server"/></td></tr> jQuery Call function $("#btnSubmit").bind("click",function(){ isUrgencyTypeValid(); }); javascript implemented function function isUrgencyTypeValid() { alert("asd"); var i=0; for(i=0;i<$("radio[name='urgencyType']").length;i++) { if($("radio[name='urgencyType']")[i].checked) { alert($("radio[name='urgencyType']")[i].value); return true; } return false; } More description about my form is here <form runat="server" name="myPage"> <table style="width: 100%;" cellpadding="5" cellspacing="5"> <caption> Computer Support / Service Request </caption> <tr><td>First Name</td> <td><input id="txtFirstName" type="text" value="First Name" runat="server"/><span class="error"></span></td></tr> <tr> <td>Last Name</td> <td><input id="txtLastName" type="text" value="Last Name" runat="server"/><span class="error"></span></td></tr> <tr> <td>Email Address</td> <td><input id="txtEmailAddress" type="text" value="Email Address" runat="server"/><span class="error"></span></td></tr> <tr> <td>Phone No</td> <td><input id="txtPhoneNo" type="text" value="Phone No" runat="server" /><span class="error"></span></td></tr> <tr> <td>Do you have text messaging</td> <td> <span>Yes</span><input id="rdoYes" value="Yes" type="radio" runat="server"/> <span>No</span><input id="rdoNo" value="No" type="radio" runat="server"/><span class="error"></span> </td></tr> <tr> <td>Description of request*: </td> <td><textarea id="txtDescription" cols="50" rows="10" runat="server"></textarea><span class="error"></span><span id="lengthCount"></span></td></tr> <tr> <td>Urgency of this support request:</td> <td> <input id="rdoAnyTime" name="urgencyType" value="Anytime" type="radio" runat="server"/><span>Anytime</span><br /> <input id="rdoCplDays" name="urgencyType" value="In the next couple of days" type="radio" runat="server"/><span>In the next couple of days</span><br /> <input id="rdoToday" name="urgencyType" value="Today" type="radio" runat="server"/><span>Today</span><br /> <input id="rdoUrgent" name="urgencyType" value="This is extremely urgent...I cannot wait!" type="radio" runat="server"/><span>This is extremely urgent...I cannot wait!</span><br /> <input id="rdoTalkSometime" name="urgencyType" value="Please contact me and we'll talk about it" type="radio" runat="server"/><span>Please contact me and we'll talk about it</span><br /><span class="error"></span> </td></tr> <tr> <td colspan="2" align="center">Captcha To Be implemented.</td></tr> <tr> <td></td> <td><input id="chkRequestCopy" type="checkbox" runat="server"/>Please send me a copy of this service request</td></tr> <tr> <td colspan="2" align="center"><input id="btnSubmit" type="submit" value="submit" runat="server"/></td></tr> </table> </form>

    Read the article

  • Take <span> class and put in <a> attribute jquery

    - by Toktik
    Hello, I have html like this. <span class="gallery-open-item year-icon-Yes 2010"> <a href="/year/none"> </a> </span> I need to check by jquery if span.gallery-open-item have year-icon-Yes class take next(for this example is 2010) class and place it in a href attribute like this All this I need in jQuery or JavaScript. I have done some experiments but I can't take 2010 to normal javascript variable. Any ideas? Sorry for my english.

    Read the article

  • c# .net framework subtracting time-span from date

    - by smkngspcmn
    I want to subtract a time-span from a date-time object. Date is 1983/5/1 13:0:0 (y/m/d-h:m:s) Time span is 2/4/28-2:51:0 (y/m/d-h:m:s) I can use the native DateTime and TimeSpan objects to do this, after converting years and months of the time-span to days (assuming a 30 day month and a ~364 day year). new DateTime(1981,5,1,13,0,0).Subtract(new TimeSpan(878,13,51,0)); With this i get the result: {12/4/1978 11:09:00 PM} But this is not exactly what i expected. If i do this manually (assuming a 30 day month) i get 1981/0/3-10:9:0 This is pretty close to what i'm after except i shouldn't get 0 for month and year should be 1980. So can someone please show me how i can do this manually and avoid getting a 0 month value? Also why do i get a completely different value when i use native classes?

    Read the article

  • .NET regex inner text between td, span, a tag

    - by mushtaqck
    <table > <tr> <td colspan="2" style="height: 14px"> tdtext1 <a>hyperlinktext1<a/> </td> </tr> <tr> <td> tdtext2 </td> <td> <span>spantext1</span> </td> </tr> </table> This is my sample text how to write a regular expression in C# to get the matches for the innertext for td, span, hyperlinks.

    Read the article

  • Is span monitoring on Cisco ASA 5520 possible?

    - by Brent
    From what I have read, you can use the switchport monitor command on ASA 5505's to setup a Span port due to the back of the ASA actually being a switch. On my 5520, I do not see the switchport command listed when issuing a ? via the CLI. How do people monitor traffic on non-5505's? My goal is to connect our IDS/IPS device that is running is promiscuous mode to a Ethernet port on the 5520 to monitor WAN traffic. I do not want to have to pass the WAN traffic through a switch as it would require me to get two (for redundancy) STP/switchport capable switches. Guide to setting up switchport access on a 5505: http://www.wr-mem.com/?p=66

    Read the article

  • How can I make a div expand on click with only one open at a time?

    - by imHavoc
    As shown in here: http://www.learningjquery.com/2007/03/accordion-madness. But I need help to edit it so that it will work for my circumstances. Sample HTML <div class="row even"> <div class="info"> <div class="class">CK1</div> <div class="teacher_chinese">??</div> <div class="teacher_english">Teacher Name</div> <div class="assistant_chinese">??</div> <div class="assistant_english">Assistant Name</div> <div class="room">Room 00</div> <div class="book"></div> </div> <div class="chapters"> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=1"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=2"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=3"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=4"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=5"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=6"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=7"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=8"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=9"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=10"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=11"><span class="chapter">??</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=12"><span class="chapter">??</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=13"><span class="chapter">??</span></a> </div> </div> JQUERY [Work In Progress] $(document).ready(function() { $('div#table_cantonese .chapters').hide(); $('div#table_cantonese .book').click(function() { var $nextDiv = $(this).next(); var $visibleSiblings = $nextDiv.siblings('div:visible'); if ($visibleSiblings.length ) { $visibleSiblings.slideUp('fast', function() { $nextDiv.slideToggle('fast'); }); } else { $nextDiv.slideToggle('fast'); } }); }); So when the end-user click on div.book, div.chapters will expand. And only one div.chapters will be shown at a time. So if a div.chapters is already open, then it will close the open one first before animating the one the user clicked on.

    Read the article

  • Pass existing model into AJAX PartialViewResult

    - by Joe
    I’m using AJAX to asynchronously update a partial view and need to pass the existing model into the partial view. Controller Action public ActionResult Edit(int id) { var vM = new MyViewModel(); // vM is viewModel return View(vM); } Edit View @using (Html.BeginForm()) { @Html.ValidationSummary(true) ... <span id = "Ship"> @Html.Partial("AJAX_Views/_Ship")</span> _Ship Partial View @model MyProject.ViewModels.MyViewModel <table class="detailtable" style="min-width:398px"> <tr> <th style="padding-left:132px" colspan="2"> <span class="editor-label">Shipping&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Address</span> <span class="editor-label" style="padding-left:55px"> @Ajax.ActionLink("Delete", "SHIPDEL", new AjaxOptions { UpdateTargetId = "Ship", InsertionMode = InsertionMode.Replace, HttpMethod = "Get" })</span> <tr><th style="min-width:152px"><span class="editor-label">Street:</span></th> @Html.HiddenFor(m => m.CmpAdrsSh.Id) @Html.HiddenFor(m => m.CmpAdrsSh.CompPersonId) @Html.HiddenFor(m => m.CmpAdrsSh.IsShip) <td><span class="editor-field">@Html.EditorFor(m => m.CmpAdrsSh.Street) @Html.ValidationMessageFor(m => m.CmpAdrsSh.Street) </span></td></tr> <tr><th><span class="editor-label">City:</span></th> <td><span class="editor-field">@Html.EditorFor(m => m.CmpAdrsSh.City) @Html.ValidationMessageFor(m => m.CmpAdrsSh.City) </span></td></tr> <tr><th><span class="editor-label">State:</span></th> <td><span class="editor-field">@Html.DropDownList("CmpAdrsSh.State", (IEnumerable<SelectListItem>)ViewBag._State) @Html.ValidationMessageFor(m => m.CmpAdrsSh.State) </span></td></tr> <tr><th><span class="editor-label">Zip:</span></th> <td><span class="editor-field">@Html.EditorFor(m => m.CmpAdrsSh.Zip) @Html.ValidationMessageFor(m => m.CmpAdrsSh.Zip) </span></td></tr> _ShipDel Partial View @model MyProject.ViewModels.MyViewModel <table class="detailtable" style="min-width:398px"> <tr> <th style="padding-left:132px" colspan="2"> <span class="editor-label">Shipping&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Address</span> <span class="editor-label" style="padding-left:10px; color:red">Marked for Deletion.</span></th></tr> <tr><td>To not Delete Select Cancel below!</td></tr> @Html.HiddenFor(m => m.CmpAdrsSh.Street) @Html.HiddenFor(m => m.CmpAdrsSh.City) @Html.HiddenFor(m => m.CmpAdrsSh.State) @Html.HiddenFor(m => m.CmpAdrsSh.Zip) Controller PartialViewResult Action public PartialViewResult SHIPDEL() { return PartialView("AJAX_Views/_ShipDel"); } I tried adding this.ModelState to the Action but then the view will not render. I'm guessing I somehow have to pass the model to the SHIPDEL Action first. I couldn't find an @Ajax.ActionLink overload that would allow this. public PartialViewResult SHIPDEL() { return PartialView("AJAX_Views/_ShipDel", this.ModelState); } In the _ShipDel Partial View I need to expose the CmpAdrsSh properties so the model validates in the POST Action. The model is empty at this point. How do I pass the existing vM model into the _ShipDel partial view? Thank you,

    Read the article

  • How to use semantic markup and Google Places to assist in local search SEO?

    - by ElHaix
    In this article, adding additional localized markup is supposed to help your site's SEO. ie. <div itemscope itemtype="http://data-vocabulary.org/Organization"> <span itemprop="name">Search Engine People</span> <span itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address"> <span itemprop="street-address">100 Westney Road South Unit 200, Building E</span> <span itemprop="locality">Ajax</span>, <span itemprop="region">ON</span> <span itemprop="country-name">Canada</span> <span itemprop="postal-code">L1S 7H3</span> </div> What about a site that contains valid localized results, where the actual business location is not relevant. For example, a site with valid local results from San Francisco, CA and Phoenix, AZ. Should these tags be added to the localized results, and has anyone got any experience with how much adding these tags have improved results? In terms of Google Places, however, they seem to ask for the business' actual physical location. Is there a way to use Google Places in the aforementioned example to assist in SEO?

    Read the article

  • How to show / hide all tags with the same class with Java Script?

    - by Roger
    I need a javascrit function that shows/hides all span tags with a specific class (t1, t2 or t3) in a HTML document. Example: <script type="text/javascript"> <!-- function sh(t){//show_hide(text number class) //??? } //--> </script> <div id='C'> <p> <span class="P"> Normal allways visible text. <span class="t1">Text 1</span> <span class="t2">Text 2</span> <span class="t3">Text 3</span> Normal allways visible text. <span> </p> <p> <span class="P"> Normal allways visible text. <span class="t1">Text 1</span> <span class="t2">Text 2</span> <span class="t3">Text 3</span> Normal (allways visible text. <span> </p> <p><span>Normal allways visible text.</span></p> </div> The function sh (show hide) could be trigerred like this: <p>Show: <a href="#" onclick="sh('t1');">text 1</a> | <a href="#" onclick="sh(t2);">text 2</a> | <a href="#" onclick="sh(t3);">text 3</a></p> An important detail is that when the span class t1 is visible, all other span class t2 and t3 are hidden. The default is to have all span class t1 visible at the first load. Till now, the only solution I found was this one (a bit too complicated though). Thanks a lot. The folks are using these links to help visualize the effect of the code: http://jsfiddle.net/v3vWM/ http://jsfiddle.net/tEUYC/ http://jsfiddle.net/RpVUN/

    Read the article

  • Contact Bubble EditText

    - by toobsco42
    I am trying to create contact bubbles in the MultiAutoCompleteTextView similiar to how it is implemented in the Google+ app. Below is a screen shot: . I have tried to extend the DynamicDrawableSpan class in order to get a spannable drawable in the background of a span of text public class BubbleSpan extends DynamicDrawableSpan { private Context c; public BubbleSpan(Context context) { super(); c = context; } @Override public Drawable getDrawable() { Resources res = c.getResources(); Drawable d = res.getDrawable(R.drawable.oval); d.setBounds(0, 0, 100, 20); return d; } } Where my oval.xml drawable is defined as so: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> <solid android:color="#00000000"/> <stroke android:width="4dp" android:color="#99000000" android:dashWidth="4dp" android:dashGap="2dp" /> <padding android:left="7dp" android:top="7dp" android:right="7dp" android:bottom="7dp" /> <corners android:radius="4dp" /> </shape> In my Activity class that has the MulitAutoCompleteTextView, I set the bubble span like so: final Editable e = tv.getEditableText(); final SpannableStringBuilder sb = new SpannableStringBuilder(); sb.append("some sample text"); sb.setSpan(new BubbleSpan(getApplicationContext()), 0, 6, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); e.append(sb); However, instead of the oval shape displaying behind the first 6 characters in the string, the characters are not visible and there is no oval drawable in the background. If i change the BubbleSpan's getDrawable() method to use a .png instead of a shape drawable: public Drawable getDrawable() { Resources res = c.getResources(); Drawable d = res.getDrawable(android.R.drawable.bottom_bar); d.setBounds(0, 0, 100, 20); return d; } Then the .png will show up but the characters in the string that are a part of the span will not show up. How can I make it so that the characters in the span are displayed in the foreground, meanwhile a custom shape drawable gets displayed in the background? I attempted to also use an ImageSpan instead of subclassing DynamicDrawableSpan but was unsuccessful.

    Read the article

  • Submit a form by code

    - by user1440235
    I am trying to programmatically submit a form but get an error that says: SCRIPT5007: Unable to get value of the property 'submit': object is null or undefined verify1.php, line 9 character 5 Can anyone see what I am doing wrong? Here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript"> function submitform() { document.getElementById("repeatForm").submit(); } </script> </head> <body> <?php require_once('recaptchalib.php'); $privatekey = "6Ld1N9ISAAAAAB_lXt0Es0muh2cfikSgVrUP4ZXh"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly echo '<script language="JavaScript">submitform();</script>'; ; /*echo "<script>window.location.href = 'Information-Request-Voodoo-Websites.php';</script>";*/ } else { echo "<script>window.location.href = 'Confirm-Information-Request.html';</script>"; // Your code here to handle a successful verification } ?> <?php if (isset($_POST['name2'])) $_SESSION['name2'] =$_POST['name2']; if (isset($_POST['phone'])) $_SESSION['phone'] =$_POST['phone']; if (isset($_POST['email'])) $_SESSION['email'] =$_POST['email']; if (isset($_POST['company'])) $_SESSION['company'] =$_POST['company']; if (isset($_POST['pages'])) $_SESSION['pages'] =$_POST['pages']; if (isset($_POST['shopping'])) $_SESSION['shopping'] =$_POST['shopping']; if (isset($_POST['new'])) $_SESSION['new'] =$_POST['new']; if (isset($_POST['general'])) $_SESSION['general'] =$_POST['general']; if (isset($_POST['respond'])) $_SESSION['respond'] =$_POST['respond']; ?> <form id="repeatForm" action="Information-Request-Voodoo-Websites.php" method="post"> <span name="sprytextfield1"> <label for="name2">Please enter your name:</label> <input name="name" type="text" class="inputTextBoxFormat" id="name2" value="<?php echo((isset($_POST["name"]))?$_POST["name"]:"") ?>" size="30" /> <span class="textfieldRequiredMsg">A value is required.</span></span> <p><span id="sprytextfield2"> <label for="phone">Please enter your phone number:</label> <input name="phone" type="text" class="inputTextBoxFormat" id="phone" value="<?php echo((isset($_POST["phone"]))?$_POST["phone"]:"") ?>" /> <span class="textfieldRequiredMsg">A value is required.</span></span></p> <p><span id="sprytextfield3"> <label for="email">Please enter your email address:</label> <input name="email" type="text" class="inputTextBoxFormat" id="email" value="<?php echo((isset($_POST["email"]))?$_POST["email"]:"") ?>" size="40" /> <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></p> <p><span id="sprytextarea1"> <label for="company">Enter a brief description of your company:</label> <br /> <textarea name="company" cols="65" rows="3" class="inputTextBoxFormat" id="company"><?php echo((isset($_POST["company"]))?$_POST["company"]:"") ?></textarea> <span class="textareaRequiredMsg">A value is required.</span></span></p> <p>Anticipated number of pages:<span id="sprytextfield4"> <label for="pages"></label> <input name="pages" type="text" class="inputTextBoxFormat" id="pages" value="<?php echo((isset($_POST["pages"]))?$_POST["pages"]:"") ?>" size="7" /> <span class="textfieldRequiredMsg">A value is required.</span></span><span id="spryselect1"> <label for="shopping">Shopping cart required?</label> <select name="shopping" class="inputTextBoxFormat" id="shopping"> <option value="yes">yes</option> <option value="no">no</option> </select> <span class="selectRequiredMsg">Please select an item.</span></span></p> <p><span id="spryselect2"> <label for="new">Does this work concern a new or existing web site?</label> <select name="new" class="inputTextBoxFormat" id="new"> <option value="existing" <?php if (!(strcmp("existing", ((isset($_POST["new"]))?$_POST["new"]:"")))) {echo "selected=\"selected\"";} ?>>existing</option> <option value="new" <?php if (!(strcmp("new", ((isset($_POST["new"]))?$_POST["new"]:"")))) {echo "selected=\"selected\"";} ?>>new</option> </select> <span class="selectRequiredMsg">Please select an item.</span></span></p> <p><span id="sprytextarea2"> <label for="general">Add any additiional comments here or ask questions. </label> <textarea name="general" cols="65" rows="4" class="inputTextBoxFormat" id="general"><?php echo((isset($_POST["general"]))?$_POST["general"]:"") ?></textarea> </span></p> <p><span id="spryselect3"> <label for="respond">How would you like us to respond?</label> <select name="respond" class="inputTextBoxFormat" id="respond"> <option value="email" <?php if (!(strcmp("email", ((isset($_POST["respond"]))?$_POST["respond"]:"")))) {echo "selected=\"selected\"";} ?>>email</option> <option value="phone" <?php if (!(strcmp("phone", ((isset($_POST["respond"]))?$_POST["respond"]:"")))) {echo "selected=\"selected\"";} ?>>phone</option> </select> <input type="submit" name="formSubmit" value="Submit" /> </form> </body> </html>

    Read the article

  • Change row/column span programatically (tablelayoutpanel)

    - by alex
    I have a tablelayoutpanel. 2x2 - 2 columns 2 rows. For example, I added a button button1 in a 1 row, second column. button1 has a dock property set to Fill. VS Designer allows to set column/row span properties of button1. I want an availability to change row span property of button1 programatically, so it can fill all second column(1 row and second row) and availability to set it back. How ?

    Read the article

  • Ntop monitoring - Hosts visible with no SPAN/mirroring

    - by Cory J
    I am attempting to use ntop to monitor traffic over a Cisco Catalyst switch. I was assuming that in order to see any of the traffic, I'd have to use monitor, as described here: http://www.cisco.com/en/US/products/hw/switches/ps708/products_tech_note09186a008015c612.shtml. Howver, before I did anything on the switch, I simply plugged my ntop server in and fired up ntop. To my suprise, I instantly see 3+ pages of hosts, and thousands of packets. How is ntop seeing this? I have verified that no monitoring exists on the switch (run as en): cs1.pvdc#show monitor No SPAN configuration is present in the system. My ntop server is Ubuntu 8.04, I haven't done ANY configuration, I just installed the ntop package. This is also a fresh Ubuntu install. Is there anything else on my switch besides "monitor" that might cause my switch to mirror all its traffic like this? I've tried plugging ntop into different ports with the same results. UPDATE: It appears to be more then just broadcast traffic showing up in ntop, for example, I can see when my IPs have talked to the DNS server or generated HTTP traffic. If my switch is misconfigured, can anyone point me in the right direction towards rectify this? Not a Cisco expert.

    Read the article

  • How to avoid double divide in loop?

    - by ignaty
    Thank you for your help. My code looks like: var CatItems = ""; for(var x=0; x < data.PRODUCTS.length; x++) { if (x % 3 === 0) CatItems += '<li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-'+[x]+' jcarousel-item-'+[x]+'-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal">'; CatItems += '<div><a class="large_image" href="#"><img src="'+ data.PRODUCTS[x].product_img +'" alt="' + data.PRODUCTS[x].product_name +'"></a><h3 class="geo_17_darkbrown">' + data.PRODUCTS[x].product_name +'</h3>'; if ( data.PRODUCTS[x].product_onsale==1 ) { CatItems += '<img alt="sale" src="assets/images/sale.gif" class="sale"><span class="geo_17_red_linethr">&pound;'+ data.PRODUCTS[x].product_retailprice +'</span>&nbsp;&nbsp;<span class="price geo_17_darkbrown">&pound;'+ data.PRODUCTS[x].product_webprice +'</span>'; } else { CatItems += '<span class="price geo_17_darkbrown">&pound;'+ data.PRODUCTS[x].product_webprice +'</span>'; } if ( data.PRODUCTS[x].product_COLOURS ) { CatItems += '<span class="colour">'; for(var y=0; y < data.PRODUCTS[x].product_COLOURS.length; y++) { CatItems += '<span><a href="'+ data.PRODUCTS[x].product_COLOURS[y].colours_large +'"><img src="'+ data.PRODUCTS[x].product_COLOURS[y].colours_thumb +'" alt="'+ data.PRODUCTS[x].product_COLOURS[y].colour_name +'" /></a></span>'; } CatItems += '</span>'; } CatItems += '</div>'; if (x % 3 === 2) CatItems += '</li>'; } and it generates this: <div class="carousel_00 jcarousel-container jcarousel-container-horizontal" style="position: relative; display: block;"> <div class="jcarousel-clip jcarousel-clip-horizontal" style="overflow: hidden; position: relative;"> <ul class="jcarousel-list jcarousel-list-horizontal" style="overflow: hidden; position: relative; top: 0px; left: 0px; margin: 0px; padding: 0px; width: 7890px;"> <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-0 jcarousel-item-0-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress1.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <img class="sale" src="assets/images/sale.gif" alt="sale"> <span class="geo_17_red_linethr">£120 </span>&nbsp;&nbsp; <span class="price geo_17_darkbrown">£100 </span> <span class="colour"> <span> <a href="assets/images/colour.gif"> <img alt="Black" src="assets/images/black.gif"></a> </span> <span> <a href="assets/images/colour.gif"> <img alt="Brown" src="assets/images/brown.gif"></a> </span> <span> <a href="assets/images/colour.gif"> <img alt="Purple" src="assets/images/purple.gif"></a> </span> </span> </div> <div> <a href="#" class="large_image"> <img alt="Rachel Dress" src="assets/images/dress2.gif"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">£120 </span> </div> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress3.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> </li> <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-1 jcarousel-item-1-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal" style="float: left; list-style: none outside none;" jcarouselindex="1"> </li> <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-3 jcarousel-item-3-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress1.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress2.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress3.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> </li> <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-6 jcarousel-item-6-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress3.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> <div> <a href="#" class="large_image"> <img alt="Elena Top" src="assets/images/dress3.gif"></a> <h3 class="geo_17_darkbrown">Elena Top</h3> <span class="price geo_17_darkbrown">£120 </span> </div> </li> </ul> </div> <div class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal" style="display: block;" disabled="true"> </div> <div class="jcarousel-next jcarousel-next-horizontal" style="display: block;" disabled="false"> </div> <div class="jcarousel-control geo_10_darkbrown_capital"> 7 products&nbsp;&nbsp;&nbsp; <a href="#">1</a> <a href="#">2</a> <a href="#">3</a> <a href="#">4</a> <a href="#">5</a> <a href="#">6</a> <a href="#" class="last">7</a> </div> </div> It works like it should, put every 3 div's in li. but I have another problem with divide. It divide "x" inside the loop. For example in JS: <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-'+[x]+' jcarousel-item-'+[x]+'-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"> And HTML out is: <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-0 jcarousel-item-0-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"></li> then <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-3 jcarousel-item-3-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"></li> then <li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-6 jcarousel-item-6-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"></li> etc... What I need is that count goes as 0-1-2-3-4-5-etc, but with divide it goes 0-3-6-etc and jCarousel insert blank li's 1-2, 4-5, 7-8. How I can avoid "x" divide inside the loop? Tnak you!

    Read the article

  • How to make this jquery function reusable?

    - by Pandiya Chendur
    Hai this is my jquery function, function getRecordspage(curPage, pagSize) { $.ajax({ type: "POST", url: "Default.aspx/GetRecords", data: "{'currentPage':" + curPage + ",'pagesize':" + pagSize + "}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(jsonObj) { var strarr = jsonObj.d.split('##'); var jsob = jQuery.parseJSON(strarr[0]); $.each(jsob.Table, function(i, employee) { $('<div class="resultsdiv"><br /><span class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Address + '</span></div>').appendTo('#ResultsDiv'); }); $(".resultsdiv:even").addClass("resultseven"); $(".resultsdiv").hover(function() { $(this).addClass("resultshover"); }, function() { $(this).removeClass("resultshover"); }); } }); } In my page i have this jquery script, $("#lnkbtn0").click(function() { getRecordspage(1, 5) }); And my page has <a ID="lnkbtn0" class="page-numbers">1</a> <a ID="lnkbtn1" class="page-numbers">2</a> <a ID="lnkbtn2" class="page-numbers">3</a> <a ID="lnkbtn3" class="page-numbers">4</a> How to make other link buttons to call this function with diff curPage parameter...

    Read the article

  • Jquery insertAfter() doesn't seem to work for me...

    - by Pandiya Chendur
    I have created a parent div and inserted div's after the parent div using jquery insertAfter() method.... What happens is My first record goes to the bottom and next record gets inserted above it.... Here is my function... function Iteratejsondata(HfJsonValue) { var jsonObj = eval('(' + HfJsonValue + ')'); for (var i = 0, len = jsonObj.Table.length; i < len; ++i) { var employee = jsonObj.Table[i]; $('<div class="resultsdiv"><br /><span id="EmployeeName" style="font-size:125%;font-weight:bolder;">' + employee.Emp_Name + '</span><span style="font-size:100%;font-weight:bolder;padding-left:100px;">Category&nbsp;:</span>&nbsp;<span>' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" style="font-size:100%;font-weight:bolder;">Salary Basis&nbsp;:</span>&nbsp;<span>' + employee.SalaryBasis + '</span><span style="font-size:100%;font-weight:bolder;padding-left:25px;">Salary&nbsp;:</span>&nbsp;<span>' + employee.FixedSalary + '</span><span style="font-size:100%;font-weight:bolder;padding-left:25px;">Address&nbsp;:</span>&nbsp;<span>' + employee.Address + '</span></div>').insertAfter('#ResultsDiv'); } } And my result is, Palani must be next to my parent div but it is at the bottom... Because insertAfter() inserts every record next to the #ResultsDiv ... Any suggestion how to insertafter the newly generated div...

    Read the article

  • Add divs below a parent div using jquery...

    - by Pandiya Chendur
    Here is my parent div, <div id="ResultsDiv" class="resultsdiv"> <br /> <span id="EmployeeName" style="font-size:125%;font-weight:bolder;">Pandiyan</span><span style="font-size:100%;font-weight:bolder;padding-left:100px;">Category&nbsp;:</span>&nbsp;<span>Supervisor</span><br /><br /> <span id="SalaryBasis" style="font-size:100%;font-weight:bolder;">Salary Basis&nbsp;:</span>&nbsp;<span>Monthly</span><span style="font-size:100%;font-weight:bolder;padding-left:25px;">Salary&nbsp;:</span>&nbsp;<span>25,000</span> <span style="font-size:100%;font-weight:bolder;padding-left:25px;">Address&nbsp;:</span>&nbsp;<span>Madurai</span> </div> How to add divs below this parent div using jquery, function Iteratejsondata(HfJsonValue) { var jsonObj = eval('(' + HfJsonValue + ')'); for (var i = 0, len = jsonObj.Table.length; i < len; ++i) { var employee = jsonObj.Table[i]; //Add divs here based on length } }

    Read the article

  • How to paginate json data?

    - by Pandiya Chendur
    I used json data and iterated div elements to get my result.... function Iteratejsondata(HfJsonValue) { //var jsonObj = eval('(' + HfJsonValue + ')'); var jsonObj = JSON.parse(HfJsonValue); for (var i = jsonObj.Table.length - 1; i >= 0; i--) { var employee = jsonObj.Table[i]; $('<div class="resultsdiv"><br /><span class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Address + '</span></div>').insertAfter('#ResultsDiv'); } $(".resultsdiv:even").addClass("resultseven"); $(".resultsdiv").hover(function() { $(this).addClass("resultshover"); }, function() { $(this).removeClass("resultshover"); }); } I get 22 records in total... Now i want to paginate these divs (i.e) 5 divs per page... Any suggestion...

    Read the article

  • How make this jquery function reusable?

    - by Pandiya Chendur
    Comsider this jquery function, function showresults(jsonobj) { $.each(jsonobj, function(i, employee) { divs += '<div class="resultsdiv"><br /><span style="display: inline-block;width:150px;" class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address&nbsp;:</span>&nbsp;<span class="resultfieldvalues">' + employee.Address + '</span></div>'; }); } Here i am iterating my json data and drawing div elements.... As you see these div elements are hardcoded how to pass these html div elements dynamically by a variable... var divs=<div></div> function showresults(jsonobj,divs) { $.each(jsonobj, function(i, employee) { divs += divs Is this correct way of doing but there will be an error employee object wont be there know when my divs variable declared outside the function... Any suggestion...

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >