yui

Can jQuery throw an error from my event handlers?

为君一笑 提交于 2020-01-04 09:37:06
问题 I have an error that occurs in a specific event handler that I setup using jQuery and the code just breaks without any errors being displayed. When I used to code similar things in YUI I would setup YAHOO.util.Event.throwErrors = true; in my dev. version and that was telling YUI's event handler to throw errors. I can't find anything similar, is it just me being blind and not seeing it ? Thanks! Here's an example... <html> <head> <title>jQuery Events</title> </head> <script src="https://www

Can jQuery throw an error from my event handlers?

放肆的年华 提交于 2020-01-04 09:37:05
问题 I have an error that occurs in a specific event handler that I setup using jQuery and the code just breaks without any errors being displayed. When I used to code similar things in YUI I would setup YAHOO.util.Event.throwErrors = true; in my dev. version and that was telling YUI's event handler to throw errors. I can't find anything similar, is it just me being blind and not seeing it ? Thanks! Here's an example... <html> <head> <title>jQuery Events</title> </head> <script src="https://www

YUI - Get True element width?

拟墨画扇 提交于 2020-01-03 12:24:27
问题 I am using YUI and need to get the true width of the element. The width of an element can be determined as follows. width + border-left + border-right + padding-left + padding-right + margin-left + margin-right. Below is what I have come up with. It appears to be working. I was just wondering if this is the best way to go about determining this or is there there a more efficient way? YUI().use('node', function(Y) { var node = Y.one('#nav'); var nodeWidth = trueElementWidth(node); alert

how to get window width and height with YUI?

三世轮回 提交于 2020-01-03 11:27:39
问题 How do I get those values? I see the example on the YUI page to do this but using a click event, and then calling the get('winWidth') method on the event target. But how can I get these values without the use of any event? Thanks 回答1: Simply YAHOO.util.Dom.getViewportWidth(); YAHOO.util.Dom.getViewportHeight(); keep in mind you can reduce YUI namespace as shown bellow (function() { var Yutil = YAHOO.util, Ydom = Ytil.Dom; Ydom.getViewportWidth(); Ydom.getViewportHeight(); })(); 来源: https:/

YUI 3 is going to yui.yahooapis.com to get code. I am HTTPS and content blocked

我是研究僧i 提交于 2020-01-02 03:55:07
问题 I worked this holiday to find out my code wont work on HTTPS. My LOCALDEV is HTTP and our production server is HTTPS. For some reason YUI is going out to get JS, when I have it locally. I have it on the server........... And finally my code: YUI().use('autocomplete', 'autocomplete-filters', 'autocomplete-highlighters', function (Y) { var notes = [ "Dr Follow Up Complete Notes", "Fax Document Notes", "Event Notes", "Email Information Notes", "Corresponding Document Notes", "Return Call Notes",

Save, Edit, Delete, and Cancel events in AlloyUI Scheduler

佐手、 提交于 2020-01-01 17:14:46
问题 How can I listen for the Save, Edit, Delete, and Cancel events from AlloyUI's Scheduler? I need to save the value in our database for future use, but I don't see any documentation for this. The current code that I have is this: YUI().use('aui-scheduler', function(Y) { var items = [ { content: 'Wake Early' }, { content: 'Exercise' }, ]; var schedulerViews = [ new Y.SchedulerWeekView(), new Y.SchedulerDayView(), new Y.SchedulerMonthView(), new Y.SchedulerAgendaView() ]; var eventRecorder = new

ellipsifying the text in a yui datatable

◇◆丶佛笑我妖孽 提交于 2020-01-01 17:12:20
问题 hey I'm looking for a good way to ellipsify text in a yui datatable. By that I mean, formatting the text so that it fits nicely into its cell and has an ellipse (...) trailing it if the text had to be truncated. I want to do this wihtout the use of CSS selectors, because I have a large dataset and selecting each cell by classname would be expensive. Any good suggestions on how to do this using a formatter or something similar. 回答1: I came up with this idea. The script will measure the content

Every flash uploader giving bad progress values

亡梦爱人 提交于 2020-01-01 16:57:10
问题 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

What are the arguments against using a JavaScript Framework for a Web site development company? [closed]

拥有回忆 提交于 2020-01-01 03:41:09
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last month . Our company builds websites and web applications. We are a small firm and our team of developers are always building the javascript functions from scratch or copying from other websites built by us. Every time I bring to the table the word standardization and using a JS

Submitting a form with jQuery/Ajax only works every other time

怎甘沉沦 提交于 2019-12-31 01:49:16
问题 I'm trying to submit a form which includes a file upload via Ajax/jQuery, process the form through a PHP script, and return the result in the div that the form originally resided in. My current form code is: <section id="content-right"> <form name="uploader" id="uploader" method="POST" enctype="multipart/form-data"> <input type="hidden" id="MAX_FILE_SIZE" name="MAX_FILE_SIZE" value="10485760" /> <input type="file" name="fileselect" id="fileselect" /> <input type="submit" name="submit" id=