Search Results

Search found 11001 results on 441 pages for 'native drag drop'.

Page 29/441 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • How to store result of drag and drop as a image

    - by Jimmy
    I want to take the screenshot of the result of drag and drop, but I don't know how to do. Actually, I found 2 javascript and using HTML5 such as html2canvas and canvas2image. I am now combining them together, but it's still meet some problem with the canvas2image. Please help me solve this problem if you have same experience, thank you a lot. Please help me, I've been stock here for days. Drag and drop code. <script> $(function() { $( "#draggable" ).draggable(); $( "#draggable2" ).draggable(); $( "#droppable" ).droppable({ hoverClass: "ui-state-active", drop: function( event, ui ) { $( this ) .addClass( "ui-state-highlight" ) .find( "p" ) .html( "Dropped!" ); } }); }); </script> Image generation code <script> window.onload = function() { function convertCanvas(strType) { if (strType == "JPEG") var oImg = Canvas2Image.saveAsJPEG(oCanvas, true); if (!oImg) { alert("Sorry, this browser is not capable of saving " + strType + " files!"); return false; } oImg.id = "canvasimage"; oImg.style.border = oCanvas.style.border; oCanvas.parentNode.replaceChild(oImg, oCanvas); } function convertHtml(strType) { $('body').html2canvas(); var queue = html2canvas.Parse(); var canvas = html2canvas.Renderer(queue,{elements:{length:1}}); var img = canvas.toDataURL(); convertCanvas(strType); window.open(img); } document.getElementById("html2canvasbtn").onclick = function() { convertHtml("JPEG"); } } </script> HTML code <body> <h3>Picture:</h3> <div id="draggable"> <img src='http://1.gravatar.com/avatar/1ea64135b09e00ab80fa7596fafbd340? s=50&d=identicon&r=R'> </div> <div id="draggable2"> <img src='http://0.gravatar.com/avatar/2647a7d4b4a7052d66d524701432273b?s=50&d=identicon&r=G'> </div> <div id="dCanvas"> <canvas id="droppable" width="500" height="500" style="border: 2px solid gray" class="ui-widget-header" /> </div> <input type="button" id="bGenImage" value="Generate Image" /> <div id="dOutput"></div> </body>

    Read the article

  • Mouseup not working after mousemove on img

    - by leyou
    I'm trying to do a simple drag script. The idea is to save the position when the mouse is down, update the view while the mouse is moving, and stop when mouse is up. Problem, mouseup event isn't working properly. See the code: var target = $('a') var pos = 0; var dragging = false; $(document).mousedown(function(e) { pos=e.pageX; dragging = true }) $(document).mouseup(function() { dragging = false }) $(document).mousemove(function(e) { if(dragging){ target.css('left', e.pageX-pos); } }) ? Why mouseup works with a "a" tag: http://jsfiddle.net/leyou/c3TrG/1/ And why mouseup doesn't work with a "img" tag: http://jsfiddle.net/leyou/eNwzv/ Just try to drag them horizontally. Same probleme on ie9, ff and chrome.

    Read the article

  • Drop duplicated axis label in Flex Chart

    - by Sean Chen
    Hi, All. I use LineChart in Flex with horizontal category axis and I need drop duplicated category label on the chart. The data I use are like that: {Product: "C1", Store: "S1", Profit: "1500}, {Product: "C2", Store: "S1", Profit: "1000}, {Product: "C3", Store: "S2", Profit: "800}, {Product: "C4", Store: "S2", Profit: "1200}, {Product: "C5", Store: "S3", Profit: "1800} Beacuse I set horizontalAxis.categoryField = "Store" , the chart show label "S1,S1,S2,S2,S3" on ths axes. However, both C1 and C2 data point group on the second "S1" category (as same as C3,C4 on second S2). If I accept group data point on the same x-poistion, is there any idea to drop duplicated label?

    Read the article

  • Showing current value in DB in a drop down box

    - by user195257
    Hello, this is my code which populates a drop down menu, all working perfectly, but when editing a database record, i want the first value in the drop down to be what is currently in the database, how would i do this? <li class="odd"><label class="field-title">Background <em>*</em>:</label> <label><select class="txtbox-middle" name="background" /> <?php $bgResult = mysql_query("SELECT * FROM `backgrounds`"); while($bgRow = mysql_fetch_array($bgResult)){ echo '<option value="'.$bgRow['name'].'">'.$bgRow['name'].'</option>'; } ?> </select></li>

    Read the article

  • Find all html characters in drop-down option text and replace them via jQuery

    - by Jon Harding
    I have a dropdown menu that pulls in text from a database column. The database column can include HTML mark-up. In the drop-down I obviously don't need that in the text. I am working on some jquery and it partially accomplished what I'm looking for. However, it seems to only be replacing the first instance of each character $('select option').each(function() { this.text = this.text.replace('&nbsp;', ' '); this.text = this.text.replace('<div>', '' ); this.text = this.text.replace('</div>', '' ); }); Here is the HTML for the drop-down: <select name="ctl00$SubPageBody$ClassList" id="ctl00_SubPageBody_ClassList"> <option value="196">Four Week Series: July 19, 2012, 11:00am-12:00pm&<div>July 26, 2012, 11:00am-12:00pm&nbsp;</div><div>August 2, 2012, 11:00am-12:00pm</div><div>August 9, 2012, 11:00am-12:00pm</div></option> </select>

    Read the article

  • Drop Down List In A Gridview

    - by Or Betzalel
    I have a gridview, inside the gridview I have a template field and inside that, a drop down list. <asp:TemplateField> <ItemTemplate> <asp:DropDownList ID="Hello" runat="server"> </asp:DropDownList> </ItemTemplate> </asp:TemplateField> I want to databind the gridview but how do I make the drop down list change its value to according to the information I gave it while databinding? Im used to using DataField in bound fields <asp:BoundField HeaderText="Hello" DataField="HelloDB" />

    Read the article

  • Getting the text from a drop-down box

    - by Teifion
    This gets the value of whatever is selected in my dropdown menu. document.getElementById('newSkill').value I cannot however find out what property to go after for the text that's currently displayed by the drop down menu. I tried "text" then looked at W3Schools but that didn't have the answer, does anybody here know? For those not sure, here's the HTML for a drop down box. <select name="newSkill" id="newSkill" <option value="1"A skill</option <option value="2"Another skill</option <option value="3"Yet another skill</option </select Thanks

    Read the article

  • button and drop down controls events firing every alternate times

    - by Phani Kumar PV
    I am having a drop down list control and a button in user control. the button click event is registered dynamically. this event i sgetting fired every alternating time. dont know the reason why it is behaving so. later added the selected index changed to the drop down list control. this also is getting fired alternate times. the user control is invoked in a sharepoint web part. any pointers are greatly appreciated..

    Read the article

  • Stop native web app from reloading itself upon opening on iOS

    - by cguedel
    I'm trying to build a "native web app" using HTML + JS on iOS. As you may know you can add such an application to the homescreen and it will more or less look just like a normal native app. However if I quit such an app and reopen it again it reloads the whole page again. This also happens when switching to such an application from another over the multitasking bar. Is this expected behaviour or is there a way to stop the device from doing this? As an example you can add the jqTouch-Demos from here to your homescreen and test it: http://jqtouch.com/preview/demos/main/

    Read the article

  • Will html5 and Javascript replace native applications?

    - by nimo
    I recently attended a conference on future of the web and web development and it was a lot of focus on HTML5 and how it will impact the way we look at the web and how we will use it. The majority of the speakers meant that it will replace native application on your desktop as well as in your mobile phone. I agree that you will be able to make a lot of great stuff with the new technology take bespin for example and the <video> and <canvas> tag will be amazing, but will it completely remove the need for native applications? Is there something you cannot do with Javascript and HTML5?

    Read the article

  • Poplate html drop down box

    - by csU
    how do you populate a drop down html box within a form, but populate it with values from a php array for example <form name="mname" action="index.php" method="post"> <select name='values'> <option> </option> <option> </option> </form> i can do it by echoing it out, thus not needing the form, but i really need to get at the value i am echoing in the drop down box later, so was hoping someone could show me how it can be done like this, using php

    Read the article

  • Conditionally setting the font color of an item in a drop down box in JSF

    - by Greg
    I'm a newbie to web programming, so please bear with me. I am using JSF 1.2 and I want to conditionally set the color of the items in my drop down list. In other words, I have a collection of items that, along with a key and a value, also have a boolean property, warning, that is dynamically set by user action. I want the drop down to show all of the items, but those whose warning property is set to true should be displayed in red. I assume I have to extend the SelectItem class to add in the boolean property. How do I then conditionally set the color of the font of those items whose warning property is set to true in my JSP pages? Thanks in advance

    Read the article

  • How to drop a sortable block?

    - by Pentium10
    I have a list which is reordered using sortable. I defined a trash can div, and I want to achieve that when the blocks are dropped on this div to get deleted. So far I can't seam to fine the way to fire the drop event, when I release the item gets back to his previous position. I have this code: $(document).ready(function() { var order = null; $("#order-list").load(location.href+" #order-list>*",""); $("#order-list").sortable({ handle : '.handle', update : function (e, ui) { order = $(this).sortable('serialize'); $("#info").load("process-sortable.php?"+order); } }); }); and $("#trashcan").droppable({ drop: function(event, ui) { draggedid = ui.draggable.attr('id'); alert(draggedid); // doesn't fire $.get("process-add-subcat.php", { "action" : "delete_subcategory", "draggedid": draggedid }, function(data){ }); } });

    Read the article

  • Ngen or compile to native code is better

    - by Raghav55
    I want to know which is one better native code generated is NGen.exe is better or run time conversion of IL to native code by JIT ? using System; public class Vehicle { public Vehicle() { } public string Name { get; set; } public string Model { get; set; } } class Program { static void Main(string[] args) { Vehicle aVech = new Vehicle(); aVech.Name = "BUS"; aVech.Model = "1980"; } }

    Read the article

  • Ruby on Rail - Format for fetching and displaying Dymanic drop down

    - by Ruby
    Hi, I have 3 tables : Student , Subject and Score Every student can add 3 Subjects (Physics, Mathematics and Chemistry) marks. The combination of (student_id + subject_id) is added to Score table. i.e., capturing that sudent '1' has added 'Mathematics' marks with the actual score (say 0-100 range) student id : subjectid Score 1 Mathematics 95 The Add page of Score has a "subject" drop down. which is displayed from "subject" table. When the student wants to add the 2nd subject marks, in the add page, he should not be displayed the previoys added subject in the drop down. Can any1 tell me how to do this?

    Read the article

  • Get drop down selection from GridView on button press

    - by Chris Stewart
    I have an ASP.NET GridView that has four columns. The first three are typical BoundField elements bound to a DataTable. The forth is a TemplateField element that I create a DropDownList in on the OnRowCreated event for the GridView. What I'm attempting to do is walk down the data source for the GridView when a button is pressed. I really just need to get the values for columns one and four of each row. The first three columns have data as expected but the forth is displaying as empty. Is this because it wasn't a part of the DataTable originally? Is there any way to get the value for each drop down as I've described it, or will I need to rework this so each drop down list is a part of the DataTable?

    Read the article

  • Drop Columns R Data frame

    - by Btibert3
    I have a number of columns that I would like to drop from a data frame. I know that we can drop them using something like: df$x <- NULL but I was hoping to do this with less commands. Also, I know that I could use this: df[ -c(1,3:6, 12) ] but I am concerned that the relative position of my variables may change. Given how powerful R is, I figured I would ask to see if there is another way beyond dropping each column 1 by 1. Thanks in advance.

    Read the article

  • Change selected value of drop down list with jQuery

    - by Phairoh
    I have a drop down list with known values. What I'm trying to do is set the drop down list to a particular value that I know exists using jQuery. Using regular JavaScript, I would do something like: ddl = document.getElementById("ID of element goes here"); ddl.value = 2; // 2 being the value I want to set it to. However, I need to do this with jQuery because I'm using a CSS class for my selector (stupid ASP.NET client ids...). Here are a few things I've tried: $("._statusDDL").val(2); // doesn't find 2 as a value $("._statusDDL").children("option").val(2) // also failed. How can I do it with jQuery?

    Read the article

  • [PyQt4] QFileDialog problem (native: fast but no input field; non-native: has input field but slow)

    - by Bing Jian
    Hi, This seems a known problem but I have not found a good workaround. I like the style of the non-native QFileDialog, especially the feature that allows the user to input the path directly which is very convenient since the user can easily copy/paste the folder/file name from other applications. However, it seems very slow when the dialog is first launched. The native option is quite responsive but the problem is that it does not provide an input field so for the user to select a folder he/she has to walk into the directory, which can take many mouse clicks and is not fun. I am not sure if you have experienced similar problem or if I miss something. BTW, my PyQt version is 4.4.3 and I am working on Windows XP. Thanks, Bing

    Read the article

  • drop right menu

    - by undef
    I'm looking for a drop-right menu, not dropdown. Based on list of lists, ex html <ul> <li> item1 <li> fold1 <ul><li> fold1it1 <li> fold1it2 </ul> <li> item2 <li> fold2 <ul><li> fold2it1 <li> fold2it2 </ul> </ul> When you mousover fold1, it would expand to the right right (drop right) item1 fold1 fold1it1 fold1it2 fold2it3 item2 fold2 I'm looking for really simple to understand css example, or some kind of jquery plugin Thanks

    Read the article

  • Correct Sql Script for Formula

    - by Madan Madan
    Can anyone help me write SQL script for the following formula? If DEP = 1 If DROP 1 PLV = 334.86 * exp(0.3541 * ACTIVE_DAYS) + 0.25 * DROP + 20 * DEP Else If DROP < 0 PLV = DROP + 70 * ACTIVE_DAYS Else PLV = 0.25 * DROP + 70 * ACTIVE_DAYS The SQL script which I have is the following SELECT IF(dep=1, if(dep=1, (334.86 * exp(0.3541 * act_days)) + (0.25 * 'drop') + (20 * dep), if('drop'<0, 'drop' + (70 * act_days), (0.25 * 'drop') + (70 * act_days))),'0') as PLV But the above query is not right as something is missing where the formula says Else PLV = 0.26 * DROP Thanks,

    Read the article

  • pyqt QTreeWidget setItemWidget dissapears after drag/drop

    - by mleep
    I'm trying to keep a widget put into a QTreeWidgetItem after a reparent (drag and drop) using QTreeWidget.setItemWidget() But the result, if you compile the following code - is that the widget inside the QTreeWidgetItem disappears. Any idea why? What code would fix this (repopulate the QTreeWidgetItem with the widget I guess?) from PyQt4.QtCore import * from PyQt4.QtGui import * class InlineEditor (QWidget): _MUTE = 'MUTE' def __init__ (self, parent): QWidget.__init__ (self, parent) self.setAutoFillBackground (True) lo = QHBoxLayout() lo.setSpacing(4) self._cbFoo = QComboBox() for x in ["ABC", "DEF", "GHI", "JKL"]: self._cbFoo.addItem(x) self._leBar = QLineEdit('', self) lo.addWidget (self._cbFoo, 3) lo.addSpacing (5) lo.addWidget (QLabel ( 'Bar:')) lo.addWidget (self._leBar, 3) lo.addStretch (5) self.setLayout (lo) class Form (QDialog): def __init__(self,parent=None): QDialog.__init__(self, parent) grid = QGridLayout () tree = QTreeWidget () # Here is the issue? tree.setDragDropMode(QAbstractItemView.InternalMove) tree.setColumnCount(3) for n in range (2): i = QTreeWidgetItem (tree) # create QTreeWidget the sub i i.setText (0, "first" + str (n)) # set the text of the first 0 i.setText (1, "second") for m in range (2): j = QTreeWidgetItem(i) j.setText (0, "child first" + str (m)) #b1 = QCheckBox("push me 0", tree) # this wont work w/ drag by itself either #tree.setItemWidget (tree.topLevelItem(0).child(1), 1, b1) item = InlineEditor(tree) # deal with a combination of multiple controls tree.setItemWidget(tree.topLevelItem(0).child(1), 1, item) grid.addWidget (tree) self.setLayout (grid) app = QApplication ([]) form = Form () form.show () app.exec_ ()

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >