Fork me on GitHub

Davs Rants and Random Thoughts

YUI Code Samples

June 27th, 2006

Below are links to Code Samples I have posted to the YDN-Javascript Group.

YUI Examples

Other

    216 examples listed. Last updated: Sat, Jan 30th 2010 01:43 PST

    191 Responses to “YUI Code Samples”

    1. vibhu says:

      Hi Dave,
      Thanks for the great widget and keep up the good work!!

      I am struggling to open a new YAHOO.widget.EditorWindow on click of a custom button. Are there any code examples related to this?

      regards
      Vibhu

    2. cesar says:

      Hi Dav,
      I have a problem with “YUI: TabView: disabled tab” example.. the property “cursor: default” doesn’t work in IE .. hand continues to appear on the tab please help me

    3. Mike vL says:

      Hi Dav,

      I am using your “calendar with tooltip” and would like to skin the tooltip but with no luck. Any hints?

    4. ashwin says:

      Hi Dav,

      Iam using yui 2.x. I have included more than one components
      for eg:
      yui/build/yahoo/yahoo-min.js
      yui/build/dom/dom-min.js
      yui/build/animation/animation-min.js
      but every file included will add up to the no of http requests made by the webpage. How can I combine these files into one. Please also let me know if you have an example posted here.

      thanks
      ashwin

    5. Karen says:

      Hi Dav,
      In your fullscreen example at http://blog.davglass.com/files/yui/editor8/
      would it be possible to open that fullscreen in a new window?

      • Dav Glass says:

        Yes it would be possible, however it would be slower. Since you would have to create the window, then create the content, then render a new copy of the Editor in the new window populated with the content from the original. Then you would need to disable the original so they can’t edit in it while the new window is open.

    6. [...] of the YUI Rich Text Editor, Layout Manager, Resize Utility, ImageCropper, and much more. His trove of YUI examples has helped thousands of developers fine tune their own YUI [...]

    7. Dav+e says:

      This may seem like a silly question.. just saying it really makes me think so.

      Think YUI2.x, now think Overlay with Tooltips inside it.

      Won’t work for me in any browser, no errors, my example is not complicated, I swear!

      So, my question, do you know if Container can have nested Containers?

      http://www.codefinger.co.nz/_etc/overlayWithTooltip/example.html

      Any help is unbelievable appreciated at this point – I’m in a state of disbelief, quick, re-convert me to YUI!


      ps. I also have a requirement involving an Overlay inside an Overlay (yay) – but that didn’t work either, I’m assuming it’s the same problem.

      • Dav Glass says:

        Dav+e:

        Here’s an updated version of your issue:
        http://gist.github.com/208489

        • Dav+e says:

          Dav,

          You rock my YUI world – most appreciated, thank you.

          I hadn’t thought to hook into the events in that way, and shall do from now on, what I did manage to do (had a deadline at the time) was call a ‘create tooltips’ function in my click event.

          Am I right in thinking that the original ‘problem’ occurs because there’s no markup rendered for the nested Tooltips to find a home within?

          thanks again, restored my faith in YUI, and forum posting!
          Dav+e

    8. Great site…keep up the good work.

    9. [...] code from Josh’s blog post.Menu-button with Icon Example from Dav Glass: Dav has added to his extensive example repository a new demo showing how to add icons to your Menu Buttons in YUI.YUI on WAMU.org: WAMU (American [...]

    10. Li says:

      Hi Dav,

      I am new to YUI.
      I took your code for snap to grid from “http://github.com/davglass/yui-examples/blob/master/dd27/index.php” into a html file, but I can’t make it work – the object doesn’t move, please help.

      Regards
      Li

    11. aswattha says:

      Hello Dav,

      In your ‘Edit in place’ example can we get editor toolbar at the top which has to be common for all?

      Thanks.

    12. rkat says:

      Hi Dav,

      Can we separate toolbar with the editor container. we need to place toolbar at the top and we may have editable boxes at absolute positions which needs to be editable with the same toolbar.

      Please give us an advice.
      Thanks,
      rkat.

    13. Jeb Seibel says:

      Most excellent examples. Thanks for that!

    14. Ajith Nishantha says:

      Hi,

      I’m new comer to yui and also currently doing project.
      your Example so helps me.
      ThanX lot …………………..

    15. Sasanka Sekhar Banerjee says:

      Hi Dav,

      I want to create a custom image buttom in yui rich text editor. I am able to create the button but not able to attach an image to the button.

      Pls advise.

      This is code snippet :

      myEditor.on(‘toolbarLoaded’, function() {
      var tb = this.toolbar;
      var config = {
      group: ‘Email Customization ‘,
      label: ‘Personalise’,
      buttons: [
      { type: 'push', label: 'Personalise', value: 'First Name' },
      ]
      };
      this.toolbar.addSeparator();
      this.toolbar.addButtonGroup(config);
      }, myEditor, true);
      //
      myEditor.render();

    16. Udit says:

      Hi Dav,
      I have a little problem; I want to save the content of the simple editor.
      Its something like updating the content present in the editor.
      Please help.

      Thank You,
      Udit.

    17. mahcih1 says:

      me too !!!!! the same problem !!!!

    18. Patkar (OP) says:

      Hi Dave,
      1) I am trying few things with YUI RTE . I have added a custom image panel that allows user to get image link from db , overwrite the caption and alignment information and submit the same. On sumbmission I generate a span tag something like this “‘”
      2) The b-rule for images is 1 image per paragraph so I need to associate the above generated span tag with a paragraph id i.e. I have to get the paragraph ids from the rte .
      3) I don’t think Yahoo assigns IDs to paragraphs by default. Can I look into tweaking the stock paragraph tag insertion code to insert an ID automatically. Is this possible? Is there a better wya to do this.

      Also
      4)I have an add page button where I dynamically add a customized editor with a dynamically generated id. I was just wondering what would be the best way to go about it.
      Regards,
      Omkar.

    19. Madz Cali says:

      Hi Dav,

      Happy New Year! How’re you doin’?

      I have read that there is no YUI confirm replacement for the window.confirm because it will not stop the execution of the javascript. Currently, I still don’t know if there is. I read in this forum posted on July 26, 2007, that Samuel posted a solution for this which will use the stopEvent function of the YUI util class. So my question is, is this still possible?

      Thanks.

    20. gatesdawn says:

      Hi Dav,

      I’ve been looking at Yahoo UI Library for the Calendar but I am not able to find anything in the API that will allow me to drag and drop event item(s) (such as appointments) into a calendar day. I should be able to modify each item’s set time and have the item automatically re-order in a list inside the calendar day area depending on the appointment time. Is there a way to do that w/ the API? Can u provide an example.

    21. pradesh says:

      Dav

      You are a dude with soul!

      Just wanted to wish you well for the new year.

      Take care.

    22. Dav Glass says:

      @Peykan –

      You probably forgot to add the handleSubmit config option.

    23. Peykan says:

      Hi Dav,
      I bet you’re asked this question 10 million times, but I went through several sites about YUI and I couldn’t find the answer.
      I am using simple editor at:
      http://www.4400payequity.org/form/order7.htm
      but when I make the changes and submit I see no changes to the text.
      Your help is greatly appreciated……….Peykan.
      Perhaps my form handler is missing a code: here you see it:

      Yahoo Editor

    Leave a Reply

    © 2010 Dav Glass - All content is mine, except comments. Comments are the property of the poster. I speak for no person or company.
    Can you tell me what this says? 01000100 01100001 01110110 01101001 01100100 00100000 01000111 01101100 01100001 01110011 01110011