Search Results

Search found 2021 results on 81 pages for 'philip strong'.

Page 7/81 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • layout is not included in all pages in asp.net mvc4 application

    - by Ahmed
    I am developing an asp.net mvc4 application with Bootstrap 3 and i've _Layout.cshtml in "Shared" folder , in Views, i've two pages, "Index and "Register" and i've included Layout in both of these Views but It seems that Layout is included in only "Index and not in "Register" View. Following are my Index and Register Views @{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2 align="center" class="bg-info">Login</h2> <form class="form-horizontal" role="form"> <div class="form-group"> <label for="inputEmail3" class="col-sm-2 control-label"><strong>UserName : </strong></label> <div class="col-sm-10"> <input type="email" class="form-control" id="inputEmail3" placeholder="UserName"> </div> </div> <div class="form-group"> <label for="inputPassword3" class="col-sm-2 control-label"><strong>Password</strong></label> <div class="col-sm-10"> <input type="password" class="form-control" id="inputPassword3" placeholder="Password"> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <div class="checkbox"> <label> <input type="checkbox"> Remember me </label> </div> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <button type="submit" class="btn btn-primary">Sign in</button> </div> </div> <h2 align="center" class="bg-info">SignIn With Other Services</h2> </form> <form class="form-horizontal" role="form" method="post" action="/Home/FacebookLogin"> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <button type="submit" class="btn btn-primary">SignIn with Facebook</button> </div> </div> </form> <h2 align="center" class="bg-info">Don't Have an Account?</h2> <form class="form-horizontal" role="form" method="post" action="/Home/Register"> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <button type="submit" class="btn btn-primary">Register</button> </div> </div> </form> ![@{ ViewBag.Title = "Register"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2 align="center" class="bg-info">Register</h2> <form class="form-horizontal" role="form"> <div class="form-group"> <label for="inputEmail3" class="col-sm-2 control-label"><strong>UserName : </strong></label> <div class="col-sm-10"> <input type="email" class="form-control" id="uname" name="uname" placeholder="UserName"> <input type="button" class="btn btn-primary" id="check" value="Check Availability" > <h4 class="bg-warning"></h4> </div> </div> <div class="form-group"> <label for="inputPassword3" class="col-sm-2 control-label"><strong>Password</strong></label> <div class="col-sm-10"> <input type="password" class="form-control" id="upass" name="upass" placeholder="Password"> </div> </div> <div class="form-group"> <label for="inputPassword3" class="col-sm-2 control-label"><strong>Retype Password</strong></label> <div class="col-sm-10"> <input type="password" class="form-control" id="retype" placeholder="Password"> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <button type="submit" class="btn btn-primary">Register</button> </div> </div> </form>]

    Read the article

  • I want to style within JS

    - by 422
    Issue I have is I can use tags, but I would like to style particular words. Adding a class doesnt work, is it because I am within script dom ? Example: var config = [ { "name" : "tour_1", "bgcolor" : "black", "color" : "white", "position" : "BR", "text" : "Customize your user profile, it's easy. This is your shop window on <strong>here</strong> and <strong>there</strong>", "time" : 4000 } Instead of strong, I would like to apply class, like <p class="orange"> But it wont have it, any suggestions... please

    Read the article

  • Home server running 2008 R2 intermittently bringing our internet down by creating a large amount of connections [closed]

    - by Philip Strong
    Possible Duplicate: My server's been hacked EMERGENCY My Server 2008 R2 home server is intermittently (every 30 minutes or so, for about 3-4 minutes) creating a huge amount of connections which reaches the 4096 connection limit, thus effectively DOSing our internet connection. I've run a couple of network traffic monitors, and it appears to be a system process causing the problem. I thought I'd fixed it by reinstalling Comodo Antivirus, but it appears that wasn't the problem. Any thought? Thanks in advance.

    Read the article

  • Problem with IE and Jquery qTip plugin

    - by user272899
    I am having problems with the Jquery qtip plugin. It works fine in Firefox (see here http://movieo.no-ip.org/ hover over the first image). But doesn't work in IE. This is the code: $('.moviebox').each(function() { $(this).qtip({ content: $(this).children('.info'), show: 'mouseover', hide: 'mouseout', style: { name: 'light' }, position: { corner: { target: 'rightbottom', tooltip: 'bottomleft' } } }); }); And the html <!--start moviebox--> <div class="moviebox"> <a href="#"> <img src="http://1.bp.blogspot.com/_mySxtRcQIag/S6deHcoChaI/AAAAAAAAObc/Z1Xg3aB_wkU/s200/rising_sun.jpg" /> </a> <!--start infobox--> <div class="info"> <span>Rising Sun (2006)</span> <div class="description"><strong>Description:</strong><br /> test test test test test test test test test test test test test test test test</div> <img src="http://1.bp.blogspot.com/_mySxtRcQIag/S6deHcoChaI/AAAAAAAAObc/Z1Xg3aB_wkU/s200/rising_sun.jpg" /> <div class="cast"><strong>Cast:</strong><br /> Sean connery</div> <div class="rating"><strong>Rating:</strong><br />5stars</div> </div> <!--end infobox--> </div> <!--end moviebox--> Why wouldn't that work in IE????? Beats me. Checkout movieo.no-ip.org for the whole source

    Read the article

  • CSS background images not showing in IE?

    - by Kevin
    In IE8 and below, I'm doing this <ul class="dependants_list" style="border-bottom: dashed 1px #53a1dc"> <li class="dependants_summary"> <strong>Name:</strong> De Silva, Angelina<br /> <strong>Gender:</strong> Female<br /> <strong>Date of birth:</strong> 7/3/2009<br /> </li> <form action="/Dependant/Delete/11413" method="get"><input class="delete btn" id="Delete_this_Profile" name="Delete_this_Profile" type="submit" value="Delete this Profile" /> </form><form action="/Dependant/Edit/11413" method="get"><input class="edit btn" id="Modify_this_Profile" name="Modify_this_Profile" type="submit" value="Modify this Profile" /> </form><br /><hr style="display:none" /> and the CSS for it is: .dependants_summary { overflow: hidden; margin-bottom: 10px; padding-right: 0px; padding-left: 85px; padding-top: 5px; padding-bottom: 5px; width: 430px; float: left; font: 120% Arial, Helvetica, sans-serif; } .dependants_list { padding: 0; } .dependants_list li:nth-child(odd) { background: #fff url("../images/dependant_male.png") no-repeat scroll 8px 9px; } .dependants_list li:nth-child(even) { background: #c9e3f4 url("../images/dependant_male.png") no-repeat scroll 8px 9px; } The images are not being shown in IE, but they are in ffox and chrome

    Read the article

  • JSoup - Select only one listobject

    - by Zyril
    I'm trying to extract some certain data from a website using JSoup and Java. So far I've been successful in what I'm trying to achieve. <ul class="beverageFacts"> <li><span>Årgång</span><strong>**2009**&nbsp;</strong></li> I want to extract what is inside the ** in the above HTML. I can do this by using the code that follows in JSoup: doc.select("ul.beverageFacts li:lt(1) strong"); I'm using the lt(1) because there are several more list items following that I want to omit. Now to my problem; there's an optional information tab on the site I'm extracting data from, and it also has a class called "beverageFacts". My code will at the moment extract that data too, which I don't want it to do. The code is further down in the source of the website, and I've tried to use the indexer :lt(1) here aswell, but it wont work. <div id="beverageMoreFacts" style="display: block"> <ul class="beverageFacts"><li class="half"> <span> Färg</span><strong> Ljusgul färg.</strong> My overall result is that I extract "2009 Ljusgul färg." instead of only "2009". How can I write my code so it will only extract the first part, which it succesfully does, and omits the rest? EDIT: I get the same result using: doc.select("ul.beverageFacts li:eq(0) strong"); Thanks, Z

    Read the article

  • What would be the best way to dynamically add a set of rows to a table using JQuery?

    - by user312157
    I have a following table using MVC that shows number of items the user has. <table border = "1" id="tblItems"> <% var itemnum = 1; foreach (var item in Model.Items) {%> <tr> <td colspan="2" bgcolor="Silver"><strong>Item#<%=itemnum%></strong></td> <td><%=Html.ActionLink("Delete", "DeleteItem", "Item", new { id = item.ID })%></td> </tr> <tr> <td><strong>Name:</strong></td> <td><%=Html.TextBox("ItemName_" + itemnum, item.Name)%></td> </tr> <tr> <td><strong>Description:</strong></td> <td><%=Html.TextBox("ItemDescription_" + itemnum, item.Description)%></td> </tr> <%itemnum++; } %> </table> I will have a button that will Add New Item that will dynamically add identical structure. Any ideas on what is the best way to do this using JQuery? Thanks for all the suggestions!

    Read the article

  • RoR - howto convert some HTML-elements with css to Rails

    - by NicoJuicy
    I have old HTML code with html and css.. <form action="login" method="post"> <div class="field"> <label for="username">Username</label> <input type="text" class="text" id="username" name="username" value="just click login !"/> </div> <span class="fright"> <button class="button" type="submit"><strong>Log In</strong></button> </span> </div> How can i convert this code to decent rails code? I came up with this, but it ain't right :-( : <% form_for :user, @user, :url => { :action => "login" } do |f| %> <% div_for f, :class => "field text" do %> <%= f.text_field :username %> <%= f.password_field :password, :class => "field text" %> <% end %> <span class="fright"> <%= submit_tag '<strong>Inloggen</strong>', :class => "button",:disable_with => 'verwerken...' %></span> <% end %> I'm having problems with the <strong>Inloggen</strong> And with the <% div_for f, :class => "field text" do %>

    Read the article

  • Dom Nodes manipulations, how remove tags which wrap my selection?

    - by sanceray3
    Hi, I try to explain you my "problem". I would like to know when I select a part of text, if this text is “wrapped” by html tags, and in function delete them. For example with this sentence : The car is <strong>green</strong>, and the boat is black If I select “green” and click on a button, I would like verify if green is wrapped by <strong>(for that it’s ok), and in function delete <strong> tags without delete containing “green”. I have tried to do it, but when I remove child and recreate one, my new node is empty and if I try to put directly text in document.createTextNode, my new node appears but the <strong> tags stay. // Bouton CLICK $('input[type=button].btn_transform').click(function(){ var selObj = window.getSelection(); var parent=selObj.anchorNode.parentNode; if (parent.nodeName=='STRONG'){ parent.removeChild(selObj.anchorNode); var theText = document.createTextNode(selObj); parent.appendChild(theText); } }); I’m not a DOM manipulation specialist. Could you help me to solve this? Thanks very much for your precious help.

    Read the article

  • jquery .children() returning wrong size

    - by i need help
    Hi guys, I just found the children size not consistent. Below attach full code with alert, for easy reference. Is the way I get the data wrong? <body> <table width="100" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" valign="top"><strong>Header Title</strong></td> </tr> <tr> <td height="32" valign="top">Date : <strong>01/01/2010 </strong> <br><div><b></b></div><span></span></td> </tr> </table> </body> $("td").each(function() { alert($(this).children().size()); }); //first td showing 1 direct children- <strong> //second td showing 4 direct children- <strong> <br> <div> <span> ----- $("tr").each(function() { alert($(this).children().size()); }); //first tr showing 1 direct children - <td> //second tr showing 1 direct children - <td> ----- $("table").each(function() { alert($(this).children().size()); }); // ERROR // this table showing 1 direct children only.... something WRONG. // I thought there are 2 <tr> inside this table?

    Read the article

  • How To Deal With Terrible Design Decisions

    - by splatto
    I'm a consultant at one company. There is another consultant who is a year older than me and has been here 3 months longer than I have, and a full time developer. The full-time developer is great. My concern is that I see the consultant making absolutely terrible design decisions. For example, M:M relationships are being stored in the database as a comma-delimited string rather than using a conjunction table to hold the relationships. For example, consider two tables, Car and Property: Car records: Camry Volvo Mercedes Property records: Spare Tire Satellite Radio Ipod Support Standard Rather than making a table CarProperties to represent this, he has made a "Property" attribute on the Car table whose data looks like "1,3,7,13,19,25," I hate how this decision and others are affecting the quality of my code. We have butted heads over this design three times in the past two months since I've been here. He asked me why my suggestion was better, and I responded that our database would be eliminating redundant data by converting to a higher normal form. I explained that this design flaw in particular is discussed and discouraged in entry level college programs, and he responded with a shot at me saying that these comma-separated-value database properties are taught when you do your masters (which neither of us have). Needless to say, he became very upset and demanded I apologize for criticizing his work, which I did in the interest of not wanting to be the consultant to create office drama. Our project manager is focused on delivering a product ASAP and is a very strong personality - Suggesting to him at this point that we spend some time to do this right will set him off. There is a strong likelihood that both of our contracts will be extended to work on a second project coming up. How will I be able to exert dominant influence over the design of the system and the data model to ensure that such terrible mistakes are not repeated in the next project? A glimpse at the dynamics: I can be a strong personality if I don't measure myself. The other consultant is not a strong personality, is a poor communicator, is quite stubborn and thinks he is better than everyone else. The project manager is an extremely strong personality who is focused on releasing tomorrow's product yesterday. The full-time developer is very laid back and easy going, a very effective communicator, but is someone who will accept bad design if it means not rocking the boat. Code reviews or anything else that takes "time" will be out of the question - there is no way our PM will be sold on such a thing by anybody.

    Read the article

  • WebCenter Customer Spotlight: Alberta Agriculture and Rural Developmen

    - by me
    Author: Peter Reiser - Social Business Evangelist, Oracle WebCenter  Solution SummaryAlberta Agriculture and Rural Development is a government ministry that works with producers and consumers to create a strong, competitive, and sustainable agriculture and food industry in the province of Alberta, Canada The primary business challenge faced by the Alberta Ministry of Agriculture was that of managing the rapid growth of their information.  They needed to incorporate a system that would work across 22 different divisions within the ministry and deliver an improved and more efficient experience for Desktop, Web and Mobile users, while addressing their regulatory compliance needs as part of the Canadian government. The customer implemented a centralized Enterprise Content Management solution based on Oracle WebCenter Content and developed a strong and repeatable information life cycle management methodology across all their 22 divisions and agencies. With the implemented solution, Alberta Agriculture and Rural Development  centrally manages over 20 million documents for 22 divisions and agencies and they have improved time required to find records,  reliability of information, improved speed and accuracy of reporting and data security. Company OverviewAlberta Agriculture and Rural Development is a government ministry that works with producers and consumers to create a strong, competitive, and sustainable agriculture and food industry in the province of Alberta, Canada.  Business ChallengesThe business users were overwhelmed by growth in documents (over 20 million files across 22 divisions and agencies) and it was difficult to find and manage documents and versions. There was a strong need for a personalized easy-to-use, secure and dependable method of managing and consuming content via desktop, Web, and mobile, while improving efficiency and maintaining regulatory compliance by removing the risk of non-uniform approaches to retention and disposition. Solution DeployedAs a first step Alberta Agriculture and Rural Development developed a business case with clear defined business drivers: Reduce time required to find records Locate “lost” records Capture knowledge lost through attrition Increase the ease of retrieval Reduce personal copies Increase reliability of information Improve speed and accuracy of reporting Improve data security The customer implemented a centralized Enterprise Content Management solution based on Oracle WebCenter Content. They used an incremental implementation approach aligned with their divisional and agency structure which allowed continuous process improvement. This led to a very strong and repeatable information life cycle management methodology across all their 22 divisions and agencies. Business ResultsAlberta Agriculture and Rural Development achieved impressive business results: Centrally managing over 20 million files for 22 divisions and agencies Federated model to manage documents in SharePoint and other applications Doing records management for both paper and electronic records Reduced time required to find records Increased the ease of retrieval Increased reliability of information Improved speed and accuracy of reporting Improved data security Additional Information Oracle Open World 2012 Presentation Oracle WebCenter Content

    Read the article

  • Handle "Cannot access a closed resource set"

    - by Philip
    I have a website with several languages in a database. From the database I use ResXResourceWriter to create my .resx files. This is working really good but sometimes I get this exception: MESSAGE: Cannot access a closed resource set. SOURCE: mscorlib FORM: QUERYSTRING: TARGETSITE: System.Object GetObject(System.String, Boolean, Boolean) STACKTRACE: at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase, Boolean isString) at System.Resources.RuntimeResourceSet.GetString(String key, Boolean ignoreCase) at System.Resources.ResourceManager.GetString(String name, CultureInfo culture) at System.Linq.Expressions.Expression.ValidateStaticOrInstanceMethod(Expression instance, MethodInfo method) at System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method, IEnumerable`1 arguments) at System.Data.Linq.DataContext.GetMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters) at System.Data.Linq.DataContext.ExecuteMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters) at Business.DatabaseModelDataContext.Web_GetMostPlayedEvents(String cultureCode) at Presentation.Default.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) I don't know why this is happening or how to solve it. Does anyone know anything about this? Thanks, Philip

    Read the article

  • help converting sql to linq expression with count

    - by Philip
    I am trying to convert the following SQL into a LINQ expression SELECT COUNT(ID) AS Count, MyCode FROM dbo.Archive WHERE DateSent=@DateStartMonth AND DateSent<=@DateEndMonth GROUP BY MyCode and I have been trying to follow this webpage as an example http://stackoverflow.com/questions/606124/converting-sql-containing-top-count-group-and-order-to-linq-2-entities I got this so far but I am stuck on understanding the new part var res=(from p in db.Archives where (p.DateSent>= dateStartMonth) && (p.DateSent< dateToday) group p by p.MyCode into g select new { ??????MyCode = g.something?, MonthlyCount= g.Count() }); Thanks in advance for helping greatly appreciated Philip

    Read the article

  • SQL Server Reporting Services proxy timeout (ASP.NET)

    - by Philip
    Morning, We are using SSRS (2005) and have a ASP.NET frontend using the SSRS WebControl. I've boiled the problem down the time it takes for one particular report to be generated is greater than the timeout on the proxy server. It looks like the way the SSRS web control tries to do things is by performing an HTTP request for the report, however the problem with this is the request can timeout potentially before the report has generated. Looking at the HTTP traffic the response is a 504 (gateway timeout). Is there a way to increase the timeout or change SSRS WebControl to use more robust polling mechanism (which isn't dependant on the timeout of the HTTP request). I could be wrong but I don't think ServerReport.Timeout property would resolve the issue we are seeing? Any thoughts? Philip

    Read the article

  • Limit the file inputs cloned in a form with Jquery

    - by Philip
    Hi, i use this Jquery function to clone the file input fields in my form, $(function() { var scntDiv = $('#clone'); var i = $('#clone p').size() + 1; $('#addImg').live('click', function() { $('<p><label for="attach"><input type="file" name="attachment_'+ i +'" /> <a href="#" id="remImg">Remove</a></label></p>').appendTo(scntDiv); i++; return false; }); $('#remImg').live('click', function() { if( i > 2 ) { $(this).parents('p').remove(); i--; } return false; }); }); is it possible to limit the fields that can be cloned? lets say a number of 4 fields? thanks a lot, Philip

    Read the article

  • Python/X11: find out if user switches virtual desktops

    - by Philip
    Hello everyone, I'm looking for a way to determine if the user switches virtual desktops under X11. I'm using Python with X11 libraries and PyGTK. I found some working examples in C, but I lack the expertise to translate them into Python, and I read the source code of several X11 pager applications (fbpanel, pypanel), but I can't seem to find what I'm looking for. Do I have to register for a signal? Using X11 or GTK? Do I have to busy-wait? I'm completely new to both X11 and GTK, so any hints/help would be greatly appreciated. Greets, Philip PS: My current efforts can be found here.

    Read the article

  • JavaScript issues

    - by Michael
    My java scirpt is not working right. It is simple pre-vailidation form and I can not get the script to work. It is supposed to validate each field but I can not get it to validate past the first name. I stripped out all of the other garbage so the code would not be confusing Should be a copy paste to notepad. Little help please <?xml version="1.0" encoding="iso-8859-1"?> <!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> <script language="JavaScript" type="text/javascript"> <!-- function validateForm(theForm) { var name = theForm.firstname.value; var name = theForm.lastname.value; var email = theForm.email.value; if (name == "") { alert("Please fill in your First Name."); theForm.firstname.focus(); return false; } if (name == "") { alert("Please fill in your Last Name."); theForm.lastname.focus(); return false; } if (email == "") { alert("Please fill in your email address."); theForm.email.focus(); return false; } return true; } //--> </script> if (!theForm.myCheckbox1.checked { alert("Please check the honor box."); return false; } </head> <body> </script> <fieldset> <legend>Fun in the Sun With JavaScirpt</legend> <ul> <form action="blah.cgi" method="post" onSubmit="return validateForm(this);"> First name: <input type="text" name="firstname"> <font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><strong>*</strong></font> <br><br> Last name: <input type="text" name="lastname"> <font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><strong>*</strong></font> <br><br> Email address: <input type="text" name="email"> <font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><strong>*</strong></font> <br><br> Phone Number: <input type="text" name="phone"><br><br> <input type="submit" name="submit" value="Submit"> </form> <input type="checkbox" name="myCheckbox" value="someValue"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><strong>*</strong></font> <P>By checking this Box you are confirming the data is accurate</p> <p>(* indicates a required field)</p> </body> </html>

    Read the article

  • ASP.NET MVC - Form Post always redirect when I just want to bind json result to a div

    - by Saxman
    Hi all, I'm having a little problem with json result. I'm submitting a contact form, and after the submission, I just want to return some json data (indicating either a success or failed and displays a message) back to the view, without causing a redirect, but it kept redirecting me to the action, here are the codes: HTML <div id="contactForm2" class="grid_6"> <div id="contactFormContainer"> @using (Html.BeginForm(MVC.Home.ActionNames.ContactForm, MVC.Home.Name, FormMethod.Post, new { id = "contactForm" })) { <p> <input type="text" tabindex="1" size="22" value="" id="contactName" class="text_input required" name="contactName" /> <label for="contactName"> <strong class="leftSpace">Your Name (required)</strong></label></p> <p> <input type="text" tabindex="2" size="22" value="" id="contactEmail" class="text_input required" name="contactEmail" /> <label for="contactEmail"> <strong class="leftSpace">Email (required)</strong></label></p> <p> <input type="text" tabindex="2" size="22" value="" id="contactPhone" class="text_input" name="contactPhone" /> <label for="contactPhone"> <strong class="leftSpace">Phone</strong></label></p> <p> <label> <strong class="leftSpace n">Message (required)</strong></label> <textarea tabindex="4" rows="4" cols="56" id="contactMessage" class="text_area required" name="contactMessage"></textarea></p> <p> <input type="submit" value="Send" tabindex="5" id="contactSubmit" class="button submit" name="contactSubmit" /></p> } </div> <div id="contactFormStatus"> </div> </div> Controller [HttpPost] public virtual JsonResult ContactForm(FormCollection formCollection) { var name = formCollection["contactName"]; var email = formCollection["contactEmail"]; var phone = formCollection["contactPhone"]; var message = formCollection["contactMessage"]; if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(email) || string.IsNullOrEmpty(message)) { return Json(new { success = false, message = "Please complete all the required fields so that I can get back to you. Thanks." }); } // Insert contact form data here... return Json(new { success = true, message = "Your inquery has been sent. Thank you." }); } javascript $(document).ready(function () { $('#contactSubmit').live('click', function () { var form = $('#contactForm'); var formData = form.serialize(); $.post('/Home/ContactForm', formData, function (result) { var status = $('#contactFormStatus'); if (result.success) { $('#contactForm')[0].reset; } status.append(result.message); }, 'json' ); return false; }); }); I've also tried this javascript, but also got a redirect $(document).ready(function () { $('#contactSubmit').live('click', function () { var form = $('#contactForm'); var formData = form.serialize(); $.ajax({ type: 'POST', url: '/Home/ContactForm', data: formData, success: function (result) { SubmitContactResult(result); }, cache: false }); }); function SubmitContactResult(result) { var status = $('#contactFormStatus'); if (result.success) { $('#contactForm')[0].reset; } status.append(result.message); } }); Any idea what's going on with my code? Thank you very much.

    Read the article

  • How to display same type of data from XML using XSLT

    - by MKS
    Hi Guys, I am using XSLT and XML. I have got below XML. <documentCountryInformation> <countryCode>US</countryCode> <countryName>United States</countryName> <sufficientDocumentation>Conditional</sufficientDocumentation> <sectionInformation> <sectionName>Health</sectionName> <documentParagraph paragraphId="23628"> <paragraphType>Requirement</paragraphType> <paragraphText> <p> Vaccination for <strong>yellow fever</strong> Persons without valid yellow fever certification, if required, are subject to quarantine for a period up to 6 days. </p> </paragraphText> </documentParagraph> </sectionInformation> </documentCountryInformation> <documentCountryInformation> <countryCode>IN</countryCode> <countryName>India</countryName> <sufficientDocumentation>Conditional</sufficientDocumentation> <sectionInformation> <sectionName>Health</sectionName> <documentParagraph paragraphId="23648"> <paragraphType>Requirement</paragraphType> <paragraphText> <p> Vaccination for <strong>Dengue fever</strong> Persons without valid yellow fever certification, if required, are subject to quarantine for a period up to 3 days. </p> </paragraphText> </documentParagraph> </sectionInformation> </documentCountryInformation> Above is the part of full xml and you can see there are two records of same type, now I have got the <countryName> in parameters of XSLT in above example my countryName parameter will contain this type of data "United States,India", Now I want to split the parameter data and further it will check the XML having same country name and display the data according, I mean there will be loop on country name and below is desired HTML. <div class="resultsContainer" id="divTransit"> <h3>Transit - United States (US)</h3> <p> Vaccination for <strong>yellow fever</strong> Persons without valid yellow fever certification, if required, are subject to quarantine for a period up to 6 days. </p> <h3>Transit - India (IN)</h3> <p> Vaccination for <strong>Dengue fever</strong> Persons without valid yellow fever certification, if required, are subject to quarantine for a period up to 3 days. </p> </div>

    Read the article

  • Why my onsubmitg is not firing - Spring

    - by GigaPr
    Hi, i have a controller public class EditUserController extends BaseController { public EditUserController() { setCommandClass(User.class); setCommandName("editaUser"); } public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ModelAndView modelAndView = new ModelAndView("editUser"); String id = request.getParameter("id"); if(!id.isEmpty()) { User user = this.userServiceImplementation.get(Integer.parseInt(id)); modelAndView.addObject("editaUser", user); } return modelAndView; } } and the view <form:form method="POST" commandName="editaUser" cssClass="addUserForm"> <div class="floatL"> <div class="padding5"> <div class="fieldContainer"> <strong>First Name:</strong>&nbsp; </div> <form:errors path="firstName" cssClass="error"/> <form:input path="firstName" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Last Name:</strong>&nbsp; </div> <form:errors path="lastName" cssClass="error"/> <form:input path="lastName" cssClass="textArea" /> </div> </div> <div class="floatR"> <div class="padding5"> <div class="fieldContainer"> <strong>Username:</strong>&nbsp; </div> <form:errors path="username" cssClass="error"/> <form:input path="username" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Password</strong>&nbsp; </div> <form:errors path="password" cssClass="error"/> <form:input path="password" cssClass="textArea"/> </div> </div> <input type="submit" class="floatR" value="Save" > </form:form> and the bean definition looks like <bean name="/editUser.htm" class="com.rssFeed.mvc.EditUserController"> <property name="userServiceImplementation" ref="userServiceImplementation"/> <property name="commandName" value="editaUser" /> <property name="successView" value="users"/> <property name="sessionForm" value="true"/> </bean> I populate the view using the querystring but i would lke to update the record in the database on click of the submit button. i tried to insert a on submit method protected ModelAndView onSubmit(Object command, BindException bindException) throws Exception { return new ModelAndView(getSuccessView()); } but it never fires What is the problem i do not get it?? thanks

    Read the article

  • ASP.NET 4.0- Html Encoded Expressions

    - by Jalpesh P. Vadgama
    We all know <%=expression%> features in asp.net. We can print any string on page from there. Mostly we are using them in asp.net mvc. Now we have one new features with asp.net 4.0 that we have HTML Encoded Expressions and this prevent Cross scripting attack as we are html encoding them. ASP.NET 4.0 introduces a new expression syntax <%: expression %> which automatically convert string into html encoded. Let’s take an example for that. I have just created an hello word protected method which will return a simple string which contains characters that needed to be HTML Encoded. Below is code for that. protected static string HelloWorld() { return "Hello World!!! returns from function()!!!>>>>>>>>>>>>>>>>>"; } Now let’s use the that hello world in our page html like below. I am going to use both expression to give you exact difference. <form id="form1" runat="server"> <div> <strong><%: HelloWorld()%></strong> </div> <div> <strong><%= HelloWorld()%></strong> </div> </form> Now let’s run the application and you can see in browser both look similar. But when look into page source html in browser like below you can clearly see one is HTML Encoded and another one is not. That’s it.. It’s cool.. Stay tuned for more.. Happy Programming Technorati Tags: ASP.NET 4.0,HTMLEncode,C#4.0

    Read the article

  • strings and textfields, AS3

    - by VideoDnd
    How do I get my text fields to populate correctly and show single digits? Description Each textfield receives a substring. This doesn't limit it's input, because the text fields shows extra numbers. See illustration. Ex A //Tweening method 'could substitute code with Tweener' import fl.transitions.Tween; import fl.transitions.easing.*; //Timer that will run a sec and repeat var timer:Timer = new Timer(1000); //Integer values var count:int = +220000000; var fcount:int = 0; //Events and starting timer timer.addEventListener(TimerEvent.TIMER, incrementCounter); addEventListener(Event.ENTER_FRAME, checkOdometerPosition); timer.start(); //Tween Variables var smoothLoop:int = 0; var originalYPosition:Number = 0; var upwardYPosition:Number = -99; //Formatting String function formatCount(i:int):String { var fraction:int = i % 100; var whole:int = i / 100; return ("0000000" + whole).substr(-7, 7) + "." + (fraction < 10 ? "0" + fraction : fraction); } //First Digit 'trigger set by using var upwardPosition as a constant' function checkOdometerPosition(event:Event):void{ if (seconds9.y <= upwardYPosition){ var toText:String = formatCount(fcount); //seconds9.firstDigit.text = formatCount(fcount); seconds9.firstDigit.text = toText.substr(9, 9); seconds9.y = originalYPosition; seconds8.firstDigit.text = toText.substr(8, 8); seconds8.y = originalYPosition; seconds7dec.firstDigit.text = toText.substr(7, 7); seconds7dec.y = originalYPosition; seconds6.firstDigit.text = toText.substr(6, 6); seconds6.y = originalYPosition; seconds5.firstDigit.text = toText.substr(5, 5); seconds5.y = originalYPosition; seconds5.firstDigit.text = toText.substr(4, 4); seconds5.y = originalYPosition; seconds3.firstDigit.text = toText.substr(3, 3); seconds3.y = originalYPosition; seconds2.firstDigit.text = toText.substr(2, 2); seconds2.y = originalYPosition; seconds1.firstDigit.text = toText.substr(1, 1); seconds1.y = originalYPosition; seconds1.firstDigit.text = toText.substr(1, 1); seconds1.y = originalYPosition; seconds0.firstDigit.text = toText.substr(0, 1); seconds0.y = originalYPosition; } } //Second Digit function incrementCounter(event:TimerEvent):void{ count++; fcount=int(count) if (smoothLoop < 9){ smoothLoop++; } else { smoothLoop = 0; } var lolly:String = formatCount(fcount-1); //seconds9.secondDigit.text = formatCount(fcount); seconds9.secondDigit.text = lolly.substr(9, 9); var addTween9:Tween = new Tween(seconds9, "y", Strong.easeOut,0,-222, .7, true); seconds8.secondDigit.text = lolly.substr(8, 8); var addTween8:Tween = new Tween(seconds8, "y", Strong.easeOut,0,-222, .7, true); seconds7dec.secondDigit.text = lolly.substr(7, 7); var addTween7dec:Tween = new Tween(seconds7dec, "y", Strong.easeOut,0,-222, .7, true); seconds6.secondDigit.text = lolly.substr(6, 6); var addTween6:Tween = new Tween(seconds6, "y", Strong.easeOut,0,-222, .7, true); seconds5.secondDigit.text = lolly.substr(5, 5); var addTween5:Tween = new Tween(seconds5, "y", Strong.easeOut,0,-222, .7, true); seconds4.secondDigit.text = lolly.substr(4, 4); var addTween4:Tween = new Tween(seconds4, "y", Strong.easeOut,0,-222, .7, true); seconds3.secondDigit.text = lolly.substr(3, 3); var addTween3:Tween = new Tween(seconds3, "y", Strong.easeOut,0,-222, .7, true); seconds2.secondDigit.text = lolly.substr(2, 2); var addTween2:Tween = new Tween(seconds2, "y", Strong.easeOut,0,-222, .7, true); seconds1.secondDigit.text = lolly.substr(1, 1); var addTween1:Tween = new Tween(seconds1, "y", Strong.easeOut,0,-222, .7, true); seconds0.secondDigit.text = lolly.substr(0, 1); var addTween0:Tween = new Tween(seconds0, "y", Strong.easeOut,0,-222, .7, true); } Ex A has 10 text objects, each with a pair of text fields. It’s move complex than Ex B, because it has a Y animation and pairs of numbers. The text objects are animated to create a scrolling effect. It moves vertically, and has a lead number and a catch up number contained in each symbol. See illustration for more description. The counters are set to 2,200,000.00, just to see if the numbers are populating. Ex B work fine! for example only //STRING SPLITTER COUNTER with nine individual text fields //Timer settings var delay:uint = 1000/100; var repeat:uint = 0; var timer:Timer; timer = new Timer(delay,repeat); timer.addEventListener(TimerEvent.TIMER, incrementCounter); timer.start(); //Integer values var count:int = 0; var fcount:int = 0; //Format Count function formatCount(i:int):String { var fraction:int = i % 100; var whole:int = i / 100; return ("0000000" + whole).substr(-7, 7) + "." + (fraction < 10 ? "0" + fraction : fraction); } //Split strings off to individual text fields function incrementCounter(event:TimerEvent) { count++; fcount=int(count+220000000) var toText:String = formatCount(fcount); mytext9.text = toText.substr(9, 9); mytext8.text = toText.substr(8, 8); mytext7dec.text = toText.substr(7, 7); mytext6.text = toText.substr(6, 6); mytext5.text = toText.substr(5, 5); mytext4.text = toText.substr(4, 4); mytext3.text = toText.substr(3, 3); mytext2.text = toText.substr(2, 2); mytext1.text = toText.substr(1, 1); mytext0.text = toText.substr(0, 1); } Here's a link to the files

    Read the article

  • Unnecessary Error Message Being Displayed

    - by ThatMacLad
    I've set up a form to update my blog and it was working fine up until about this morning. It keeps on turning up with an Invalid Entry ID error on the edit post page when I click the update button despite the fact that it updates the homepage. All help is seriously appreciated. <html> <head> <title>Ultan's Blog | New Post</title> <link rel="stylesheet" href="css/editpost.css" type="text/css" /> </head> <body> <div class="new-form"> <div class="header"> </div> <div class="form-bg"> <?php mysql_connect ('localhost', 'root', 'root') ; mysql_select_db ('tmlblog'); if (isset($_POST['update'])) { $id = htmlspecialchars(strip_tags($_POST['id'])); $month = htmlspecialchars(strip_tags($_POST['month'])); $date = htmlspecialchars(strip_tags($_POST['date'])); $year = htmlspecialchars(strip_tags($_POST['year'])); $time = htmlspecialchars(strip_tags($_POST['time'])); $entry = $_POST['entry']; $title = htmlspecialchars(strip_tags($_POST['title'])); if (isset($_POST['password'])) $password = htmlspecialchars(strip_tags($_POST['password'])); else $password = ""; $entry = nl2br($entry); if (!get_magic_quotes_gpc()) { $title = addslashes($title); $entry = addslashes($entry); } $timestamp = strtotime ($month . " " . $date . " " . $year . " " . $time); $result = mysql_query("UPDATE php_blog SET timestamp='$timestamp', title='$title', entry='$entry', password='$password' WHERE id='$id' LIMIT 1") or print ("Can't update entry.<br />" . mysql_error()); header("Location: post.php?id=" . $id); } if (isset($_POST['delete'])) { $id = (int)$_POST['id']; $result = mysql_query("DELETE FROM php_blog WHERE id='$id'") or print ("Can't delete entry.<br />" . mysql_error()); if ($result != false) { print "The entry has been successfully deleted from the database."; exit; } } if (!isset($_GET['id']) || empty($_GET['id']) || !is_numeric($_GET['id'])) { die("Invalid entry ID."); } else { $id = (int)$_GET['id']; } $result = mysql_query ("SELECT * FROM php_blog WHERE id='$id'") or print ("Can't select entry.<br />" . $sql . "<br />" . mysql_error()); while ($row = mysql_fetch_array($result)) { $old_timestamp = $row['timestamp']; $old_title = stripslashes($row['title']); $old_entry = stripslashes($row['entry']); $old_password = $row['password']; $old_title = str_replace('"','\'',$old_title); $old_entry = str_replace('<br />', '', $old_entry); $old_month = date("F",$old_timestamp); $old_date = date("d",$old_timestamp); $old_year = date("Y",$old_timestamp); $old_time = date("H:i",$old_timestamp); } ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <p><input type="hidden" name="id" value="<?php echo $id; ?>" /> <strong><label for="month">Date (month, day, year):</label></strong> <select name="month" id="month"> <option value="<?php echo $old_month; ?>"><?php echo $old_month; ?></option> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> <input type="text" name="date" id="date" size="2" value="<?php echo $old_date; ?>" /> <select name="year" id="year"> <option value="<?php echo $old_year; ?>"><?php echo $old_year; ?></option> <option value="2004">2004</option> <option value="2005">2005</option> <option value="2006">2006</option> <option value="2007">2007</option> <option value="2008">2008</option> <option value="2009">2009</option> <option value="2010">2010</option> </select> <strong><label for="time">Time:</label></strong> <input type="text" name="time" id="time" size="5" value="<?php echo $old_time; ?>" /></p> <p><strong><label for="title">Title:</label></strong> <input type="text" name="title" id="title" value="<?php echo $old_title; ?>" size="40" /> </p> <p><strong><label for="password">Password protect?</label></strong> <input type="checkbox" name="password" id="password" value="1"<?php if($old_password == 1) echo " checked=\"checked\""; ?> /></p> <p><textarea cols="80" rows="20" name="entry" id="entry"><?php echo $old_entry; ?></textarea></p> <p><input type="submit" name="update" id="update" value="Update"></p> </form> <p><strong>Be absolutely sure that this is the post that you wish to remove from the blog!</strong><br /> </p> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <input type="hidden" name="id" id="id" value="<?php echo $id; ?>" /> <input type="submit" name="delete" id="delete" value="Delete" /> </form> </div> </div> </div> <div class="bottom"></div> </body> </html>

    Read the article

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