Search Results

Search found 10789 results on 432 pages for 'ui scripting'.

Page 42/432 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Calling ASP.NET Web API using JQuery ajax - cross site scripting issue

    - by SimonF
    I have a Web API which I am calling using the JQuery ajax function. When I test the service directly (using the Chrome RESTEasy extension) it works fine, however when I call it using the JQuery ajax function I get an error. I'm calling it on port 81: $.ajax({ url: "http://127.0.0.1:81/api/people", data: JSON.stringify(personToCreate), type: "POST", contentType: "application/json;charset=utf-8", statusCode: { 201: function (newPerson) { callback(newPerson); } }, success: function (newPerson) { alert("New person created with an Id of " + newPerson.Id); }, error: function (jqXHR, textStatus, errorThrown) { alert('Error. '+textStatus+'. '+errorThrown); } }); ...but when I trace it using FireBug Lite the response comes from port 82: {"Message":"No HTTP resource was found that matches the request URI 'http://127.0.0.1:82/api/people'.","MessageDetail":"No action was found on the controller 'People' that matches the request."} I think the error is, effectively, due to cross-site scripting being blocked, but I'm not actually cross-site scripting, if you see what I mean. Has anyone else come across this and been able to fix it? Edit: Routing config (global.asax.vb) is: RouteTable.Routes.MapHttpRoute(name:="DefaultApi", routeTemplate:="api/{controller}/{id}", defaults:=New With {Key .id = System.Web.Http.RouteParameter.Optional}) Controller: Public Function PostValue(ByVal departmentid As Integer, ByVal emailaddress As String, ByVal firstname As String, ByVal lastname As String) As Guid Dim context As New WSMModelDataContext Dim bllPeople As New PeopleBLL(context) Return bllPeople.Create(firstname, lastname, emailaddress, departmentid) End Function When I debug it, it doesn't get as far as running the controller, although when calling it through RESTEasy it routes correctly and the controller executes successfully. The only difference seemes to be that wen called through RESTEasy it is (correctly) using http://127.0.0.1:81 but for some reason when called via JQuery/ajax it seems to be using http://127.0.0.1:82.

    Read the article

  • How to justify using a scripting language as part of a project

    - by sylvanaar
    I have a specific project in which I want to use either a scripting language + C, or as an alternative a 100% Java solution. The program adapts a legacy system for use with other moderns systems. Basically, I have few choices as to what language I can use. I have C/C++, Java 1.4, and I have also compiled the Lua for this environment. The program does 'screen scraping' and has to deal with alot of strings. That part of the code is highly variable. Most of the developers at my company use C, so - my original design was to write some portions in C, and use Lua for the part that dealt with strings and changed freqently. I was told 'You have to justify your use of the scripting language.' So i reworked my design using 100% Java, and was told - Java wont have enough performance. You should do the whole thing in C. I'm not controlling lasers or doing image processing - just some screen scraping. I still have to provide justification for using anything but C - so what justification can I provide?

    Read the article

  • Is jQuery Mobile a lightweight version of original jQuery or jQuery UI?

    - by Jitendra Vyas
    Is jQuery Mobile a lightweight version of original jQuery or jQuery UI? Is it a mobile version of jQuery? Whatever we can do with jQuery all possible with jQuery mobile? Will all jQuery selectors work with jQuery mobile? And if I want to use according like this http://www.mix26.com/demo/accordion/index.htm on latest mobiles. Is it possible to make same effect with "jQuery Mobile" library? or I will have to use desktop version of jQuery? On mobile web development, When we should use jQuery and when jQuery Mobile?

    Read the article

  • Jquery UI accordion question - how would you approach this?

    - by E.J. Brennan
    I am using jquery UI accordion control in one of my apps asp.net apps. The data for the accordion comes from a database, and each database record has an ID, a Title Field and a content field. The title is the heading, and the content is the data that shows up when the draw is opened... I'd like to be able to call my page like this: http://www.mywebsite.com/mypage.aspx?ID=123 and have it display all the data (as it does now), but then have the default 'drawer' of the accordion open to the section that corresponds to the ID number passed in on the url...there are about 50 sections on the page. Any suggestions on how to approach this? My questions is specific to the jquery accordion function, the rest I know. So where would be the best place to 'tag' the drawer with the unique ID's, and then what is the snippet of javascript code (I assume) that I would use 'open' that drawer based on the ID passed in?? Thanks!

    Read the article

  • how to autocenter jquery ui dialog whenb resizing browser?

    - by Jorre
    When you use jquery UI dialog, all works well, except for one thing. When the browser is resized, the dialog just stays in it's initial position which can be really annoying. You can test it out on: http://jqueryui.com/demos/dialog/ Click on the "modal dialog" example and resize your browser. I'd love to be able to let dialogs autocenter when the browser resizes. Can this be done in an efficient way for all my dialogs in my app? Thanks a lot!

    Read the article

  • How to enable ajax when deriving from System.Web.UI.WebControls.WebControl on controls that are crea

    - by Dave
    I've built a class that derives from System.Web.UI.WebControl. It basically renders pagination links (same as what you see on top of GridView when enabled) for use above a repeater. I'm creating some anchor tags explicitly inside my nav control obviously, but they don't perform ajax postbacks. My understanding is that ajax requires POSTS to work right? Well, these would be GETs which I think is the problem. Is there a way to achieve what I'm trying to do? Thanks!

    Read the article

  • Xcode / Interface Builder - better workflow from designer to coder?

    - by tbarbe
    Were dealing with some pretty custom UI elements while building our OSX / Cocoa and iPhone / IPad apps. I was wondering if anyone has good recommendations or tricks for getting a better workflow between UI designers and coders while using Xcode / Interface Builder? It seems that many things require programmatic settings with UI editing in Cocoa... if you stray from the pre-built UI elements then you can't really easily drag-drop build a UI... instead we end up handing off a design doc ( photoshop/illustrator ) and then the poor developer has to deal with recreating this masterpiece in code or by using interface builder - usually a combination of both. This work flow is leading us to not so great results and we have to re-iterate around the UI elements to get them to work better. We love CSS and / or Flash designer to developer workflow where the UI could look exactly as it should and the hand off to developer was more seamless. Is there anyone out there who has some tricks - or insights into getting better workflow when using tools like Xcode / Interface Builder and doing Cocoa apps?

    Read the article

  • How can I get to the value of my WPF UserControl DependencyProperty from UI Automation Framework?

    - by Surfbutler
    Hi, I'm having trouble getting access to my WPF UserControl DependencyProperty values through the UI Automation Framework. I've used James McCaffreys article in MSDN as a starting point (Automating IO Tests in WPF Applications, MSDN March 2009), but I can only see properties etc in standard controls such as buttons. I'm assuming there's some Automation interface I have to implement on my UserControl, but what and how? I can already see my control fine e.g. in UISpy, but I can't see the dependency properties within it. Here's what my usercontrol looks like currently in UISpy: AutomationElement General Accessibility AccessKey: "" AcceleratorKey: "" IsKeyboardFocusable: "False" LabeledBy: "(null)" HelpText: "Switches 48v Phantom Power On/Off (for Mic inputs only)." State IsEnabled: "True" HasKeyboardFocus: "False" Identification ClassName: "" ControlType: "ControlType.Custom" Culture: "(null)" AutomationId: "V48SwL" LocalizedControlType: "custom" Name: "" ProcessId: "5684 (VirtualSix)" RuntimeId: "7 5684 40026340" IsPassword: "False" IsControlElement: "True" IsContentElement: "True" Visibility BoundingRectangle: "(140, 457, 31, 20)" ClickablePoint: "155,467" IsOffscreen: "False" ControlPatterns

    Read the article

  • Can jQuery UI's Sortable handle complex selectors for the items option?

    - by jverdi
    I have list items in an unordered list that when double clicked, can be edited in place via a wysiwyg editor. $('ul.mtm_section').sortable({ disabled: true, distance: 10, items: '> li:not(:has(form))' }); My goal is to prevent the list item from being sorted while it is being edited - aka once a form element has been swapped in place of the contents. Unfortunately my selector for items is not working. Is sortable able to handle complex selectors like these? If not, are there other clever means to disable some items from being sortable, perhaps a callback function? I would prefer to rely on this sortable option, as the wysiwyg plugin is deeply nested with jEditable and as far as I know does not open up any events for me to hook into. Using jQuery 1.4.2 and jQuery UI 1.8.1

    Read the article

  • Unresponsive UI when using BeginInvoke

    - by Kazoom
    Bckground I have a networked application written in C#. my server program has a UI and several communication threads, that read from tcp sockets and display messages on controller UI. Communication with each client is done through a seprate thread. When i recieve some stream of messages from one client , the thread for that client writes on UI, which is a richtextbox on a Form. I call SetTextHelper(string text) method of the form. which looks like this private delegate void MyTextUpdateHandler(string text); public void SetTextHelper(string text) { BeginInvoke(new MyTextUpdateHandler(SetText), new object[] { text }); } public setText(string text) { richtext.Text= text; } Question - If i use BeginInvoke my UI is entirely unresponsive when i m writing large stream of data to UI - Invoke solves that problem, but i read that for multi threaded environment where many thereads are sharing same resource Invoke can lead to deadlocks I share the common ichtextbox between around 16 threads - What would be a good desing for my situation?

    Read the article

  • several jquery ui theme switcher problems (cookie, different themes for different pages, etc.)

    - by powerboy
    I just try putting the jquery-ui theme switcher on my website. Seems that there are some problems: Cookie does not work. When I close the browser and reopen the webpage, the default theme will load instead of the one selected before. The selected theme is valid for current page only. If jumping to another page, it will load the default. I want to select once and apply to all pages. There is a flash of the default theme before the selected theme get loaded. Anyone know an easy way deal with these problems? I know I can implement my own cookie solution based on that theme switcher, but I was so surprised that the author did not provide options to do these.

    Read the article

  • jQueryUI widget text plus icon

    - by cf_PhillipSenn
    I have: <div class="ui-widget"> <div class="ui-widget-header"> My Menu<span class="ui-icon ui-icon-circle-triangle-n"></span> </div> <ul class="ui-widget-content"> <li>Menu Item 1</li> <li>Menu Item 2</li> <li>Menu Item 3</li> </ul> </div> Right now, the ui-icon is appearing below "My Menu" Q: How can I get "My Menu" to appear on the same line as the UI widget?

    Read the article

  • refresh a <ui:composition when j_security_check connection interrupted (http 408)

    - by José Osuna Barrios
    I have a "j_security_check connection interrupted (http code 408)" and proposed solution is <meta http-equiv="refresh" content="#{session.maxInactiveInterval}"/> by http://stackoverflow.com/a/2141274/1852036 but my page structure is a composition using a template.xhtml and a view.xhtml like a <ui:composition: my template.xhtml: <html ... <f:view ... <h:body ... <ui:insert name="content"> ... my view.xhtml to refresh when session.maxInactiveInterval <ui:composition ... <ui:define name="content"> ... may anyone help me to do this? I want to refresh this <ui:composition view, I can't use <meta http-equiv="refresh" content="#{session.maxInactiveInterval}"/> on template.xhtml because it's used by several views

    Read the article

  • Should I share UI for objects that use common fields?

    - by wb
    I have a parent class that holds all of the fields that are common between all device types. From that, I have a few derived classes that each hold their unique fields. Say I have device type "Switch" and "Transformer". Both derived classes only have 2-3 of their own unique fields. When doing the UI design (windows forms) in this case. Should I create two separate forms for each device type or create a user control with all fields that are shared among all devices? Thank you.

    Read the article

  • How to pass a parameter to jQuery UI dialog event handler?

    - by bebraw
    I am currently trying to hook up jQuery UI dialog so that I may use it to create new items to my page and to modify ones existing already on the page. I managed in the former. I'm currently struggling in the latter problem, however. I just cannot find a nice way to pass the item to modify to the dialog. Here's some code to illustrate the issue better. Note especially the part marked with XXX. The {{}} parts are derived from Django template syntax: $(".exercise").click(function() { $.post("{{ request.path }}", { action: "create_dialog", exercise_name: $(this).text() }, function(data) { $("#modify_exercise").html(data.content); }, "json" ); $("#modify_exercise").dialog('open'); }); $("#modify_exercise").dialog({ autoOpen: false, resizable: false, modal: true, buttons: { '{% trans 'Modify' %}': function() { var $inputs = $('#modify_exercise :input'); var post_values = {}; $inputs.each(function() { post_values[this.name] = $(this).val(); }); post_values.action = 'validate_form'; //XXX: how to get the exercise name here? post_values.exercise_name = 'foobar'; $.post('{{ request.path }}', post_values, function(data) { if( data.status == 'invalid' ) { $('#modify_exercise').html(data.content); } else { location.reload(); } }, "json" ); } } }); Here's some markup to show how the code relates to the structure: <div id="modify_exercise" class="dialog" title="{% trans 'Modify exercise' %}"> </div> <ul> {% for exercise in exercises %} <li> <a class="exercise" href="#" title="{{ exercise.description }}"> {{ exercise.name }} </a> </li> {% endfor %} </ul>

    Read the article

  • How to map different UI views in a RESTful web application?

    - by MicE
    Hello, I'm designing a web application, which will support both standard UIs (accessed via browsers) and a RESTful API (an XML/JSON-based web service). User agents will be able to differentiate between these by using different values in the Accept HTTP header. The RESTful API will use the following URI structure (example for an "article" resource): GET /article/ - gets a list of articles POST /article/ - adds a new article PUT /article/{id} - updates an existing article based on {id} DELETE /article/{id} - deletes an existing article based on {id} The UI part of the application will however need to support multiple views, for example: a standard resource view a view for submitting a new resource a view for editing an existing resource a view for deleting an existing resource (i.e. display delete confirmation) Note that the latter three views are still accessed via GET, even though they are processed via overloaded POST. Possible solution: Introduce additional parameters (keywords) into URIs which would identify individual views - i.e. on top of the above, the application would support the following URIs (but only for Content-Type: text/html): GET /article/add - displays a form for adding a new article (fetched via GET, processed via POST) GET /article/123 - displays article 123 in "view" mode (fetched via GET) GET /article/123/edit - displays article 123 in "edit" mode (fetched via GET, processed via PUT overloaded as POST) GET /article/123/delete - displays "delete" confirmation for article 123 (fetched via GET, processed via DELETE overloaded as POST) A better implementation of the above might be to put the add/edit/delete keywords into a GET parameter - since they do not change the resource we're working with, it might be better to keep the base URI same for all of them. My question is: How would you map the above URI structure to UIs served to the regular user, considering that there can be several views per each resource, please? Do you agree with the possible solution detailed above, or would you recommend a different approach based on your experience? NB: we've already implemented an application which consists of a standalone RESTful API and a standalone web application. I'm currently looking into options for future projects where these two would be merged together (i.e. in order to reduce overhead). Thank you, M.

    Read the article

  • How can you adjust the height of a jquery UI accordian?

    - by KallDrexx
    In my UI I have an accordian setup that so far functions <div id="object_list"> <h3>Section 1</h3> <div>...content...</div> // More sections </div> The accordian works properly when it is first formed, and it seems to adjust itself well for the content inside each of the sections. However, if I then add more content into the accordian after the .accordian() call (via ajax), the inner for the section ends up overflowing. Since the accordian is being formed with almost no content, all the inner divs are extremely small, and thus the content overflows and you get accordians with scrollbars inside with almost no viewing area. I have attempted to add min-height styles to the object_list div, and the content divs to no avail. Adding the min-height to the inner divs kind of worked, but it messed up the accordian's animations, and adding it to the object_list div did absolutely nothing. How can I get a reasonable size out of the content sections even when there is not enough content to fill those sections?

    Read the article

  • Getting JQuery UI Sortable to work on asp.net ListView items?

    - by Xaisoft
    I have the following ListView in which I am using the JQuery UI sortable function to be able to sort the items in the ListView. The problem is that I can't put a sortable class on the table in the ItemTemplate because it does not work, if I put a class="sortable" on the outer div, it works, but it allows me to sort everything within the ListView, I just want to be able to move sort the tables. Here is the markup <div> //Works here, but hr's become sortable too. <asp:ListView ID="lvwDocuments" runat="server"> <LayoutTemplate> <h3> Documents</h3> <asp:PlaceHolder ID="itemPlaceHolder" runat="server"> </asp:PlaceHolder> </LayoutTemplate> <ItemTemplate> <table class="sortable"> //Does not work Here <tr> <td> <p class="title"> <a runat="server" href='<%#Eval("url") %>'> <%#Eval("title") %></a></p> <br /> <p> <%#Eval("description") %></p> </td> </tr> </table> </ItemTemplate> <ItemSeparatorTemplate> <hr /> </ItemSeparatorTemplate> </div> Also, How can I preserve the sort order even after the page is refreshed.

    Read the article

  • Web UI element to represent two different micro-views of data in the same spot?

    - by Chris McCall
    I've been tasked with laying out a portion of a screen for a customer care (call center) app that serves as sort of a header/summary block at the top of the screen. Here's what it looks like: The important part is in the red box. That little tooltip is the biz's vision for how to represent both the numeric SiteId and the textual Site Name all in the same piece of screen real estate. I asked, and the business thinks the Name is more important than the ID, but lists the Id by default, because the Name can't be truncated in the display, and there's only so much horizontal room to put the data. So they go with the Id, because it's fewer characters, and then they have the user mouse-over the Id to display the name (presumably because the tooltip can be of unlimited width and since it's floating over the rest of the screen, the full name will always be displayed. So, here's my question: Is there some better UI metaphor that I don't know about that could get this job done, while meeting the following constraints?: Does not require the mouse (uses a keyboard shortcut to do the "reveal") Allows the user to copy and paste the name Will not truncate the name Provides for the display of both the ID and name in the same spot Works with IE7

    Read the article

  • Scripting an automated SQLServer 2008 DR move

    - by ItsAMystery
    Hi All We use the built in logshipping in SQLServer to logship to our DR site but once in a month do a DR test which requires us to move back and forth between our Live and BAckup servers. We run multiple (30) databases on the system so manually backing up the final logs and disabling the jobs is too much work and takes too long. I though no problem, I will script it but have run into trouble with it always complaninig that the final logship is too early to apply even though I dont export the final log until putting the database into norecovery mode. Firstly, does any one no a simple and reliable way of doing this? I have lokoed at some 3rd party software (redgate sqlbackup I think it was) but that didnt make it easy in this situation either. What I want to be able to do is basically run a script (a series of stored procedures) to get me to DR and run another to get me back with no dataloss. My scripts are very simplistic at the moment but here they are: 2 servers Primary Paris Secondary ParisT The StartAgentJobAndWait is a script written by someone else (ta) and just checks the jobs have finished or quits it if it never ends. At the moment I am just using a test database called BOB2 but if I can get it working will pass in the database and job names. from PARIS: /* Disable backup job */ exec msdb..sp_update_job @job_name = 'LSBackup_BOB2', @enabled = 0 exec PARIST.msdb..sp_update_job @job_name = 'LSCopy_PARIS_BOB2', @enabled = 0 exec PARIST.msdb..sp_update_job @job_name = 'LSRestore_PARIS_BOB2', @enabled = 0 exec PARIST.master.dbo.DRStage2 ParisT DRStage2 DECLARE @RetValue varchar (10) EXEC @RetValue = StartAgentJobAndWait LSCopy_PARIS_BOB2 , 2 SELECT ReturnValue=@RetValue if @RetValue = 1 begin print 'The Copy Task completed Succesffuly' END ELSE print 'The Copy task failed, This may or may not be a problem, check restore state of database' SELECT @RetValue = 0 EXEC @RetValue = StartAgentJobAndWait LSRestore_PARIS_BOB2 , 2 SELECT ReturnValue=@RetValue if @RetValue = 1 begin print 'The Restore Task completed Succesffuly' END ELSE print 'The Copy task failed, This may or may not be a problem, check restore state of database' exec PARIS.master.dbo.DRStage3 /* Do the last logship and move it to Trumpington */ BACKUP log "BOB2" to disk='c:\drlogshipping\BOB2.bak' with compression, norecovery EXEC xp_cmdshell 'copy c:\drlogshipping \\192.168.7.11\drlogshipping' EXEC PARIST.master.dbo.DRTransferFinish AS BEGIN restore database "BOB2" from disk='c:\drlogshipping\bob2.bak' with recovery

    Read the article

  • Web Server Scripting Hack to Maintain State and Keep a Domain Cookieless

    - by jasonspalace
    Hello, I am looking for a solution on a LAMP server to keep a site cookieless such as "example.com", where static content is served from "static.example.com", and with rules in place to rewrite requests for "www.example.com" to "example.com". I am really hoping to avoid setting up a cookieless domain for the static content due to an unanswered SEO concern with regards to CNAMEing to a CDN. Is there a way, (or safe hack), that can be implemented where a second domain such as "www.example2.com" is CNAMEd, aliased, or otherwise used with "example.com" to somehow trick a php application into maintaining state with a cookie dropped on "www.example2.com" therefore keeping all of "example.com" cookieless? If such a solution is feasible, what implications would exists with regards to SSL and cross-browser compatibility other than requiring users to accept cookies from 3rd party domains and possibly needing an additional SSL to keep the cookie secure? Thanks in advance to all.

    Read the article

  • Scripting a Windows 2008 Cluster from Windows 2003

    - by glancep
    Our current environment is all Windows 2003. When we migrate a new version of our service to the cluster, we first stop the service with a command like: cluster.exe <clusterName> resource "<serviceName>" /offline We do similarly after the migrate to bring the service back online. Now, we are upgrading our environment to new Windows 2008 servers. However, our build/migrate machine will remain Windows 2003. When issuing the same command from Windwos 2003 to Windows 2008, we get: System error 1722 has occurred (0x000006ba). The RPC server is unavailable. We need to be able to remotely administer a Windows 2008 cluster from a Windows 2003 server in an automated fashion (such as the command-line cluster.exe utility). Is this possible? Thanks, Gideon

    Read the article

  • Batch Scripting - Listing files with a specific amount of characters in file name

    - by Jane
    I'm creating a batch script for a class and I've hit a roadblock I have to list all text files whose names are up to seven characters long on the whole c: drive - make the listing output in a wide formant - then append to Batch script file output.txt So far I have -- dir c:*txt/w/o/s/p c:/"My Batch Script File Assigment"/"Output"/"Batch Script File Output Data".txt The above does everything except limit the search to files with only 1-7 characters in their name. If anyone could point me in the right direction I would really appreciate it!

    Read the article

  • ash scripting: space-containing variable refuses to be grepped

    - by Luci Sandor
    I am trying to run the script listed at http://talk.maemo.org/showthread.php?t=70866&page=2 on its intended hardware, a Nokia Linux phone running BusyBox ash. The script receives the name of WiFi network as a parameter, and tries to connect the phone to it. I suspect the script works, but my SSID, BU (802.1x), has space and parentheses in it. So when I type at the command prompt autoconnect.sh BU\ \(802.1x\) I get various errors. First, LIST=`iwconfig wlan0 | awk -F":" '/ESSID/{print $2}'` if [ $LIST = "\"$1\"" ]; then ...fails, even I am connected to the network. The error is not avoided by using single or double quotes instead of escaping characters at the command prompt. Second, if [ -z `iwlist wlan0 scan | grep -m 1 -o \"$1\"` ]; then echo SSID \"$1\" not found; shows that grep does not find the string, although the same grep, typed directly into the command prompt, does find 'BU (802.1x)'. How do I quote $1 in the two circumstances above so that it will work with my network SSID, containing spaces and parentheses? Thank you.

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >