Search Results

Search found 505 results on 21 pages for 'roy chan'.

Page 16/21 | < Previous Page | 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • How can call a jQuery function when it is inside the formview (asp.net control)?

    - by ricky roy
    Hi, All I have a Span in side the Form view. I wanted to Call a Jquery Fucntion when the from load how can i do this? Thanks Waiting for your reply here is my code <asp:FormView ID="FormView1" runat="server" OnItemCommand="FormView1_ItemCommand"> <ItemTemplate> <asp:HiddenField ID="hidProductID" Value='<%#Eval("ProductID") %>' runat="server" /> <asp:HiddenField ID="hidCustomerID" Value='<%#Eval("CustomerID") %>' runat="server" /> <a href='<%=WinToSave.SettingsConstants.SiteURL%>WintoSave/AuctionProduct.aspx?id=<%#Eval("ProductID") %>'> <%#Eval("ProductName")%> </a> <br /> <img src='<%#Eval("ImagePath")%>' alt="Image No available" /> <br /> <asp:Label ID="lblTime" runat="server" Text='<%#Convert.ToDateTime(Eval("ModifiedOn")).ToString("hh:mm:ss") %>'></asp:Label> <span id='Countdown_<%#Eval("ProductID") %>' onload="GetTimeOnLoad('<%#Eval("ModifiedOn")%>','Countdown_<%#Eval("ProductID") %>');"></span> <br /> <asp:Label ID="lblFinalPrice" runat="server" Text='<%#Convert.ToDouble(Eval("FinalPrice")).ToString("#.00")%>'></asp:Label> <br /> <asp:Label ID="lblFullName" runat="server" Text='<%#Eval("FullName") %>'></asp:Label> <br /> <asp:Button ID="btnAddbid" Text="Bid" CommandName="AddBid" CommandArgument='<%#Eval("ID")%>' runat="server" /> </ItemTemplate> </asp:FormView> and following is my jquery code function GetTimeOnLoad(shortly,DivID) { var dt = new Date(shortly); alert(dt); alert(shortly); alert(DivID); var ProductDivID = "#" +DivID; alert(ProductDivID); $(ProductDivID).countdown({ until: dt, onExpiry: liftOff, onTick: watchCountdown, format: 'HMS', layout: '{hnn}{sep}{mnn}{sep}{snn}' }); } function liftOff(){}; function watchCountdown(){}; In above code I Used ' onload="GetTimeOnLoad('<%#Eval("ModifiedOn")%','Countdown_<%#Eval("ProductID") %');" but is not working

    Read the article

  • here is my code in Jquery and Asp.net Unable to get a correct ANS as I am getting from jquery?

    - by ricky roy
    unable to get the correct Ans as i am getting from the Jquery I am using jquery.countdown.js here is my code [WebMethod] public static String GetTime() { DateTime dt = new DateTime(); dt = Convert.ToDateTime("April 9, 2010 22:38:10"); return dt.ToString("dddd, dd MMMM yyyy HH:mm:ss"); } html file <script type="text/javascript" src="Scripts/jquery-1.3.2.js"></script> <script type="text/javascript" src="Scripts/jquery.countdown.js"></script> <script type="text/javascript"> $(function() { var shortly = new Date('April 9, 2010 22:38:10'); var newTime = new Date('April 9, 2010 22:38:10'); //for loop divid /// $('#defaultCountdown').countdown({ until: shortly, onExpiry: liftOff, onTick: watchCountdown, serverSync: serverTime }); $('#div1').countdown({ until: newTime }); }); function serverTime() { var time = null; $.ajax({ type: "POST", //Page Name (in which the method should be called) and method name url: "Default.aspx/GetTime", // If you want to pass parameter or data to server side function you can try line contentType: "application/json; charset=utf-8", dataType: "json", data: "{}", async: false, //else If you don't want to pass any value to server side function leave the data to blank line below //data: "{}", success: function(msg) { //Got the response from server and render to the client time = new Date(msg.d); alert(time); }, error: function(msg) { time = new Date(); alert('1'); } }); return time; } function watchCountdown() { } function liftOff() { } </script>

    Read the article

  • Can search engines index JavaScript generated web pages?

    - by Roy
    Can search engines such as Google index JavaScript generated web pages? When you right click and select view source in a page that is generated by JavaScript (e.g using GWT) you do not see the dynamically generated HTML. I suppose that if a search engine also cannot see the generated HTML then there is not much to index, right?

    Read the article

  • how do I migrate Datamapper on appengine

    - by Roy
    I've changed my model from class Place include DataMapper::Resource has n, :trails property :id, Serial property :name, String, :length => 140 property :tag, String, :required => true timestamps :at end to class Place include DataMapper::Resource has n, :trails property :id, Serial property :name, String, :length => 140 property :tag, String, :required => true property :trail_count, Integer, :default => 0 timestamps :at end I just added "property :trail_count, Integer, :default = 0" and i want to migrate the existing appengine table to have the extra field "trail_count" i've read that DataMapper.auto_upgrade! should do it. but i get an error "undefined method `auto_upgrade!' for DataMapper:Module" can you please help How do i migrate the DM models?

    Read the article

  • Postback Removing Styling from Page

    - by Roy
    Hi, Currently I've created a ASP.Net page that has a dropdown control with autopostback set to true. I've also added color backgrounds for individual listitems. Whenever an item is selected in the dropdown control the styling is completely removed from all of the list items. How can I prevent this from happening? I need the postback to pull data based on the dropdown item that is selected. Here is my code. aspx file: <asp:DropDownList ID="EmpDropDown" AutoPostBack="True" OnSelectedIndexChanged="EmpDropDown_SelectedIndexChanged" runat="server"> </asp:DropDownList> <asp:TextBox ID="MessageTextBox" TextMode="MultiLine" Width="550" Height="100px" runat="server"></asp:TextBox> aspx.cs code behind: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GetEmpList(); } } protected void EmpDropDown_SelectedIndexChanged(object sender, EventArgs e) { GetEmpDetails(); } private void GetEmpList() { SqlDataReader dr = ToolsLayer.GetEmpList(); int currentIndex = 0; while (dr.Read()) { EmpDropDown.Items.Add(new ListItem(dr["Title"].ToString(), dr["EmpKey"].ToString())); if (dr["Status"].ToString() == "disabled") { EmpDropDown.Items[currentIndex].Attributes.Add("style", "background-color:red;"); } currentIndex++; } dr.Close(); } private void GetEmpDetails() { SqlDataReader dr = ToolsLayer.GetEmpDetails(EmpDropDown.SelectedValue); while (dr.Read()) { MessageTextBox.Text = dr["Message"].ToString(); } dr.Close(); } Thank You

    Read the article

  • How to apply CSS theme to only a specific jQuery-UI element?

    - by Thierry-Dimitri Roy
    I have a web site already build with my own CSS theme. I'm using jQuery UI "tabs" widget but no CSS from jQuery-UI. Now, I'm trying to add the "Date Picker" widget in one of my page. It would be great if I could reuse jQuery-UI default theme which is just fine. The problem is that the date picker theme is also applied to my tabs CSS. For example the "ui-widget" css properties is applied to both date picker and tabs elements. I can't seem to find a way to apply the css properties to only the date picker. I can't see a "super selector" that only applies to the date picker DIV. What would be the best way to handle this? [EDIT] The datepicker widget is really the problem. I cannot apply CSS style specific to it. Here is the starting code of the DIV that get pops up: <div style="position: absolute; top: 300.4px; left: 149px; display: block;" id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"><div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all"> As such, I cannot add a super selector. What would be great would be that the date picker widget supports CSS scope. But it does not. I'm stuck manually editing the jQuery CSS file. The Date Picker is currently being refactored. Hopefully the new code will address this issue.

    Read the article

  • Chartfx new chart object not initialized?

    - by Roy
    When I create a new chart object via: ChartFX.WebForms.Chart theChart = new ChartFX.WebForms.Chart(); When I took a look immediately the row after creation via breakpoint in Visual Studio 2005 I noticed there are 3 rows in the newly created chart that have data. Is this a bug? or do I need to call a specific function? Shouldn't the data table for the chart be initialized to all 0's?

    Read the article

  • git init template, replacing modified hooks

    - by Roy Kolak
    I am constantly updating my local git hooks. I have a repo to house my .git template. This means that I am constantly running git init --template=../git-template to update repos with my hook changes. Problem: Everytime I run git init --temp..., I need to first remove the hooks in .git/hooks that will be replaced with the updated hooks. This is annoying. I know I can script the removal of these hooks from the repo that I want to update, but is this functionality built into git already?

    Read the article

  • MVC4 - how to vaildate a drop down list?

    - by Grant Roy
    I have a .Net MVC4 model / view with a number of [Required] fields, one of which is selected via a drop down list, "Content_CreatedBy" [the first code block below]. Client side validation fires on all fields except the DDL [although server side validation does not allow no entry in DDL]. I have tried validating on the DDL text as well its numeric value but niether fire on the client side. Can anyone see what I am doing wrong? Thanks Model [Required] [Display(Name = "Author")] [ForeignKey("ContentContrib")] [Range(1, 99, ErrorMessage = "Author field is required.")] public virtual int Content_CreatedBy { get; set; } [Required] [Display(Name = "Date")] public virtual DateTime Content_CreatedDate { get; set; } [Required] [DataType(DataType.MultilineText)] [Display(Name = "Source / Notes ")] [StringLength(10, MinimumLength = 3)] public virtual string Content_Sources { get; set; } [Required] [Display(Name = "Keywords")] [StringLength(50, MinimumLength = 3)] public virtual string Content_KeyWords { get; set; } VIEW <div class="editor-label"> @Html.LabelFor(model => model.Content_CreatedBy, new { @class="whitelabel"}) </div> <div class="editor-field"> @Html.DropDownList("Content_CreatedBy", String.Empty) @Html.EditorFor(model => model.Content_CreatedBy) @Html.ValidationMessageFor(model => model.Content_CreatedBy) </div>

    Read the article

  • Is Graphics.DrawImage asynchronous?

    - by Roy
    Hi all, I was just wondering, is Graphics.DrawImage() asynchronous? I'm struggling with a thread safety issue and can't figure out where the problem is. if i use the following code in the GUI thread: protected override void OnPaint(PaintEventArgs e) { lock (_bitmapSyncRoot) { e.Graphics.DrawImage(_bitmap, _xPos, _yPos); } } And have the following code in a separate thread: private void RedrawBitmapThread() { Bitmap newBitmap = new Bitmap(_width, _height); // Draw bitmap // Bitmap oldBitmap = null; lock (_bitmapSyncRoot) { oldBitmap = _bitmap; _bitmap = newBitmap; } if (oldBitmap != null) { oldBitmap.Dispose(); } Invoke(Invalidate); } Could that explain an accessviolation exception? The code is running on a windows mobile 6.1 device with compact framework 3.5.

    Read the article

  • Prevent strings stored in memory from being read by other programs

    - by Roy
    Some programs like ProcessExplorer are able to read strings in memory (for example, my error message written in the code could be displayed easily, even though it is compiled already). Imagine if I have a password string "123456" allocated sequentially in memory. What if hackers are able to get hold of the password typed by the user? Is there anyway to prevent strings from being seen so clearly? Oh yes, also, if I hash the password and sent it from client to server to compare the stored database hash value, won't the hacker be able to store the same hash and replay it to gain access to the user account? Is there anyway to prevent replaying? Thank You!

    Read the article

  • Displaying paragraphs in HTML

    - by Roy
    Hi all, I'm writing a web application which needs to bring the stored paragraphs into the front web. The text come from excel work sheet and contains control characters like indent. I want to show the text in the exactly manner as it was in excel. How can I do that then? Thanks in advance.

    Read the article

  • How to change value inside a JSON string.

    - by Jeremy Roy
    I have a JSON string array of objects like this. [{"id":"4","rank":"adm","title":"title 1"}, {"id":"2","rank":"mod","title":"title 2"}, {"id":"5","rank":"das","title":"title 3"}, {"id":"1","rank":"usr","title":"title 4"}, {"id":"3","rank":"ref","title":"title 5"}] I want to change the title value of it, once the id is matching. So if my variable myID is 5, I want to change the title "title 5" to new title, and so on. And then I get the new JSON array to $("#rangArray").val(jsonStr); Something like $.each(jsonStr, function(k,v) { if (v==myID) { this.title='new title'; $("#myTextArea").val(jsonStr); } }); Here is the full code. $('img.delete').click(function() { var deltid = $(this).attr("id").split('_'); var newID = deltid[1]; var jsonStr = JSON.stringify(myArray); $.each(jsonStr, function(k,v) { if (v==newID) { // how to change the title jsonStr[k].title = 'new title'; alert(jsonStr); $("#rangArray").val(jsonStr); } }); }); The above is not working. Any help please?

    Read the article

  • Echo mysql results in a loop?

    - by Roy D. Porter
    I am using turn.js to make a book. Every div within the 'deathnote' div becomes a new page. <div id="deathnote"> //starts book <div style="background-image:url(images/coverpage.jpg);"></div> //creates new page <div style="background-image:url(images/paper.jpg);"></div> //creates new page <div style="background-image:url(images/paper.jpg);"></div> //creates new page </div> //ends book What I am doing is trying to get 3 'content' (content being a name and cause of death) divs onto 1 page, and then generate a new page. So here is what i want: <div id="deathnote"> //starts book <div style="background-image:url(images/coverpage.jpg);"></div> //creates new page <div style="background-image:url(images/paper.jpg);"></div> //creates new page <div style="background-image:url(images/paper.jpg);"> //creates new page but leaves it open <div> CONTENT </div> <div> CONTENT </div> <div> CONTENT </div> </div> //ends the page </div> //ends book Seems simple enough, however the content is data from a MySQL DB, so i have to echo it in using PHP. Here is what i have so far <div id="deathnote"> <div style="background-image:url(images/coverpage.jpg);"></div> <div style="background-image:url(images/paper.jpg);"></div> <div style="background-image:url(images/paper.jpg);"></div> <div style="background-image:url(images/paper.jpg);"></div> <div style="background-image:url(images/paper.jpg);"></div> <div style="background-image:url(images/paper.jpg);"></div> <?php $pagecount = 0; $db = new mysqli('localhost', 'username', 'passw', 'DB'); if($db->connect_errno > 0){ die('Unable to connect to database [' . $db->connect_error . ']'); } $sql = <<<SQL SELECT * FROM `TABLE` SQL; if(!$result = $db->query($sql)){ die('There was an error running the query [' . $db->error . ']'); } //IGNORE ALL OF THE GARBAGE ABOVE. IT IS SIMPLE CONNECTING SCRIPT THAT I KNOW WORKS //THE METHOD I AM HAVING TROUBLE WITH IS BELOW $pagecount = 0; while($row = $result->fetch_assoc()){ //GETS THE VALUE (and makes sure it isn't nothing echo '<div style="background-image:url(images/paper.jpg);">'; //THIS OPENS A NEW PAGE while ($pagecount !== 3) { //KEEPS COUNT OF HOW MUCH CONTENT DIVS IS ON THE PAGE while($row = $result->fetch_assoc()){ //START A CONTENT DIV echo '<div class="content"><div class="name">' . $row['victim'] . '</div><div class="cod">' . $row['cod'] . '</div></div>'; //END A CONTENT DIV $pagecount++; //UP THE PAGE COUNT } } $pagecount=0; //PUT IT BACK TO 0 echo '</div>'; //END PAGE } $db->close(); ?> <div style="background-image:url(images/backpage.jpg);"></div> //BACK PAGE </div> At the moment i seem to be causing and infinite loop so the page won't load. The problem resides within the while loops. Any help is greatly appreciated. Thanks in advance guys. :)

    Read the article

  • How can call a JQuery function when it in side the from view (asp.net control)?

    - by ricky roy
    Hi, All I have a Span in side the Form view. I wanted to Call a Jquery Fucntion when the from load how can i do this? Thanks Waiting for your reply here is my code <asp:FormView ID="FormView1" runat="server" OnItemCommand="FormView1_ItemCommand"> <ItemTemplate> <asp:HiddenField ID="hidProductID" Value='<%#Eval("ProductID") %>' runat="server" /> <asp:HiddenField ID="hidCustomerID" Value='<%#Eval("CustomerID") %>' runat="server" /> <a href='<%=WinToSave.SettingsConstants.SiteURL%>WintoSave/AuctionProduct.aspx?id=<%#Eval("ProductID") %>'> <%#Eval("ProductName")%> </a> <br /> <img src='<%#Eval("ImagePath")%>' alt="Image No available" /> <br /> <asp:Label ID="lblTime" runat="server" Text='<%#Convert.ToDateTime(Eval("ModifiedOn")).ToString("hh:mm:ss") %>'></asp:Label> <span id='Countdown_<%#Eval("ProductID") %>' onload="GetTimeOnLoad('<%#Eval("ModifiedOn")%>','Countdown_<%#Eval("ProductID") %>');"></span> <br /> <asp:Label ID="lblFinalPrice" runat="server" Text='<%#Convert.ToDouble(Eval("FinalPrice")).ToString("#.00")%>'></asp:Label> <br /> <asp:Label ID="lblFullName" runat="server" Text='<%#Eval("FullName") %>'></asp:Label> <br /> <asp:Button ID="btnAddbid" Text="Bid" CommandName="AddBid" CommandArgument='<%#Eval("ID")%>' runat="server" /> </ItemTemplate> </asp:FormView> and following is my jquery code function GetTimeOnLoad(shortly,DivID) { var dt = new Date(shortly); alert(dt); alert(shortly); alert(DivID); var ProductDivID = "#" +DivID; alert(ProductDivID); $(ProductDivID).countdown({ until: dt, onExpiry: liftOff, onTick: watchCountdown, format: 'HMS', layout: '{hnn}{sep}{mnn}{sep}{snn}' }); } function liftOff(){}; function watchCountdown(){}; In above code I Used ' onload="GetTimeOnLoad('<%#Eval("ModifiedOn")%','Countdown_<%#Eval("ProductID") %');" but is not working

    Read the article

  • Launch SMS from a mobile browser

    - by Roy Rico
    Is it possible to launch SMS/Texting application from a link in a website on a mobile browser? I doubt it's possible globally, but maybe it's possilbe for certain subsets (Blackberry, Windows Mobile, Google Android, etc etc), which we can detect and display.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21  | Next Page >