Search Results

Search found 523 results on 21 pages for 'yui grids'.

Page 6/21 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • jQuery "best practices" is an oxymoron [closed]

    - by n00b
    jQuery "best practices", oxymoron for several reasons sadly To speak candidly, the entire jQuery library has a HIGHLY inconsistent API, and virtually no coding standards. It's basically a subset of JavaScript, a new language if you will, which is probably the most confusing part for normal javascript developers. In my opinion, use normal JavaScript where possible to save on memory consumption. Or, better yet, use a professional tool like YUI. If you already come from a javascript background, you will appreciate it much more than jQuery because it doesn't have n00b wrappers around everything. In tools like YUI, you interact directly with the native DOM to do things, instead of a super-jQuery object that tries to do everything. I'll get voted down for saying the truth. Don't get me wrong, jQuery is cool if you wanna throw something flashy up quick, but if you're going to build a larger app you're going to need a more refined tool (especially since jQuery leaks memory like no other once you start chaining too much things). jQuery does have one of the lowest learning curves, and you won't outgrow it for awhile, but when you do it will be highly apparent and tedious to merge to something else. over 60 years programming experience someone clean this up and community wiki please

    Read the article

  • How to Minify .net AXD Resources

    - by Ilya Biryukov
    Hey I am working on a big .NET project. I am currently creating an automated minifier for JS and CSS files using YUI compressor. After doing some research, I found that the heaviest files in the project are actually .NET resources (Like MS ajax file). They are very big and unminified. I am wondering, is there any way to minify them? Thanks

    Read the article

  • How do I call a basic YUI3 function from within a normal JavaScript function?

    - by Justin Tanner
    I'd like to call a simple YUI3 function from within a JavaScript function. Here is some code that does what I want in a very verbose way: function changeContent (message) { YUI().use("node", function(Y) { Y.all('#content-div').setContent(message); }); } Is there a better way to do this? NOTE: I don't want to attach this function to any event, I just want a global changeContent() function available.

    Read the article

  • How to execute "eval" without writing "eval" in JavaScript

    - by Infinity
    Here's the deal, we have a big JS library that we want to compress, but YUI compressor doesn't fully compress the code if it finds an "eval" statement, out of fear that it will break something else. That's great and all, but we know exactly what is getting eval'd, so we don't want it to get conservative because there's an eval statement in MooTools JSON.decode So basically the question is, is there any alternative (maybe creative) way of writing a expression that returns the eval function? I tried a few, but no dice: window['eval'](stuff); window['e'+'val'](stuff); // stuff runs in the global scope, we need local scope this['eval'](stuff); // this.eval is not a function (new Function( "with(this) { return " + '(' + stuff + ')' + "}"))() // global scope again Any ideas? Thx

    Read the article

  • Charts - Column chart with extra data

    - by Koran
    Hi, I have some data similar to the following chart: http://developer.yahoo.com/yui/examples/charts/charts-seriescustomization_clean.html Only difference is that for each of the fields - I have some other extra data - say For utlilities - I have a cash reserve for utility - as another field. I would prefer this data point to come above the utilities bar. I have been trying from morning to get this chart working, but I am unable to do so. Could you please let me know if it is possible - someway? Thank you very much in advance. Regards K

    Read the article

  • Why does this window object not have the eval function?

    - by Motti
    I ran into an interesting (?) problem in the YUI rich edit demo on IE. When looking at the window object for the content editable frame used as the browser I see that the eval function is undefined (by running the following). javascript:alert(document.getElementById("editor_editor").contentWindow.eval) This only happens on IE (I checked on IE6 and IE8), and it doesn't happen on Firefox or Chrome. All the other window functions and properties seem to be in order, now I realise that eval is not really defined on the window but on the global object but my understanding was that in browsers the window is the global object (also eval does appear on all other windows so why not on this one?). Does anyone know if this is a know bug/limitation in IE and how I can get to eval in the context of the global object of this frame? (I need the side effects to be available to anything running from within this frame).

    Read the article

  • Getting Database Data to the client side.

    - by Toby Allen
    I'm sure this has been asked a million times, but what is the accepted approach to this? I have been writing php code for a while and up until recently I only copied+pasted javascript code, but now with help from YUI I've begun to understand javascript and want to use it more in an existing web app I have. I want to get various amounts of data from databases etc to the clientside javascript. I have access to this data in my php pages when loading. What is the correct way to get this data to my client side script. Generate clientside javascript in my php or smarty template files inserting the data where I need it? Use an Ajax call to retrieve the information I need from a php file - returning JSON data? Generate a JSON data construct of the data needed by the page and either return it via a script inclusion or dumping it to the generated page? Something really obvious I haven't thought of.

    Read the article

  • Every flash uploader giving bad progress values.

    - by Mike Boers
    The file upload script I wrote early last year for an internal website has been misbehaving oddly on a number of machines. On some machines it consistently works fine, on others it consistently misbehaves. I am having exactly the same problem with YUI Uploader, SWFUpload (2.2 and 2.5a), and Uploadify. On the misbehaving machines, the progress event (or callback as the case may be) is reporting the upload going far too quickly. It is progressing around 9 or 10MB/s, instead of the 50 or 60kb/s that is actually going on. The progress bar fills up very quickly, and then no more progress events are triggered. A few minutes later the completion event will trigger when the upload is actually done. I must emphasize that the file upload does proceed normally, even though the progress being reported is very wrong. The progress events are reporting a correct file size, but the reported amount uploaded is usually way too high, and it appears that it is always a multiple of 2^16 (65536). I'm only having this problem with Firefox 3.5 on Windows XP, all of which have various subversions of Flash 10. Has anyone heard of this happening, or have any idea what is going on? (I'm off to go file a number of bug reports, but hopefully someone here has some previous experience with this.)

    Read the article

  • What's the jquery CSS3 selector for excluding nested descendents?

    - by Danjah
    Per my SO question here, which has turned to jquery to solve this, but which may be worked back into YUI if I get my thinking straight, I need a selector to exclude descendents. The solution proposed says something like this: $( '.revealer:not(.revealer > .revealer)' ); To fit more accurately with my situation, because I have multiple HTML chunks to perform the same test on, I have updated it be: $( '#_revealerEl_0 .handle:not(#_revealerEl_0 .reveal .handle)' ); The HTML its selecting on (image there are numerous copies of this same chunk on a page, each needing to be treated alone - an id attribute is assigned to each 'revealer'): <div class="revealer"> <div class="hotspot"> <a class="handle" href="javascript:;">A</a> <div class="reveal"> <p>Content A.</p> </div> <div class="reveal"> <p>Content B.</p> <!-- nested revealer --> <div class="revealer"> <div class="hotspot"> <a class="handle" href="javascript:;">A</a> <div class="reveal"> <p>Sub-content A.</p> </div> <div class="reveal"> <p>Sub-content B.</p> </div> </div> </div> </div> </div> </div> In a nutshell: I need to target 'top level' handles within a 'hotspot', per revealer - and no nested descendents with the same class names. thanks, d

    Read the article

  • Hot to implement grails server-side-triggered dialog, or how to break out of update region after AJA

    - by werner5471
    In grails, I use the mechanism below in order to implement what I'd call a conditional server-side-triggered dialog: When a form is submitted, data must first be processed by a controller. Based on the outcome, there must either be a) a modal Yes/No confirmation in front of the "old" screen or b) a redirect to a new controller/view replacing the "old" screen (no confirmation required). So here's my current approach: In the originating view, I have a <g:formRemote name="requestForm" url="[controller:'test', action:'testRequest']", update:"dummyRegion"> and a <span id="dummyRegion"> which is hidden by CSS When submitting the form, the test controller checks if a confirmation is necessary and if so, renders a template with a yui-based dialog including Yes No buttons in front of the old screen (which works fine because the dialog "comes from" the dummyRegion, not overwriting the page). When Yes is pressed, the right other controller & action is called and the old screen is replaced, if No is pressed, the dialog is cancelled and the "old" screen is shown again without the dialog. Works well until here. When submitting the form and test controller sees that NO confirmation is necessary, I would usually directly redirect to the right other controller & action. But the problem is that the corresponding view of that controller does not appear because it is rendered in the invisble dummyRegion as well. So I currently use a GSP template including a javascript redirect which I render instead. However a javascript redirect is often not allowed by the browser and I think it's not a clean solution. So (finally ;-) my question is: How do I get a controller redirect to cause the corresponding view to "break out" of my AJAX dummyRegion, replacing the whole screen again? Or: Do you have a better approach for what I have in mind? But please note that I cannot check on the client side whether the confirmation is necessary, there needs to be a server call! Also I'd like to avoid that the whole page has to be refreshed just for the confirmation dialog to pop up (which would also be possible without AJAX). Thanks for any hints!

    Read the article

  • Want to show <embed> and <object> tags from YUI editor as a text rather then a video.

    - by user208678
    I am using YUI rich text editor on my website (php/mysql), so that a user may enter textual matter/articles through it. But if a user copies and paste some embed code in the textarea, from any video sites like youtube, it should get saved as a text block and not as a playing video when showing the text content on the browser. Now YUI automatically converts the characters into html entities which ever is needed. Please note that if I put a new line in the yui editor (by pressing "Enter" key), it will be converted into a "<br>" tag in the background and this will not get html entity encoded when passing the value to my backend PHP script. But If I copy and paste any embed tag or for that reason any valid html tags in the textarea, it will be html entity encoded by YUI. Now to support UTF-8 characters, I am using a function (DBVarConv) in my php script before saving it into my database. The code for the function is given below function DBVarConv($var,$isEncoded = false) { if($isEncoded) return addslashes(htmlentities($var, ENT_QUOTES, 'UTF-8', false)); else return htmlentities ($var, ENT_QUOTES, 'UTF-8', false); } $myeditorData = DBVarConv($myeditorData, true); // Save $myeditorData in database. While showing the data in the browser, I am using another function called "smart_html_entity_decode". The code is given below. function smart_html_entity_decode($text, $isAddslashesUsed = false) { if($isAddslashesUsed) $tmp = stripslashes(html_entity_decode($text, ENT_QUOTES, 'UTF-8')); else $tmp = html_entity_decode($text, ENT_QUOTES, 'UTF-8'); if ($tmp == $text) return $tmp; return smart_html_entity_decode($tmp, $isAddslashesUsed); } // Get $myData from database $myData=smart_html_entity_decode($myData, true); echo $myData; The problem is that in doing so, it is also decoding the embed and object tags from their html encoded entities and as a result my obejct tags are shown as a video and not as a simple text. Try using the text editor at tumblr.com. If you paste an embed code in the editor, it will be shown as a text block not as a video. I am trying to build the same functionality on my website with UTF-8 support. Any help will be highly appreciated.

    Read the article

  • Is there a jQuery Equivalent of YUI 2 Custom Event Publish/Subscribe Event Model?

    - by Abe
    Hello! I learned how to develop in Javascript using the YUI 2 library and was wondering if there is a jQuery equivalent of Custom Events (http://developer.yahoo.com/yui/event/#customevent) Specifically, I want to be able to define custom events without having to attach the listeners initially. In YUI, I would create a page class and declare different custom events that can be subscribed to. Below is some example code to demonstrate what I want to do, but with jQuery function ListPage() { var me = this; this.initEvent = new YAHOO.util.CustomEvent("initEvent"); this.init = function() { // initialize events, DOM, etc this.initEvent.fire(me); } } In application Javascript, I would then like to subscribe to the initEvent. var page = new ListPage(); page.initEvent.subscribe( function (type, args) { // do stuff here } ); page.init(); Are there any tutorials/examples of something this in jQuery? I understand I can do something similar using bind() and trigger(), but the impression I get is I have to pass in the event handler when I call bind(). Is it possible in jQuery to create the custom event, but pass in the event handler later? I hope my question makes sense. thanks!

    Read the article

  • Get ant concat to ignore BOM's'?

    - by Breck Fresen
    I have an ant build that concatenates my javascript into one file and then compresses it. The problem is that Visual Studio's default encoding attaches a BOM to every file. How do I configure ant to strip out BOM's that would otherwise appear in the middle of the resulting concatenated file? My googl'ing revealed this discussion which is the exact problem I'm having but doesn't provide a solution: http://marc.info/?l=ant-user&m=118598847927096

    Read the article

  • How to make the yuicompressor jar file a singleton, or globally accessible?

    - by Erik Vold
    I'd like to put the yuicompressor jar file in a single folder so that I can call java -jar yuicompressor-2.4.2.jar ... from anywhere on my system, with cygwin. For bash files I use I simply put them in a common folder, and added the folder's path to my windows user's PATH environment variable and the bash commands were found in cygwin. when I echo $PATH I see the folder I put the yuicompressor jar into listed in the $PATH.. But when I try java -jar yuicompressor-2.4.2.jar ... I get the following error message: Unable to access jarfile yuicompressor-2.4.2.jar Even when I try providing an absolute path to the jarfile I get the same error message.. How can I do this?

    Read the article

  • How to get calculated element width and height in YUI3?

    - by Jaanus
    jQuery has handy .height() and .width() utilities to get calculated displayed size of a DOM element. It also has .position() to get coordinates. In YUI3 Node, I see that there are .getX(), .getY() and .getXY() utilities to get position, but I do not see anything for size (or can't look). What's a good way to get element height and width in YUI3?

    Read the article

  • Sorting datatable column by day name

    - by Eli
    Hi, I have a datatable with day name column. I want to sort this column by day name e.g. if I have [Friday, Monday,Sunday] sorting should return [Monday ,Friday, Sunday] (ascending) and [Sunday,Friday, Monday] (descending). I tried to use custom sorting but I wasn't able to represent my custom order. Do you have ideas ? Thanks

    Read the article

  • jQuery version of YAHOO.lang (isUndefined, isNull, isString etc.)

    - by Chris S
    Does anyone know of a jQuery plugin that has 'helpers' or extensions like those found in the YAHOO.lang namespace? I have in mind functions such as: isNull isDefined isString isFunction I would also appreciate the same kind of thing for strings and arrays, such as Contains, StartsWith (I know these are easy to write, I'm just looking for a plugin that encompasses them all). It's not in the YAHOO.lang namespace but also form related extensions- determining a radiobox's value (from the one checked), a form element's type in a friendly name. Specifically a plugin with fluent API rather than selector based such as $("input[@type=radio][@checked]") Again I'm aware they're easy to implement but I don't want to reinvent the wheel.

    Read the article

  • YAHOO.util.Connect.asyncRequest does not work in Safari

    - by 24x7Programmer
    When I request a webpage using YAHOO.util.Connect.asyncRequest in Safari I always get Communication Failure message in callback's failure properties statusText. The same method works in IE. What could be wrong here? Here is the code. When the code is executed I always get two alerts: "Three" and "communications failure undefined" (corresponding to the second alert in the failure part below.) Also when I attach the debugger and put break point in the SAProvision.aspx's page load event, the break point is not hit. So it is sure that in safari the page is not being called. While the same is called when executed from IE. function ProvisionBlade() { var path = "http://localhost/SC/Dashboard/SAProvision.aspx" YAHOO.util.Connect.asyncRequest("POST", path, callbacks1, null); } var callbacks1 = { success: function(o) { var check = "test"; alert(o.responseText); }, failure: function(o) { alert("Three"); alert(o.statusText + ' ' + o.responseText); } }

    Read the article

  • What is better in WPF for UI layout, using one Grid, or nested Grids.

    - by Matthijs Wessels
    I am making a UI in WPF, I have a bunch of functional areas and I use a Grid to organize it. Now the Grid that I want is not uniform, as in, some functional area will span multiple cells in the Grid. I was wondering what the best practise is in solving this. Should I create one grid and then for each functional area set it to span multiple cells, or should I split it up into multiple nested Grids. In this image, the leftmost panel (panels separated by the gray bar) is what I want. The middle panel shows one grid where the blue lines are overlapped by a functional area. The rightmost panel shows how I could do it with nested grids. You can see the green grid has one horizontal split. In the bottom cell is the yellow Grid with a vertical split. In side the left cell is the red Grid with again a horizontal split. I was just wondering what is best practise, the middle or the right panel.

    Read the article

  • How can I make this run on all my files automatically? YUI Compressor for Visual Studios

    - by chobo2
    Hi So I found this page http://blog.lavablast.com/post/2009/05/YUI-Compressor-for-Visual-Studio.aspx and how to put YUI compressor into Visual studios(I am using visual studios 2010 express). So it got me thinking can I somehow set it in my project to always take my "development scripts" and minify them automatically. Right now if I make a change to my script I have to remember to minify it once I am done otherwise I could be using a out to day version. So it would be cool if I could just set up like so when I build it takes all my development scripts and then minifys them. How could I do something like this?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >