Search Results

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

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

  • Scripting a permanent CTRL / CAPS swap in Gnome?

    - by Duncan Bayne
    I have a bash script that I use to configure a vanilla Ubuntu (10.10 Maverick Meerkat) installation to be exactly the way I want it. I make extensive use of gconftool-2 to configure the desktop, set up shortcut keys, etc. Now, I'm trying to swap the CTRL and CAPS keys. I have found two ways of doing this: In Gnome, go to System - Preferences - Keyboard - Layout - Options and make the change in there. This works well, but I don't know how to script this; the setting doesn't seem to be stored in the usual place as I can't find it with gconf-editor. Add the line setxkbmap -option "ctrl:swapcaps" to my .bashrc file. That works too, until I suspend the machine & then resume it. At that point the CTRL and CAPS behaviour return to normal, until I cause .bashrc to be run again by opening a new shell. This behaviour has been reported as a bug in RedHat. Could someone please suggest a way of switching those keys that is both permanent, and can be scripted? I'm sure I must be missing something obvious here ...

    Read the article

  • Mongo Scripting the shell

    - by cKendrick
    On my production stack, I have a front-end server and a Mongo server. I would like to be able to set a cron job on the front-end server to create some logs daily. I wrote a script that does this: ./mongo server:27017/dbname --quiet my_commands.js If I run it from the Mongo server as above, it works fine. However, I would like to be able to run it from the front-end server. When I try to do that, I get: -bash: mongo: command not found Since mongo is not installed on the front end server, it gives me that error. Is it possible to somehow bind mongo to my mongo on the Mongo server?

    Read the article

  • forfiles.exe scripting

    - by PHLiGHT
    I'm looking to automatically delete files older than 7 days old with forfiles. The code below works when I manually do it it and respond yes to deleting the files. How can I incorporate the yes into this? This is the output E:\Documents and Settings\Administratorforfiles -p "H:\SHARED\Sca ns" -s -m . -d -7 -c "cmd /c del @path" Could Not Find H:\SHARED\Scans.DS_Store H:\SHARED\Scans\XXX\DOC006.XSM*, Are you sure (Y/N)?

    Read the article

  • Scripting around the lack of user:password@domain url functionality in jscript/IE

    - by Idiomatic
    I currently have a jscript that runs a php script on a server for me, dead simple. But... I want to be atleast somewhat secure so I setup a login. Now if I use the regular user:password@domain system it won't work (IE decided it was a security issue). And if I let IE just remember the password then it pops up a security message confirming my login every time (which kills the point of the button). So I need a way to make the security message go away. I could lower security settings, which tbh I am fine with but nothing seems to make it fuck off (there might be some registry setting to change). Find a fix for jscript that will let me use a password in the url. There used to be a regedit that worked for older systems which allowed IE to use url passwords (not working on my 64bit windows7 setup) though I doubt that'd have helped jscript anyways (since it outright crashes). Use an app other than IE. Inwhich case I'm not sure how to go about it, I want it to be responsive and invisible so IE was a good choice. It is near instant. Use XMLHttpRequest instead of IE directly? May even be faster but I've no idea if it'd help or just have the same error. Use a completely different approach. Maybe some app that can script website browsing. var args = {}; var objIEA = new ActiveXObject("InternetExplorer.Application"); if( WScript.Arguments.Item(0) == "pause" ){ objIEA.navigate("http://domain/index.html?pause"); } if( WScript.Arguments.Item(0) == "next" ){ objIEA.navigate("http://domain/index.html?next"); } objIEA.visible = false; while(objIEA.readyState != 4) {} objIEA.quit();

    Read the article

  • weblogic scripting

    - by lepricon123
    How can I write a script to change the minimum password length to 4 characters using WLST Home Credential Mappings Users and Groups weblogic Users and Groups Summary of Security Realms myrealm Providers DefaultAuthenticatorProviderSpecific How can I find the appropriate mbeans information to modify this using weblogic scripting WLST? Thanks

    Read the article

  • jQuery UI portlets - toggle portlets to save to a cookie (half way there!)

    - by Gareth
    Hi, I'm a bit of a jQuery n00b so please excuse me if this seems like a stupid question. I am creating a site using the jQuery UI more specifically the sortable portlets. I have been able store whether or not a portlet is has been open or closed to a cookie. This is done using the following code. The slider ID is currently where the controls are stored to turn each portlet on and off. var cookie = $.cookie("hidden"); var hidden = cookie ? cookie.split("|").getUnique() : []; var cookieExpires = 7; // cookie expires in 7 days, or set this as a date object to specify a date // Remember content that was hidden $.each( hidden, function(){ var pid = this; //parseInt(this,10); $('#' + pid).hide(); $("#slider div[name='" + pid + "']").addClass('add'); }) // Add Click functionality $("#slider div").click(function(){ $(this).toggleClass('add'); var el = $("div#" + $(this).attr('name')); el.toggle(); updateCookie(el); }); $('a.toggle').click(function(){ $(this).parents(".portlet").hide(); // *** Below line just needs to select the correct 'id' and insert as selector i.e ('#slider div#block-1') and then update cookie! *** $('#slider div').addClass('add'); }); // Update the Cookie function updateCookie(el){ var indx = el.attr('id'); var tmp = hidden.getUnique(); if (el.is(':hidden')) { // add index of widget to hidden list tmp.push(indx); } else { // remove element id from the list tmp.splice( tmp.indexOf(indx) , 1); } hidden = tmp.getUnique(); $.cookie("hidden", hidden.join('|'), { expires: cookieExpires } ); } }) // Return a unique array. Array.prototype.getUnique = function() { var o = new Object(); var i, e; for (i = 0; e = this[i]; i++) {o[e] = 1}; var a = new Array(); for (e in o) {a.push (e)}; return a; } What I would like to do is also add a [x] into the corner of each portlet to give the user another way of hiding it but I'm unable to currently get this to store within the Cookie using the code above. Can anyone give me a pointer of how I would do this? Thanks in advance! Gareth

    Read the article

  • Detect if visitor is on index page with client side scripting

    - by sterling
    Is it possible to detect if a visitor is on the index page or domain root with client side scripting? I figure javascript would be the best method as I would like to append a value to an image file based on wether a visitor is on the home page or not. Non-index page: <img src="/img/logo.png" /> Index page: <img src="/img/logo-home.png" />

    Read the article

  • ASP .NET Code analysis tool to check cross site scripting

    - by Prashant
    I am aware of a tool which MS has provided which tells you about coss site scripting attack etc. The tool is http://www.microsoft.com/downloads/details.aspx?FamilyId=0178e2ef-9da8-445e-9348-c93f24cc9f9d&displaylang=en But are there tools which you have used for ASP .NET applications which do similar to this and which one is widely used in ASP .Net applications ?

    Read the article

  • More efficient way of updating UI from Service than intents?

    - by Donal Rafferty
    I currently have a Service in Android that is a sample VOIP client so it listens out for SIP messages and if it recieves one it starts up an Activity screen with UI components. Then the following SIP messages determine what the Activity is to display on the screen. For example if its an incoming call it will display Answer or Reject or an outgoing call it will show a dialling screen. At the minute I use Intents to let the Activity know what state it should display. An example is as follows: Intent i = new Intent(); i.setAction(SIPEngine.SIP_TRYING_INTENT); i.putExtra("com.net.INCOMING", true); sendBroadcast(i); Intent x = new Intent(); x.setAction(CallManager.SIP_INCOMING_CALL_INTENT); sendBroadcast(x); Log.d("INTENT SENT", "INTENT SENT INCOMING CALL AFTER PROCESSINVITE"); So the activity will have a broadcast reciever registered for these intents and will switch its state according to the last intent it received. Sample code as follows: SipCallListener = new BroadcastReceiver(){ @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if(SIPEngine.SIP_RINGING_INTENT.equals(action)){ Log.d("cda ", "Got RINGING action SIPENGINE"); ringingSetup(); } if(CallManager.SIP_INCOMING_CALL_INTENT.equals(action)){ Log.d("cda ", "Got PHONE RINGING action"); incomingCallSetup(); } } }; IntentFilter filter = new IntentFilter(CallManager.SIP_INCOMING_CALL_INTENT); filter.addAction(CallManager.SIP_RINGING_CALL_INTENT); registerReceiver(SipCallListener, filter); This works however it seems like it is not very efficient, the Intents will get broadcast system wide and Intents having to fire for different states seems like it could become inefficient the more I have to include as well as adding complexity. So I was wondering if there is a different more efficient and cleaner way to do this? Is there a way to keep Intents broadcasting only inside an application? Would callbacks be a better idea? If so why and in what way should they be implemented?

    Read the article

  • Game engine with python scripting?

    - by Kayle
    Looking to put together a 3D side-scrolling action platformer. Since this is my first time trying to put together a non-simple adventure game, I'm at a loss for which engine to consider. I would prefer one that supports scripting in python, since that's my primary language. Without tight controls, the game will suck... so speed is a priority. Cross-platform is also important to me. Any suggestions?

    Read the article

  • php vs bash for CLI scripting?

    - by fayer
    i have never used PHP with CLI, but i have seen scripts run with php code. i was wondering, why should we use bash, when php is so popular and is able to run in CLI. what are the pros and cons with each one? should i use php for all CLI scripting in the future?

    Read the article

  • Best language for scripting large scale file management

    - by Dan
    The National Park Service's Natural Sounds Program collects multiple terabytes of data each year measuring soundscapes. In your opinion, what is best available scripting language to manage massive amounts of files and file types? We would like to easily design and run efficient user-friendly scripts to search for and retrieve/create copies of files that may be located in different directories according a single static hierarchy. The OS will most likely be windows. Thanks!

    Read the article

  • Preventing server-side scripting, XSS

    - by Tim
    Hey all Are there any pre-made scripts that I can use for PHP / MySQL to prevent server-side scripting and JS injections? I know about the typical functions such as htmlentities, special characters, string replace etc. but is there a simple bit of code or a function that is a failsafe for everything? Any ideas would be great. Many thanks :)

    Read the article

  • How do I connect multiple sortable lists to each other in jQuery UI?

    - by Abs
    I'm new to jQuery, and I'm totally struggling with using jQuery UI's sortable. I'm trying to put together a page to facilitate grouping and ordering of items. My page has a list of groups, and each group contains a list of items. I want to allow users to be able to do the following: 1. Reorder the groups 2. Reorder the items within the groups 3. Move the items between the groups The first two requirements are no problem. I'm able to sort them just fine. The problem comes in with the third requirement. I just can't connect those lists to each other. Some code might help. Here's the markup. <ul id="groupsList" class="groupsList"> <li id="group1" class="group">Group 1 <ul id="groupItems1" class="itemsList"> <li id="item1-1" class="item">Item 1.1</li> <li id="item1-2" class="item">Item 1.2</li> </ul> </li> <li id="group2" class="group">Group 2 <ul id="groupItems2" class="itemsList"> <li id="item2-1" class="item">Item 2.1</li> <li id="item2-2" class="item">Item 2.2</li> </ul> </li> <li id="group3" class="group">Group 3 <ul id="groupItems3" class="itemsList"> <li id="item3-1" class="item">Item 3.1</li> <li id="item3-2" class="item">Item 3.2</li> </ul> </li> </ul> I was able to sort the lists by putting $('#groupsList').sortable({}); and $('.itemsList').sortable({}); in the document ready function. I tried using the connectWith option for sortable to make it work, but I failed spectacularly. What I'd like to do is have the every groupItemsX list connected to every groupItemsX list but itself. How should I do that?

    Read the article

  • Should a data warehouse developer know Powershell scripting?

    - by AEngelsrud
    I am a SQL Server (2005 & 2008) data warehouse developer (SSIS, SSAS, SSRS, SQL) and I am wondering if it would be worth the effort and time to learn Powershell scripting. Are there applicable uses from a development perspective? I understand that from a DBA view there is considerable power in Powershell for administration - does any of this translate to useful commands for a developer? Thanks!

    Read the article

  • MetroTwit is a Sleek Native Twitter Client for Your Windows System

    - by Asian Angel
    Do you love the new Metro design and need a native Twitter desktop client for your Windows system too? Then you may want to have a look at MetroTwit. When you kick-start the MetroTwit exe file it will download the necessary .NET Framework components if you do not already have them installed. Once that is finished it will then download the MetroTwit installation files to ensure that you have the latest release. MetroTwit will automatically start once the setup process has finished. From there you can quickly modify the layout (i.e. visible columns, etc.), theme, and other UI features to make MetroTwit right at home on your system. UI features visible in the screenshot above: Top: Access the Settings in the center at the top of the window Bottom: Add Column, Lists, Refresh, Tweet Window, Search Twitter, User Profile, and Twitter Trends As you can see here the Settings are laid out nicely and very easy to navigate through. Features of MetroTwit: Drag and drop image support TwitLonger support for longer tweets Tweet breadcrumbs Infinite scrolling Auto-complete for user names and hashtags Themes and accents Resizable and reorderable columns What The Trend access URL shortening and previews Windows 7 Taskbar integration Quick-glance notifications Flawless high DPI support Note: Requires .NET Framework 4.0. Download MetroTwit [via DownloadSquad] Latest Features How-To Geek ETC What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions How to Enable User-Specific Wireless Networks in Windows 7 How to Use Google Chrome as Your Default PDF Reader (the Easy Way) How To Remove People and Objects From Photographs In Photoshop MetroTwit is a Sleek Native Twitter Client for Your Windows System Make Efficient Use of Tab Bar Space by Customizing Tab Width in Firefox See the Geeky Work Done Behind the Scenes to Add Sounds to Movies [Video] Use a Crayon to Enhance Engraved Lettering on Electronics Adult Swim Brings Their Programming Lineup to iOS Devices Feel the Chill of the South Atlantic with the Antarctica Theme for Windows 7

    Read the article

  • Skip CodedUI Tests, use Selenium for Web Automation

    - by Aligned
    Originally posted on: http://geekswithblogs.net/Aligned/archive/2013/10/31/skip-codedui-tests-use-selenium-for-web-automation.aspxI recently joined a team that was using Agile Methodologies to create a new product. They have a working beta product after 10 or so 2 week sprints and already had UI’s that had changed several times as they went through iterations of their UI. As a result, the QA team was falling behind with automated tests and I was tasked to help them catch up and expand their tests. The project is a website. I heard many complaints about how hard it is to work with CodedUI (writing our own code, not relying on the recorder as we wanted re-usable and more maintainable code) then it took me 4+ hours to fix one issue. It was hard to traverse the key and debugging the objects with breakpoints… I said out loud “there has to be a better way or a framework the uses jQuery to run through the tests.” Plus it seemed really slow (wait… finding the object … wait… start putting in text…). Plus some tests would randomly fail on the test agents (using the test settings and an automated build, they are run on VMs using Microsoft test agents). Enough complaining. Selenium to the rescue (mostly). The lead QA guy decided to try it out and we haven’t turned back. We are now running tests in Chrome and Firefox and they run a lot faster. We had IE running to, but some of the tests were running fine locally, but hanging on the test agents. I’ll add some hints and lessons learned in a later post.

    Read the article

  • Testing a codebase with sequential cohesion

    - by iveqy
    I've this really simple program written in C with ncurses that's basically a front-end to sqlite3. I would like to implement TDD to continue the development and have found a nice C unit framework for this. However I'm totally stuck on how to implement it. Take this case for example: A user types a letter 'l' that is captured by ncurses getch(), and then an sqlite3 query is run that for every row calls a callback function. This callback function prints stuff to the screen via ncurses. So the obvious way to fully test this is to simulate a keyboard and a terminal and make sure that the output is the expected. However this sounds too complicated. I was thinking about adding an abstraction layer between the database and the UI so that the callback function will populate a list of entries and that list will later be printed. In that case I would be able to check if that list contains the expected values. However, why would I struggle with a data structure and lists in my program when sqlite3 already does this? For example, if the user wants to see the list sorted in some other way, it would be expensive to throw away the list and repopulate it. I would need to sort the list, but why should I implement sorting when sqlite3 already has that? Using my orginal design I could just do an other query sorted differently. Previously I've only done TDD with command line applications, and there it's really easy to just compare the output with what I'm expected. An other way would be to add CLI interface to the program and wrap a test program around the CLI to test everything. (The way git.git does with it's test-framework). So the question is, how to add testing to a tightly integrated database/UI.

    Read the article

  • Issues using SoapUI with Eclipse

    - by Epitaph
    I get the following in the Error log when using the latest SoapUI 3.5. plugin in Eclipse Galileo on Ubuntu. Also, this seems to continually freeze Eclipse. I have tried a complete uninstall and restarting Eclipse with -clean argument to no avail. Has anyone encountered the same issue? Is there anything I can do to fix this? Could not acquire children from extension: com.eviware.soapui.eclipse.projectContent for Plugin org.eclipse.ui.navigator java.lang.NullPointerException at org.eclipse.ui.internal.navigator.NavigatorContentService.rememberContribution(NavigatorContentService.java:686) at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.getElements(SafeDelegateTreeContentProvider.java:97) at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.getElements(NavigatorContentServiceContentProvider.java:156) at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:959) at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:703) at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1330) at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:390) at org.eclipse.jface.viewers.AbstractTreeViewer.getFilteredChildren(AbstractTreeViewer.java:636) at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:602) at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2578) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1863) at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:716) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1838) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1794) at org.eclipse.ui.navigator.CommonViewer.internalRefresh(CommonViewer.java:566) at org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredViewer.java:1484) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1392) at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:402) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1353) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1482) at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:548) at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:358) at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:515) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1414) at org.eclipse.jface.viewers.StructuredViewer.addFilter(StructuredViewer.java:582) at org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider.setWorkingSet(WorkingSetActionProvider.java:280) at org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider$3.propertyChange(WorkingSetActionProvider.java:226) at org.eclipse.ui.internal.navigator.extensions.ExtensionStateModel.firePropertyChangeEvent(ExtensionStateModel.java:135) at org.eclipse.ui.internal.navigator.extensions.ExtensionStateModel.setBooleanProperty(ExtensionStateModel.java:90) at org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider.restoreState(WorkingSetActionProvider.java:318) at org.eclipse.ui.navigator.NavigatorActionService.initialize(NavigatorActionService.java:372) at org.eclipse.ui.navigator.NavigatorActionService.getActionProviderInstance(NavigatorActionService.java:355) at org.eclipse.ui.navigator.NavigatorActionService.fillActionBars(NavigatorActionService.java:253) at org.eclipse.ui.navigator.CommonNavigatorManager.selectionChanged(CommonNavigatorManager.java:239) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2132) at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1669) at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1124) at org.eclipse.ui.navigator.CommonViewer.setSelection(CommonViewer.java:380) at org.eclipse.ui.navigator.CommonNavigator.selectReveal(CommonNavigator.java:362) at org.eclipse.ui.internal.navigator.actions.LinkEditorAction$3.run(LinkEditorAction.java:101) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.navigator.actions.LinkEditorAction$2.runInUIThread(LinkEditorAction.java:89) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3468) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3115) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

    Read the article

  • ASP.NET MVC jquery.UI dialog - How to validate the dialog's input on server and return error?

    - by Rick
    I am using jQuery1.4.2, ASP.NET MVC 2 and jQuery.UI-1.8. I am creating a data input dialog which works OK when all the data is valid, but I want to validate the input data on the server and return an error to the dialog describing the error and I am not quite sure how to do that and keep the dialog open. The dialog is opened when a link is clicked. The solution may be to try to bypass more of the MVC framework's default binding that handles the submit button clicks and creates the expected ProfilePermission object and calls the Controller's AddPermission POST Action method, but I was hoping there may be an easier way without have to write more jquery/javascript code to handle the button clicks and pass the data to the server. My script code looks like $("#dialog").dialog({ modal: true, position: ['center', 180], width: 500, height: 130, autoOpen: false }); $(".addPermissionDialog").click(function (event) { event.preventDefault(); $("#dialog").dialog('open'); return false; }); My View <div id="dialog" title="Add Permission"> <%: Html.ValidationSummary("") %> <% using (Html.BeginForm("AddPermission", "Profile")) { %> <%: Html.Hidden("PersonId") %> <%: Html.Hidden("ProfileId") %> <div class="editor-label"> <label for="PersonName">User Name:</label> <%: Html.TextBox("PersonName")%> <label for="PermissionType">Permission:</label> <select name="PermissionTypeId" id="PermissionTypeId" > <option value="2">Edit</option> <option value="3">View</option> </select> </div> <br /> <p> <input type="submit" name="saveButton" value="Add Permission" /> <input type="submit" id="cancelButton" name="cancelButton" value="Cancel" /> <script type="text/javascript"> document.getElementById("cancelButton").disableValidation = true; </script> </p> <% } %> </div> <br /> <p> <%: Html.ActionLink("Add Permission", "AddPermission", new { profileId = Model.First().ProfileId }, new { @class = "addPermissionDialog" })%> </p> My Controller action [AcceptVerbs("Post")] [HandleError] public ActionResult AddPermission(string cancelButton, ProfilePermission profilePermission) { ViewData["Controller"] = controllerName; ViewData["CurrentCategory"] = "AddPermission"; ViewData["ProfileId"] = profilePermission.ProfileId; PermissionTypes permission = repository.GetAccessRights(profilePermission.ProfileId); if (permission == PermissionTypes.View || permission == PermissionTypes.None) { ViewData["Message"] = "You do not have access rights (Edit or Owner permissions) to this profile"; return View("Error"); } // If cancel return to previous page if (cancelButton != null) { return RedirectToAction("ManagePermissions", new { profileId = profilePermission.ProfileId }); } if (ModelState.IsValid) { repository.SavePermission(profilePermission); return RedirectToAction("ManagePermissions", new { profileId = profilePermission.ProfileId }); } // IF YOU GET HERE THERE WAS AN ERROR return PartialView(profilePermission); // The desire is to redisplay the dialog with error message }

    Read the article

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