Search Results

Search found 8396 results on 336 pages for 'ui gyun jeong'.

Page 106/336 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • JQuery date picker does not firing in ajax page using Rails

    - by prabu
    Hi Here I have using datepicker from JQueryUI in my public/javascript folder as effects,prototype,control,dragdrop js files. in my public folder contains jqueryui development buddle. (css,js,development-bundle) in layout/application.rhtml <%= stylesheet_link_tag 'application' %> <%=javascript_include_tag :defaults%> <%= stylesheet_link_tag '/jquery-ui/css/custom-theme/jquery-ui-1.8.1.custom.css' %> <%=javascript_include_tag "/jquery-ui/js/jquery-1.4.2.min.js"%> <%=javascript_include_tag "/jquery-ui/js/jquery-ui-1.8.1.custom.min.js"%> <script> $(document).ready(function(){ var $j=jQuery.noConflict(); $j( '#date' ).datepicker({ dateFormat: 'dd-mm-yy' }); }); </script> in home/index.rhtml <%title "Home"%> <%=link_to "Add Details" ,:action=>"add"%> <%=link_to_remote "Ajax Add Details", :update=>"add" , :url=>{ :action=>"add" }%> <div id='add' /> in home/add.rhtml <%title "Add details"%> <%form_tag :action=>"create" do%> Name : <%=text_field_tag "name" ,"",:size=>15%> DOB : <%=text_field_tag "dob","",:id=>"date"%> <%=submit_tag "Save"%> <%end%> the datepicker works when I run home/add.rhtml directly but the datepicker not work when i run ajax page home/index.rhtml Any solutions for that,????

    Read the article

  • JQuery validation not working for checkbox group

    - by Chris Halcrow
    I'm having trouble getting JQuery validation to work with a set of checkboxes. I'm generating the checkboxes using an ASP.NET checkboxlist, and I've used JQuery to set the 'name' attribute to the same thing for each checkbox in the list. Here's the code that gets written to the browser. I'm setting the 'validate' attribute on the 1st checkbox to set the rule that at least one checkbox must be selected. The JQuery validation works for all other elements on the form, but not for the checkbox list. I'm also using a JQuery form wizard on the page which triggers validation for each 'page' of the form, so I don't have control over how the validation is called. <input id="ContentPlaceHolder1_MainContent_AreaOfInterest_0" class="ui-wizard-content ui-helper-reset ui-state-default" type="checkbox" value="Famine" name="hello[]" validate="required:true, minlength:1"> <label for="ContentPlaceHolder1_MainContent_AreaOfInterest_0">Famine</label> <br> <input id="ContentPlaceHolder1_MainContent_AreaOfInterest_1" class="ui-wizard-content ui-helper-reset ui-state-default" type="checkbox" value="Events Volunteer" name="hello[]"> <label for="ContentPlaceHolder1_MainContent_AreaOfInterest_1">Events Volunteer</label> Any ideas on what's going wrong? There are lots of examples of JQuery scripts that will do the validation, however I'm trying to avoid this as I'm generating the checkboxlist server side by a custom control so that it can be re-used across different pages that may or may not have JQuery enabled. I'm trying to enable the JQuery validation whilst being as unobtrusive as possible, so that pages will still work even if JQuery is disabled. Here are the relevant JQuery inclusions and JQuery initialisation script for the form wizard. I'm not using any initialisation code for JQuery validation: <script type="text/javascript" src="../js/formwizard/js/bbq.js"></script> <script type="text/javascript" src="../js/formwizard/js/jquery.form.js"></script> <script type="text/javascript" src="../js/formwizard/js/jquery.form.wizard.js"></script> <script type="text/javascript" src="../js/formwizard/js/jquery.validate.js"></script> <script type="text/javascript"> $(document).ready(function () { $("#form1").formwizard({ validationEnabled: true, focusFirstInput: true }); }); </script>

    Read the article

  • Jquery drag /drop and clone

    - by Sajeev
    Hi I need to achive this .. I have a set of droppable items ( basically I am droping designs on a apparel ) and I am dropping a clone.. If I don't like the dropped object (designs) - I want to delete that by doing something like hidden . But I am unable to do that. Please help me.. here is the code var clone; $(document).ready(function(){ $(".items").draggable({helper: 'clone',cursor: 'hand'}); $(".droparea").droppable({ accept: ".items", hoverClass: 'dropareahover', tolerance: 'pointer', drop: function(ev, ui) { var dropElemId = ui.draggable.attr("id"); var dropElem = ui.draggable.html(); clone = $(dropElem).clone(); // clone it and hold onto the jquery object clone.id="newId"; clone.css("position", "absolute"); clone.css("top", ui.absolutePosition.top); clone.css("left", ui.absolutePosition.left); clone.draggable({ containment: 'parent' ,cursor: 'crosshair'}); $(this).append(clone); alert("done dragging "); /lets assume I have a delete button when I click that clone should dissapear so that I can drop another design - but the following code has no effect //and the item is still visible , how to make it dissapear ? $('#newId').css("visibility","hidden"); } }); });

    Read the article

  • ASP.NET masterpage public variables error

    - by eugeneK
    I have public variable 'MessagePlaceholder' on MasterPage and a Class that accesses this property like that setting it's value to string from getMessage(); ((HttpContext.Current.Handler as System.Web.UI.Page).Master as MasterPage).MessagePlaceholder = getMessage(); which gives me an error like this one Error 3 'System.Web.UI.MasterPage' does not contain a definition for 'MessagePlaceholder' and no extension method 'MessagePlaceholder' accepting a first argument of type 'System.Web.UI.MasterPage' could be found (are you missing a using directive or an assembly reference?) What should i do ?

    Read the article

  • question about jQuery droppable/draggable.

    - by FALCONSEYE
    I modified a sample photo manager application. photo manager application Instead of photos, I have employee records coming from a query. My version will let managers mark employees as on vacation, or at work. One of the things I did is to include employee ids like <a href="123">. I get the ids from event.target. This works for the click function but not for the "droppable" function. This is what I have for the click function: $('ul.gallery > li').click(function(ev) { var $item = $(this); var $unid = ev.target; var $target = $(ev.target); if ($target.is('a.ui-icon-suitcase')) { deleteImage($item,$unid); } else if ($target.is('a.ui-icon-arrowreturnthick-1-w')) { recycleImage($item,$unid); } return false; }); ev.target correctly gives the employee id. when i try the same in one of the droppable functions: $gallery.droppable({ accept: '#suitcase li', activeClass: 'custom-state-active', drop: function(ev, ui) { var $unid = ev.target; alert($unid); recycleImage(ui.draggable,$unid); } }); the alert(ui) gives me [object]. What's in this object? How do i get the href out of this? thanks

    Read the article

  • how to access package explorer element in eclipse plugin

    - by Ankit Malik
    hi i am making an eclipse plugin which make a ui on right clicking a project in eclipse workspce . the ui contains text fields , package explorer for the current project and directory explorer for current project. i have successfully made a ui which appears on clicking a menu item on right clicking the project but it seems i can't make any jface or swt ui since they are not visible when we are using eclipse command hadlers .so in order to overcome it i made dialog pages but they have limited dialog like directorty dialog and file dialog and that too for entire window directory..... but i want package explorer and directory explorer for the project i just chose like it happens when u try making a new class in a project the browse buttons just show packages and directory struture w.r.t to current selection am i doin things wrong or is there a way out please suggest .....

    Read the article

  • Is it possible to guarantee a unique id for multiple items using the same id variable at a point in

    - by Scarface
    First of all, do not be overwhelmed by the long code, I just put it for reference...I have a function that preg_replaces content and puts it in a jquery dialog box with a matching open-link. For example, if there is a paragraph with two matches, they will be put inside two divs, and a jquery dialog function will be echoed twice; one for each div. While this works for one match, if there are multiple matches, it does not. I am not sure how to distribute unique ids at a point in time for each of the divs and matching dialog open-scripts. Keep in mind, I removed the preg replace function since it kind of complicates the problem. If anyone has any ideas, they will be greatly appreciated. <?php $id=uniqid(); $id2=uniqid(); echo "<div id=\"$id2\"> </div>"; ?> $.ui.dialog.defaults.bgiframe = true; $(function() { $("<?php echo"#$id2"; ?>").dialog({hide: 'clip', modal: true ,width: 600,height: 350,position: 'center', show: 'clip',stack: true,title: 'title', minHeight: 25, minWidth: 100, autoOpen: false}); $('<?php echo"#$id"; ?>').click(function() { $('<?php echo"#$id2"; ?>').dialog('open'); }) .hover( function(){ $(this).addClass("ui-state-hover"); }, function(){ $(this).removeClass("ui-state-hover"); } ).mousedown(function(){ $(this).addClass("ui-state-active"); }) .mouseup(function(){ $(this).removeClass("ui-state-active"); }); });

    Read the article

  • C# Serialization Surrogate - Cannot access a disposed object

    - by crushhawk
    I have an image class (VisionImage) that is a black box to me. I'm attempting to serialize the image object to file using Serialization Surrogates as explained on this page. Below is my surrogate code. sealed class VisionImageSerializationSurrogate : ISerializationSurrogate { public void GetObjectData(Object obj, SerializationInfo info, StreamingContext context) { VisionImage image = (VisionImage)obj; byte[,] temp = image.ImageToArray().U8; info.AddValue("width", image.Width); info.AddValue("height", image.Height); info.AddValue("pixelvalues", temp, temp.GetType()); } public Object SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) { VisionImage image = (VisionImage)obj; Int32 width = info.GetInt32("width"); Int32 height = info.GetInt32("height"); byte[,] temp = new byte[height, width]; temp = (byte[,])info.GetValue("pixelvalues", temp.GetType()); PixelValue2D tempPixels = new PixelValue2D(temp); image.ArrayToImage(tempPixels); return image; } } I've stepped through it to write to binary. It seems to be working fine (file is getting bigger as the images are captured). I tried to test it read the file back in. The values read back in are correct as far as the "info" object is concerned. When I get to the line image.ArrayToImage(tempPixels); It throws the "Cannot access a disposed object" exception. Upon further inspection, the object and the resulting image are both marked as disposed. My code behind the form spawns an "acquisitionWorker" and runs the following code. void acquisitionWorker_LoadImages(object sender, DoWorkEventArgs e) { // This is the main function of the acquisition background worker thread. // Perform image processing here instead of the UI thread to avoid a // sluggish or unresponsive UI. BackgroundWorker worker = (BackgroundWorker)sender; try { uint bufferNumber = 0; // Loop until we tell the thread to cancel or we get an error. When this // function completes the acquisitionWorker_RunWorkerCompleted method will // be called. while (!worker.CancellationPending) { VisionImage savedImage = (VisionImage) formatter.Deserialize(fs); CommonAlgorithms.Copy(savedImage, imageViewer.Image); // Update the UI by calling ReportProgress on the background worker. // This will call the acquisition_ProgressChanged method in the UI // thread, where it is safe to update UI elements. Do not update UI // elements directly in this thread as doing so could result in a // deadlock. worker.ReportProgress(0, bufferNumber); bufferNumber++; } } catch (ImaqException ex) { // If an error occurs and the background worker thread is not being // cancelled, then pass the exception along in the result so that // it can be handled in the acquisition_RunWorkerCompleted method. if (!worker.CancellationPending) e.Result = ex; } } What am I missing here? Why would the object be immediately disposed?

    Read the article

  • Creating a Contact form in Visual Studio ASPX and saving to an XML file when clicking SUBMIT

    - by user327137
    hey people hope all is well.. i am trying to create a form in VS using ASP that when upon submitting a form the details will get automatically stored in an xml file which can be accessed later on a chosen file save path i have 2 files ... "Contact.aspx" and "Contact.aspx.vb" i have created the form in the "Contact.aspx" and when trying to enter the fields in the "contact.aspx.vb" i keep getting several errors such as for example... Error 5 'Formatting' is not a member of 'System.Web.UI.WebControls.XmlBuilder' Error 6 'WriteStartDocument' is not a member of 'System.Web.UI.WebControls.XmlBuilder'. Error 7 'WriteComment' is not a member of 'System.Web.UI.WebControls.XmlBuilder'. Error 8 'WriteStartElement' is not a member of 'System.Web.UI.WebControls.XmlBuilder'. Error 10 'WriteAttributeString' is not a member of 'System.Web.UI.WebControls.XmlBuilder'. there is like 30 errors in total... im literally stuck out my head been trying for 2 days now and can't grasp what im doing wrong ive tried even some of the tutorials online but loads of errors... hope some1 can fix this thank you

    Read the article

  • WinForm-style Invoke() in unmanaged C++

    - by Matt Green
    I've been playing with a DataBus-type design for a hobby project, and I ran into an issue. Back-end components need to notify the UI that something has happened. My implementation of the bus delivers the messages synchronously with respect to the sender. In other words, when you call Send(), the method blocks until all the handlers have called. (This allows callers to use stack memory management for event objects.) However, consider the case where an event handler updates the GUI in response to an event. If the handler is called, and the message sender lives on another thread, then the handler cannot update the GUI due to Win32's GUI elements having thread affinity. More dynamic platforms such as .NET allow you to handle this by calling a special Invoke() method to move the method call (and the arguments) to the UI thread. I'm guessing they use the .NET parking window or the like for these sorts of things. A morbid curiosity was born: can we do this in C++, even if we limit the scope of the problem? Can we make it nicer than existing solutions? I know Qt does something similar with the moveToThread() function. By nicer, I'll mention that I'm specifically trying to avoid code of the following form: if(! this->IsUIThread()) { Invoke(MainWindowPresenter::OnTracksAdded, e); return; } being at the top of every UI method. This dance was common in WinForms when dealing with this issue. I think this sort of concern should be isolated from the domain-specific code and a wrapper object made to deal with it. My implementation consists of: DeferredFunction - functor that stores the target method in a FastDelegate, and deep copies the single event argument. This is the object that is sent across thread boundaries. UIEventHandler - responsible for dispatching a single event from the bus. When the Execute() method is called, it checks the thread ID. If it does not match the UI thread ID (set at construction time), a DeferredFunction is allocated on the heap with the instance, method, and event argument. A pointer to it is sent to the UI thread via PostThreadMessage(). Finally, a hook function for the thread's message pump is used to call the DeferredFunction and de-allocate it. Alternatively, I can use a message loop filter, since my UI framework (WTL) supports them. Ultimately, is this a good idea? The whole message hooking thing makes me leery. The intent is certainly noble, but are there are any pitfalls I should know about? Or is there an easier way to do this?

    Read the article

  • Speed up a web service for auto complete and avoid too many method calls.

    - by jphenow
    So I've got my jquery autocomplete 'working,' but its a little fidgety since I call the webservice method each time a keydown() fires so I get lots of methods hanging and sometimes to get the "auto" to work I have to type it out and backspace a bit because i'm assuming it got its return value a little slow. I've limited the query results to 8 to mininmize time. Is there anything i can do to make this a little snappier? This thing seems near useless if I don't get it a little more responsive. javascript $("#clientAutoNames").keydown(function () { $.ajax({ type: "POST", url: "WebService.asmx/LoadData", data: "{'input':" + JSON.stringify($("#clientAutoNames").val()) + "}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { if (data.d != null) { var serviceScript = data.d; } $("#autoNames").html(serviceScript); $('#clientAutoNames').autocomplete({ minLength: 2, source: autoNames, delay: 100, focus: function (event, ui) { $('#project').val(ui.item.label); return false; }, select: function (event, ui) { $('#clientAutoNames').val(ui.item.label); $('#projectid').val(ui.item.value); $('#project-description').html(ui.item.desc); pkey = $('#project-id').val; return false; } }) .data("autocomplete")._renderItem = function (ul, item) { return $("<li></li>") .data("item.autocomplete", item) .append("<a>" + item.label + "<br>" + item.desc + "</a>") .appendTo(ul); } } }); }); WebService.asmx <WebMethod()> _ Public Function LoadData(ByVal input As String) As String Dim result As String = "<script>var autoNames = [" Dim sqlOut As Data.SqlClient.SqlDataReader Dim connstring As String = *Datasource* Dim strSql As String = "SELECT TOP 2 * FROM v_Clients WHERE (SearchName Like '" + input + "%') ORDER BY SearchName" Dim cnn As Data.SqlClient.SqlConnection = New Data.SqlClient.SqlConnection(connstring) Dim cmd As Data.SqlClient.SqlCommand = New Data.SqlClient.SqlCommand(strSql, cnn) cnn.Open() sqlOut = cmd.ExecuteReader() Dim c As Integer = 0 While sqlOut.Read() result = result + "{" result = result + "value: '" + sqlOut("ContactID").ToString() + "'," result = result + "label: '" + sqlOut("SearchName").ToString() + "'," 'result = result + "desc: '" + title + " from " + company + "'," result = result + "}," End While result = result + "];</script>" sqlOut.Close() cnn.Close() Return result End Function I'm sure I'm just going about this slightly wrong or not doing a better balance of calls or something. Greatly appreciated!

    Read the article

  • Object reference not set to an instance of an object.....?

    - by jamal
    Hi guys I always got this error from my site and it keeps bugging me.I've been trying to figure out the cause of this error but I can't really figure it out. Here's the stacktrace: at BasePage.Page_PreInit(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Page.OnPreInit(EventArgs e) at System.Web.UI.Page.PerformPreInit() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) And on my basepage I only got this code: Imports Microsoft.VisualBasic Public Class BasePage Inherits System.Web.UI.Page Private Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit Page.Theme = "Something" If (Request.UserAgent.IndexOf("AppleWebKit") 0) Then Request.Browser.Adapters.Clear() End If End Sub Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender If Me.Title = "Untitled Page" Then Throw New Exception("Page title cannot be ""Untitled Page"".") End If End Sub End Class According to the stacktrace this always happens on my basepage preinit event.What do you think is the problem here guys?

    Read the article

  • How to open form action in Jquery Dialog

    - by user342391
    I have a form: <form style="display: inline;" action="/player.php" method="post"> <input type="hidden" name="recname" value="'.$row['name'].'"> <input type="hidden" name="recordingdesc" value="'.$row['description'].'"> <input type="hidden" name="reclink" value="$_SESSION['customerid'].'-'.$row['timestamp'].'.wav"> <button type="submit" class="tooltip table-button ui-state-default ui-corner-all" title=" rec"><span class="ui-icon ui-icon-volume-on"></span></button> </form> and i want player.php to open in a modal dialog and be able to display the post information how can this be done.

    Read the article

  • Dismiss Menu when Focus is lost, not on mouseout. jQuery

    - by Stacey
    I have jQuery that drops a menu down when its parent is clicked on, and dismisses it when they hover away from the menu. I am wanting to change the behavior so that it only dismisses if they click somewhere else on the page, or a different menu. Is this possible? jQuery.fn.dropdown = function () { return this.each(function () { $('.ui-dropdown-list > li > a').click(function () { $(this).addClass("ui-dropdown-hover"); }); $("ul.ui-dropdown-list > li > a").click(function () { $(this).parent().find("ul").show(); $(this).parent().hover(function () { }, function () { $(this).parent().find("ul").hide(); $(this).find('> a').removeClass("ui-dropdown-hover"); }); }); }); };

    Read the article

  • date picker in two different browsers

    - by Renu123
    Hello, i am workin on asp.net mvc in that i using partial views. i got one proble ie date picker is working properly on IE but it is not working on Mozilla Firefox. the i have used is: <link href="<%=ResolveClientUrl("~/Scripts/Themes/ui-lightness/jquery-ui-1.7.2.custom.css")%>" rel="stylesheet" type="text/css" /> <script src="../Scripts/jquery-1.3.2.js" type="text/javascript"></script> <script src="../Scripts/ui.core.js" type="text/javascript"></script> <script src="../Scripts/ui.datepicker.js" type="text/javascript"></script> and the function on view page is: <script type="text/javascript"> $(document).ready(function() { $("#txtTransationDate").datepicker(); }); </script> <input id="txtTransationDate" name="txtTransationDate" type="text" /> please advice me for it. Thank in advance.

    Read the article

  • How to access widgets created within functions in later function calls in Qt

    - by Inanepenguin
    So currently I have code, in C++, that creates a few QLabels, a QLineEdit, and a QCheckBox when a selection is made from a QComboBox. However, I would like to be able to access the widgets I have created in a later function to destroy them if a new selection is made from the combo box. I am able to access the objects created from using the Designer by doing ui-Object but i am not able to do that with objects created by using my own code. Can I do that some how, because I know how to work with that. In short, I would like to be able to dynamically create/destroy QWidgets based on selections made by the user. Is there a reference I should know of to do this, or any documentation? Or am I just completely going about this the wrong way? Here is the code I presently have for creating the objects: if (eventType == QString::fromStdString("Birthday")) { QLabel *label1 = new QLabel ("Celebrant: "); QLabel *label2 = new QLabel ("Surprise: "); QLineEdit *lineEdit = new QLineEdit; QCheckBox *box = new QCheckBox; ui->gridLayout->addWidget(label1,3,0,1,1, 0); ui->gridLayout->addWidget(label2,4,0,1,1,0); ui->gridLayout->addWidget(lineEdit,3,1,1,1,0); ui->gridLayout->addWidget(box,4,1,1,2,0); }

    Read the article

  • ImageView source scaling done right. How?

    - by Aleksey Malevaniy
    Scope Image bitmap have to be shown as imageView.setImageBitmap(bitmap) and scaled to fit UI. This could be done via: bitmap = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, true); xml's ImageView attributes such as android:layout_width="newWidth" android:layout_height="newHeight" android:adjustViewBounds="true" android:scaleType="fitCenter" Problem Which way is better for performance? I prefer xml 'cause this is UI specific problem and I prefer to use xmls for UI definition. Also we set width/height values in dp, it means we have the same UI for different screens. Thanks!

    Read the article

  • Problem with SqlLite database in Qt SDK 1.0.2

    - by Risino
    Hi I have a problem with SqlLite database. Here is my code: void incomeDialog::on_add_pushButton_clicked() { int a = ui->income_lineEdit->text().toInt(); int b = ui->other_lineEdit->text().toInt(); int c = (a+b); db = QSqlDatabase::addDatabase("QSQLITE"); db.setDatabaseName("money.db"); QSqlQuery query(db); query.exec("create table Income" "(Month TEXT, Payment NUMBER, Other NUMBER, Together NUMBER)"); query.prepare("INSERT INTO Income values (?,?,?,?)"); query.addBindValue(ui->comboBox->currentText()); query.addBindValue(ui->income_lineEdit->text().toInt()); query.addBindValue(ui->other_lineEdit->text().toInt()); query.addBindValue(c); query.exec(); } I use qt sdk 1.0.2. After building shows errors: Undefined reference to 'QSqlDatabase::addDatabase(QString const&, QString const&)... all errors is similar (Undefined reference to 'QSqlDatabase:: Do you have any idea how to repair it?

    Read the article

  • Gridview Datasource Server error

    - by salvationishere
    I am developing a C# VS 2008 and SQL Server 2008 website. However, I get the below error now when I first run this: The DataSourceID of 'GridView1' must be the ID of a control of type IDataSource. A control with ID 'AdventureWorks3.mdf' could not be found What is causing this error? Here is my default.aspx file. I have configured GridView1 to use my AdventureWorks3.mdf file, stored in my App_Data folder. Do I need to add this folder name to this ASPX file? <%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server"> <asp:Panel runat="server" ID="AuthenticatedMessagePanel"> <asp:Label runat="server" ID="WelcomeBackMessage"></asp:Label> <table> <tr > <td> <asp:Label ID="tableLabel" runat="server" Font-Bold="True" Text="Select target table:"></asp:Label> </td> <td> <asp:Label ID="inputLabel" runat="server" Font-Bold="True" Text="Select input file:"></asp:Label> </td></tr> <tr><td valign="top"> <asp:Label ID="feedbackLabel" runat="server"></asp:Label> <asp:GridView ID="GridView1" runat="server" style="WIDTH: 400px;" CellPadding="4" ForeColor="#333333" GridLines="None" onselectedindexchanged="GridView1_SelectedIndexChanged" AutoGenerateSelectButton="True" DataSourceID="AdventureWorks3.mdf" > <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#999999" /> <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> </asp:GridView> </td> <td valign="top"> <input id="uploadFile" type="file" size="26" runat="server" name="uploadFile" title="UploadFile" class="greybar" enableviewstate="True" /> </td></tr> </table> </asp:Panel> <asp:Panel runat="Server" ID="AnonymousMessagePanel"> <asp:HyperLink runat="server" ID="lnkLogin" Text="Log In" NavigateUrl="~/Login.aspx"> </asp:HyperLink> </asp:Panel> </asp:Content> Or what about my ASPX.CS file? Is this the problem? using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Collections.Generic; using System.IO; using System.Drawing; using System.ComponentModel; using System.Data.SqlClient; using ADONET_namespace; using System.Security.Principal; //using System.Windows; public partial class _Default : System.Web.UI.Page //namespace AddFileToSQL { //protected System.Web.UI.HtmlControls.HtmlInputFile uploadFile; protected System.Web.UI.HtmlControls.HtmlInputButton btnOWrite; protected System.Web.UI.HtmlControls.HtmlInputButton btnAppend; protected System.Web.UI.WebControls.Label Label1; protected static string inputfile = ""; public static string targettable; public static string selection; // Number of controls added to view state protected int default_NumberOfControls { get { if (ViewState["default_NumberOfControls"] != null) { return (int)ViewState["default_NumberOfControls"]; } else { return 0; } } set { ViewState["default_NumberOfControls"] = value; } } protected void uploadFile_onclick(object sender, EventArgs e) { } protected void Load_GridData() { GridView1.DataSource = ADONET_methods.DisplaySchemaTables(); GridView1.DataBind(); } protected void btnOWrite_Click(object sender, EventArgs e) { if (uploadFile.PostedFile.ContentLength > 0) { feedbackLabel.Text = "You do not have sufficient access to overwrite table records."; } else { feedbackLabel.Text = "This file does not contain any data."; } } protected void btnAppend_Click(object sender, EventArgs e) { string fullpath = Page.Request.PhysicalApplicationPath; string path = uploadFile.PostedFile.FileName; if (File.Exists(path)) { // Create a file to write to. try { StreamReader sr = new StreamReader(path); string s = ""; while (sr.Peek() > 0) s = sr.ReadLine(); sr.Close(); } catch (IOException exc) { Console.WriteLine(exc.Message + "Cannot open file."); return; } } if (uploadFile.PostedFile.ContentLength > 0) { inputfile = System.IO.File.ReadAllText(path); Session["Message"] = inputfile; Response.Redirect("DataMatch.aspx"); } else { feedbackLabel.Text = "This file does not contain any data."; } } protected void Page_Load(object sender, EventArgs e) { if (Request.IsAuthenticated) { WelcomeBackMessage.Text = "Welcome back, " + User.Identity.Name + "!"; // Reference the CustomPrincipal / CustomIdentity CustomIdentity ident = User.Identity as CustomIdentity; if (ident != null) WelcomeBackMessage.Text += string.Format(" You are the {0} of {1}.", ident.Title, ident.CompanyName); AuthenticatedMessagePanel.Visible = true; AnonymousMessagePanel.Visible = false; //if (!Page.IsPostBack) //{ // Load_GridData(); //} } else { AuthenticatedMessagePanel.Visible = false; AnonymousMessagePanel.Visible = true; } } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = GridView1.SelectedRow; targettable = row.Cells[2].Text; } }

    Read the article

  • When is 'focus' called in 'autocomplete'

    - by user470184
    The 'focus' documentation from http://jqueryui.com/demos/autocomplete/ states : focusType:autocompletefocus Before focus is moved to an item (not selecting), ui.item refers to the focused item. The default action of focus is to replace the text field's value with the value of the focused item, though only if the focus event was triggered by a keyboard interaction. Canceling this event prevents the value from being updated, but does not prevent the menu item from being focused. Code examples Supply a callback function to handle the focus event as an init option. $( ".selector" ).autocomplete({ focus: function(event, ui) { ... } }); Bind to the focus event by type: autocompletefocus. $( ".selector" ).bind( "autocompletefocus", function(event, ui) { ... }); Using below code sets an attribute called 'mytag' with value 'tester' on all of the autocomplete elements even though I have not selected the elements. Why is the attribute 'focus' not added just when one of the drop downs is focused, instead of being added when page is loaded ? $("#myDiv").autocomplete({ source: availableTags, focus: function(event, ui) { $(".ui-autocomplete li").attr("mytag", "tester"); } });

    Read the article

  • How do I pass custom action data from a Visual Studio Setup MSI to an output project via a Merge mod

    - by Lex
    I have a fully working Setup project within Visual Studio 2008 that takes inputs from a UI and passes them via a Custom Action to the output - this works perfectly. Now I have to change this so that the UI is still in a setup project but that the output is within a merge module. The current Custom Action Data looks much like the following with EditHostUrl coming from a UI dialog editbox. /HostUrl="[EditHostUrl]" I now need to pass this value to the merge module and then from there use it as an input for the custom action data to the project output but there does not seem to be any documentation on how to achieve this. To be clear Wix/InstallShield etc... are not currently options. I would also rather not embed the UI within the merge module (for reasons of separation and also it's not supported out of the box with visual studio).

    Read the article

  • CSS/Jquery How can I display a div directly under button?

    - by user342391
    I have a button that when hovered displays a div. How can I postion this div to appear directly under the button when displayed??? <script type="text/javascript"> $(document).ready(function(){ $(".plans").hover(function() { $("#planssubnav").show("slow"); }, function(){ $("#planssubnav").hide("slow"); }); }); </script> <a href="/plans" style="font-size:14px;" class="plans fg-button fg-button-icon-right ui-state-default ui-corner-all"><span class="ui-icon ui-icon-circle-triangle-s"></span>Plans</a> <div id="planssubnav" style="display:none"> <h1> content</h1> </div>

    Read the article

  • Set .aspx page title to that of an Eval

    - by user1860529
    I am trying to use an <%# Eval("name") %> to be the title of my page. I can't seem to figure out any solutions online. I have tried the other StackOverflow question but that did now work either. The page is a bio.aspx and on the site it is displayed as bio.aspx?id=123 so the page title needs to vary depending on the ID. I figured I could just use the Eval("name") but no luck yet. I currently am using JavaScript: window.onload = function() { document.title = '<%# Eval("name") %> | Title Line'; } This works, but it still leaves the title tags empty, and it's kind of spammy. Here is the codebehind: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class DoctorBio : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Page.Title = "Your Page Title"; HtmlMeta metaDescription = new HtmlMeta(); metaDescription.Name = "description"; metaDescription.Content = "brief description"; Page.Header.Controls.Add(metaDescription); HtmlMeta metaKeywords = new HtmlMeta(); metaKeywords.Name = "keywords"; metaKeywords.Content = "keywords, keywords"; Page.Header.Controls.Add(metaKeywords); } protected void SetPageTitle(object title) { this.Title = title.ToString(); } protected string ReplaceLineBreaks(object text) { string newText = text as string; if (newText == null) { return string.Empty; } return newText.Replace("\r\n", "<br />"); } }

    Read the article

  • Googla Maps Javascript API, Jquery Tabs

    - by user1357598
    I have tried everything possible.. unminified all javascript, still can't get the map to load properly inside the tab. Trying to use this custom code too with no success jQuery('.tabs-shortcode > ul').bind('tabsshow', function(e, ui) { if (ui && ui.panel) { jQuery('.mapp-canvas', ui.panel).each(function() { var id = jQuery(this).attr('id'); if (id) { window[id].resize(); } }); } }); webpage: http://bit.ly/UTHskS thanks in advance, Andy

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >