Search Results

Search found 81 results on 4 pages for 'scriptaculous'.

Page 3/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Load script with parameters

    - by Doseke
    Before I used .jsp pages for jsf, and the below code was pretty fine <script language="javascript" src='<%= renderResponse.encodeURL(renderRequest.getContextPath() +"/resources/jsCropperUI/scriptaculous.js?load=effects,builder,dragdrop") %>' > </script> Now, I'm using .xhtml with RichFaces, and the below code does not work <a4j:loadScript src="/resources/jsCropperUI/scriptaculous.js?load=effects,builder,dragdrop"/> Exception is Static resource not found for path /resources/jsCropperUI/scriptaculous.js?load=effects,builder,dragdrop How can I fix this?

    Read the article

  • Magento My Account Layout XML Problem

    - by Remy
    Hi there, I'm having issues getting the customer.xml layout file to work properly for the customer's "my account" pages. The navigation links and the previously ordered items that are usually on the left hand side of the page won't show up on the page, but if I change the reference name to "content" in the xml file, it shows up (except it's obviously then on the right hand side). I've checked the template it's referencing (2columns-left.phtml), and the getChildHtml('left') is there in the correct position. The block that's causing the problem: <customer_account> <!-- Mage_Customer --> <reference name="root"> <action method="setTemplate"><template>page/2columns-left.phtml</template></action> </reference> <reference name="left"> <action method="unsetChild"><name>catalog.navigation.all</name></action> <action method="unsetChild"><name>callout.sendcard</name></action> <action method="unsetChild"><name>callout.specialorder</name></action> <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml"> <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action> <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action> <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action> </block> <block type="sales/reorder_sidebar" name="sale.reorder.sidebar" as="reorder" template="sales/reorder/sidebar.phtml"/> <remove name="tags_popular"/> </reference> </customer_account> This was basically copied straight over from another one of our sites where this works 100%. I've tried everything I can think of (changing the name of the reference in both the template and the layout xml, for example) to no avail. The templates that the layout is referencing are obviously working because they do show up when put into the "content" area. This installation of magento is version 1.3.1.1. I appreciate any advice you have to give me... *Update: I tried changing the reference to "global_messages", and it doesn't show there either. It only seems to work in the "content" section.* Update 2: These are the results of using the "showLayout=page" query string on the page when used with Alan Storm's very handy debugging module (which you'll find in his answer below). <?xml version="1.0"?> <layout><block type="page/html" name="root" output="toHtml" template="page/3columns.phtml"> <block type="page/html_head" name="head" as="head"> <action method="addJs"> <script>prototype/prototype.js</script> </action> <action method="addJs"> <script>prototype/validation.js</script> </action> <action method="addJs"> <script>paypoint/validation.js</script> </action> <action method="addJs"> <script>scriptaculous/builder.js</script> </action> <action method="addJs"> <script>scriptaculous/effects.js</script> </action> <action method="addJs"> <script>scriptaculous/dragdrop.js</script> </action> <action method="addJs"> <script>scriptaculous/controls.js</script> </action> <action method="addJs"> <script>scriptaculous/slider.js</script> </action> <action method="addJs"> <script>varien/js.js</script> </action> <action method="addJs"> <script>varien/form.js</script> </action> <action method="addJs"> <script>varien/menu.js</script> </action> <action method="addJs"> <script>mage/translate.js</script> </action> <action method="addJs"> <script>mage/cookies.js</script> </action> <action method="addCss"> <stylesheet>css/reset.css</stylesheet> </action> <action method="addCss"> <stylesheet>css/boxes.css</stylesheet> </action> <action method="addCss"> <stylesheet>css/clears.css</stylesheet> </action> <action method="addCss"> <stylesheet>css/menu.css</stylesheet> </action> <action method="addCss"> <stylesheet>css/calendar-blue.css</stylesheet> </action> <action method="addCss"> <stylesheet>css/styles.css</stylesheet> </action> <action method="addItem"> <type>skin_css</type> <name>css/iestyles.css</name> <params/> <if>IE</if> </action> <action method="addItem"> <type>skin_css</type> <name>css/ie7.css</name> <params/> <if>IE 7</if> </action> <action method="addItem"> <type>skin_css</type> <name>css/ie7minus.css</name> <params/> <if>lt IE 7</if> </action> <action method="addItem"> <type>js</type> <name>lib/ds-sleight.js</name> <params/> <if>lt IE 7</if> </action> <action method="addItem"> <type>js</type> <name>varien/iehover-fix.js</name> <params/> <if>lt IE 7</if> </action> <action method="addCss"> <stylesheet>css/print.css</stylesheet> <params>media="print"</params> </action> </block> <block type="page/html_header" name="header" as="header"> <block type="page/template_links" name="top.links" as="topLinks"/> <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/> <block type="core/template" name="top.nav" template="page/html/top.nav.phtml"/> </block> <block type="core/messages" name="global_messages" as="global_messages"/> <block type="core/messages" name="messages" as="messages"/> <block type="core/text_list" name="content" as="content"/> <block type="core/text_list" name="right" as="right"/> <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml"/> <block type="core/text_list" name="before_body_end" as="before_body_end"/> </block> <block type="core/profiler" output="toHtml"/> <reference name="top.links"> <action method="addLink" translate="label title" module="customer"> <label>My Account</label> <url helper="customer/getAccountUrl"/> <title>My Account</title> <prepare/> <urlParams/> <position>10</position> </action> </reference> <reference name="root"> <action method="setTemplate"> <template>page/2columns-left.phtml</template> </action> </reference> <reference name="top.menu"> <block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/> </reference> <reference name="footer_links"> <action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"> <label>Site Map</label> <url helper="catalog/map/getCategoryUrl"/> <title>Site Map</title> </action> </reference> <reference name="footer_links"> <action method="addLink" translate="label title" module="catalogsearch" ifconfig="catalog/seo/search_terms"> <label>Search Terms</label> <url helper="catalogsearch/getSearchTermUrl"/> <title>Search Terms</title> </action> <action method="addLink" translate="label title" module="catalogsearch"> <label>Advanced Search</label> <url helper="catalogsearch/getAdvancedSearchUrl"/> <title>Advanced Search</title> </action> </reference> <reference name="top.links"> <block type="checkout/links" name="checkout_cart_link"> <action method="addCartLink"/> <action method="addCheckoutLink"/> </block> </reference> <reference name="footer"> <block type="cms/block" name="cms_footer_links" before="footer_links"> <action method="setBlockId"> <block_id>footer_links</block_id> </action> </block> </reference> <reference name="left"> <block type="tag/popular" name="tags_popular" template="tag/popular.phtm" ignore="1"> <action method="setTemplate"> <template>tag/popular.phtml</template> </action> </block> </reference> <reference name="left"> </reference> <reference name="before_body_end"> <block type="googleanalytics/ga" name="google_analytics" as="google_analytics"/> </reference> <reference name="footer_links"> <action method="addLink" translate="label title" module="contacts" ifconfig="contacts/contacts/enabled"> <label>Contact Us</label> <url>contact-us</url> <title>Contact Us</title> <prepare>true</prepare> </action> </reference> <reference name="footer_links"> <action method="addLink" translate="label title" module="rss" ifconfig="rss/config/active"> <label>RSS</label> <url>rss</url> <title>RSS testing</title> <prepare>true</prepare> <urlParams/> <position/> <li/> <a>class="link-feed"</a> </action> </reference> <reference name="wishlist_sidebar"> <action method="addPriceBlockType"> <type>bundle</type> <block>bundle/catalog_product_price</block> <template>bundle/catalog/product/price.phtml</template> </action> </reference> <reference name="cart_sidebar"> <action method="addItemRender"> <type>bundle</type> <block>bundle/checkout_cart_item_renderer</block> <template>checkout/cart/sidebar/default.phtml</template> </action> </reference> <reference name="root"> <action method="setTemplate"> <template>page/2columns-left.phtml</template> </action> </reference> <reference name="left"> <action method="unsetChild"> <name>catalog.navigation.all</name> </action> <action method="unsetChild"> <name>callout.sendcard</name> </action> <action method="unsetChild"> <name>callout.specialorder</name> </action> <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml"> <action method="addLink" translate="label" module="customer"> <name>account</name> <path>customer/account/</path> <label>Account Dashboard</label> </action> <action method="addLink" translate="label" module="customer"> <name>account_edit</name> <path>customer/account/edit/</path> <label>Account Information</label> </action> <action method="addLink" translate="label" module="customer"> <name>address_book</name> <path>customer/address/</path> <label>Address Book</label> </action> </block> <block type="sales/reorder_sidebar" name="sale.reorder.sidebar" as="reorder" template="sales/reorder/sidebar.phtml"/> <remove name="tags_popular"/> </reference> <reference name="customer_account_navigation"> <action method="addLink" translate="label" module="sales"> <name>orders</name> <path>sales/order/history/</path> <label>My Orders</label> </action> </reference> <reference name="customer_account_navigation"> <action method="addLink" translate="label" module="tag"> <name>tags</name> <path>tag/customer/</path> <label>My Tags</label> </action> </reference> <reference name="customer_account_navigation"> <action method="addLink" translate="label" module="newsletter"> <name>newsletter</name> <path>newsletter/manage/</path> <label>Newsletter Subscriptions</label> </action> </reference> <reference name="cart_sidebar"> <action method="addItemRender"> <type>bundle</type> <block>bundle/checkout_cart_item_renderer</block> <template>checkout/cart/sidebar/default.phtml</template> </action> </reference> <update handle="customer_account"/> <reference name="content"> <block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml"> <block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/> <block type="core/template" name="customer_account_dashboard_top" as="top"/> <block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/> <block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/> <block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/> <block type="core/template" name="customer_account_dashboard_info1" as="info1"/> <block type="core/template" name="customer_account_dashboard_info2" as="info2"/> </block> </reference> <reference name="right"> <action method="unsetChild"> <name>catalog_compare_sidebar</name> </action> </reference> <reference name="customer_account_dashboard"> <action method="unsetChild"> <name>top</name> </action> <block type="sales/order_recent" name="customer_account_dashboard_top" as="top" template="sales/order/recent.phtml"/> </reference> <reference name="right"> <action method="unsetChild"> <name>right.poll</name> </action> </reference> <reference name="customer_account_dashboard"> <action method="unsetChild"> <name>customer_account_dashboard_info2</name> </action> <block type="tag/customer_recent" name="customer_account_dashboard_info2" as="info2" template="tag/customer/recent.phtml"/> </reference> <reference name="right"> <action method="unsetChild"> <name>right.newsletter</name> </action> </reference> <reference name="top.links"> <action method="addLink" translate="label title" module="customer"> <label>Log Out</label> <url helper="customer/getLogoutUrl"/> <title>Log Out</title> <prepare/> <urlParams/> <position>100</position> </action> </reference></layout>

    Read the article

  • how to crop an image using rectangale overlay and touch on iphone

    - by Amir
    Hey Everyone, I am looking for a good tutorial or sample code, that would show how to crop an image taking from iphone camera something in lines of http://www.defusion.org.uk/code/javascript-image-cropper-ui-using-prototype-scriptaculous/ but you would control the corners with your fingers any tip would be greatly appericated, as i am new to iphone dev. Thanks, Amir

    Read the article

  • Performance of CSS Transitions vs. JS animation packages

    - by desau
    I'm wondering - is there any difference in performance of using CSS Transitions vs. any of the various JS animation libraries? (scriptaculous, scripty2, jsAnim, MooTools, $fx, etc, etc). I've tried various tests in Safari / Google Chrome, and I don't actually see any difference -- I thought that CSS Transitions were supposed to be hardware accelerated.

    Read the article

  • fire jquery .animate oninput only once

    - by luke
    http://jsfiddle.net/nFFuD/ I'm trying to animate the search field in this example using jquery, making it move to the top of it's containing div oninput. I was originally using scriptaculous effect.move to do this, but I couldn't make the event only fire once, so if someone kept typing after the first keystroke, the effect would stop and start again from it's current position in the animation for each additional keystroke, which is stupid. I'm new to new to using jquery so please, take it easy if I'm not making very much sense.

    Read the article

  • Javascript draw dynamic line

    - by Ranch
    Hello, I'm looking for Javascript code for letting the user draw a line (on an image). Just as the line tool in Photoshop (for example): The user clicks on the image, drags the mouse (while the line between the start point and the mouse point is dynamically drawn on mouse drag). I would also need a callable function to send the page the start and end coordinates. I've found this very nice script for area selection: http://www.defusion.org.uk/code/javascript-image-cropper-ui-using-prototype-scriptaculous/ and I've found many script for drawing lines (and other shapes in JS), but could not find what I'm looking for. Thanks

    Read the article

  • Is JavaScript 's "new" Keyword Considered Harmful?

    - by Pablo Fernandez
    In another question, a user pointed out that the new keyword was dangerous to use and proposed a solution to object creation that did not use new... I didn't believe that was true, mostly because I've used Prototype, Scriptaculous and other excellent JavaScript libraries, and everyone of them used the new keyword... In spite of that, yesterday I was watching Douglas Crockford's talk at YUI theater and he said the exactly same thing, that he didn't use the new keyword anymore in his code. Is it 'bad' to use the new keyword? what are the advantages and disadvantages of using it?

    Read the article

  • Unobtrusive Toggling failing in Rails

    - by sscirrus
    I've been at this for hours but it just isn't working. I'm trying to get ToggleJS working using Scriptaculous' Effects library. Specifically, the example: http://wiseheartdesign.com/page_attachments/0000/0075/demo.html. I got it working beautifully using a pure html file called new.html. I then converted it to new.html.erb so I can incorporate some of the animations into my Rails project and it stopped working! I tried both html and ruby javascript tags but neither are working, for example: <%= javascript_include_tag "application", "prototype", "effects", "lowpro", "toggle" %> The page's body is displaying on the browser, but without animations. I have made sure my javascript files are the same as the demo (plus, the html file is working with them anyway). Do you know where the problem might lie here with my .erb file?

    Read the article

  • How can I try a new language or framework without installing it?

    - by flamingLogos
    With so many languages and frameworks that exist, and with new ones appearing all the time, I don't have the time to download, install, and configure each one to evaluate it. In the past I've run across webapps that allow one to write or paste code into a window, and see the results in realtime in the browser, usually in a tutorial setting. What are your favorite sandbox sites for a given technology? Edit: @fretj provided the link to the excellent Google Code Playground (+1 upvote), but I thought that it was just for experimenting with Google's own apps (Search, Maps, Earth, Language, etc). But it turns out that it contains a few hidden gems: In addition to their apps, you can try out the many Javascript libraries that they host including jQuery, jQuery UI, MooTools, Dojo, and Prototype Scriptaculous. They're all hidden under the Libraries category in the "Pick an API" box. I overlooked the category because I thought it was for an app called Google Libraries. There's also a Javascript category for Javascript itself.

    Read the article

  • Using jQuery for Effects

    - by OneNerd
    Ok - have been tasked with possibly an impossible (or at least a potentially nightmarish) scenario. Need to come as close as possible to reproducing PowerPoint-like effects via HTML/JavaScript (the spec is large and ugly, so I will spare you the details). Ultimately, I am looking for a solid launching point. I have used both Prototype/Scriptaculous as well as jQuery in many projects, and based on what I am seeing, it appears jQuery has the more plug-in available, so am leaning towards using jQuery. Can anyone point me to some plug-ins, articles, or anything else that would help me in accelerating the research on this so I can define to my client what can and cannot be done. Any other suggestions from you jQuery gurus are welcome of course. Thanks -

    Read the article

  • Loading jQuery with Tapestry 5

    - by American Yak
    Okay, so I'm not a Java guy, but I work with loads of them. We generally load Prototype with Tapestry 5, as Tapestry was built on this javascript library. As a UI/front end developer/engineer, I know the awesomeness of jQuery and the lack of prototype therein. (Feel free to debate that elsewhere -- this ticket doesn't concern that question, ha.) I've been curious for some time if it's possible to port jQuery into Tapestry instead of Prototype -- as in completely removing Prototype and Scriptaculous -- I realize it kind of defeats the purpose of the already bundled Prototype, but I wanted other opinions on the matter. Thanks.

    Read the article

  • Bootstrap jquery methods Magento's prototype lib

    - by user1722527
    Wonder if anyone has had this issue. I've integrated Bootstrap nicely into a Magento theme I'm building, all good. That is, until I try using the accordian functions. There seems to be an issue with the code finding the Prototype Libs Methods instead of jQuery's. I've tried the usual fixes, $ - jQuery and no conflict but it only works when I disable the prototype lib - which obviously is not good. Anyone out there come across this and can advise me on a work round? At the moment I'm resigned to using Scriptaculous for the accordian.

    Read the article

  • minifying patched javascript files

    - by Stacia
    I'm writing a Rails app and I've partially integrated in this nice little patch to the in line ajax editor: http://inplacericheditor.box.re/ The problem is, on that page I have tinymce, prototype and scriptaculous included. In Firefox at least there's a big lag when all this stuff is loading. I was hoping to fix it by compressing the files so I checked out a plugin for rails called Smurf. It seemed to do what it was supposed to do nicely, but it choked on the little patch files that are included with the Ajax editor thing. THe patch files look like this: Object.extend(Ajax.InPlaceEditor.prototype, { handleAJAXFailure: function(transport) Alternatively, should I just be catching them instead of worrying about minfying them? I know I'm running on development and that Apache would maybe be handling serving the js files differently..It just seems like a lot of things to serve on one page.

    Read the article

  • Preventing click event with jQuery drag and drop

    - by Sasha Yanovets
    I have an elements on page that are draggabe with jQuery. These elements have click event wich navigates to another page (ordinary links for example). What is the best way to prevent click from firing on dropping such element, while allowing clicking it in not drag and drop state? I have this problem with sortable elements, but think it is good to have solution for general drag and drop. I've solved the problem for myself. After that found that same solution exists for Scriptaculous, but maybe someone have a better way to achieve that.

    Read the article

  • Blind down animation on CALayer using a mask

    - by dgjones346
    Hi there, I want to create a "blind down" effect on an image so the image "blinds down" and appears. Sort of like this JavaScript transition: http://wiki.github.com/madrobby/scriptaculous/effect-blinddown The mask is setup correctly because if I manually change it's position it hides and reveals the image behind it, but it doesn't animate! It just ends up in the animates final position and you never see it actual blind. Please help! Maybe this isn't the best way to achieve a blind down effect? // create a new layer CALayer *numberLayer = [[CALayer alloc] init]; // render the number "7" on the layer UIImage *image = [UIImage imageNamed:@"number-7.png"]; numberLayer.contents = (id) [image CGImage]; numberLayer.bounds = CGRectMake(0, 0, image.size.width, image.size.height); // width and height are 50 numberLayer.position = position; // create a new mask that is 50x50 the size of the image CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; CGMutablePathRef path = CGPathCreateMutable(); CGPathAddRect(path, nil, CGRectMake(0, 0, 50, 50)); [maskLayer setPath:path]; [maskLayer setFillColor:[[UIColor whiteColor] CGColor]]; [theLayer setMask:maskLayer]; [maskLayer setPosition:CGPointMake(0, 0)]; // place the mask over the image [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:3.0]; [maskLayer setPosition:CGPointMake(0, 50)]; // slide mask off the image // this should shift the blind away in an animation // but it doesn't animate [UIView commitAnimations]; [maskLayer release]; [boardLayer addSublayer:numberLayer]; [numberLayer release];

    Read the article

  • Javascript conflict on my html page

    - by tochiro
    Hello, I have an accordion menu and a lightwindow script on my web page. The lightwindow script does not work because of the accordion script because if I delete the latter the lightwindow script works. There must be a conflict but what? Here is the head section of my page: <!-- lightwindow files --> <script type="text/javascript" src="lightwindow/javascript/prototype.js"></script> <script type="text/javascript" src="lightwindow/javascript/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="lightwindow/javascript/lightwindow.js"></script> <link rel="stylesheet" href="lightwindow/css/lightwindow.css" type="text/css" media="screen" /> <!-- accordion scripts --> <script src="js/jquery-1.2.1.min.js" type="text/javascript"></script> <script src="js/menu.js" type="text/javascript"></script> <script src="js/jquery.cookie.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="css/accordion.css" /> Thank you for your time. Cheers tochiro

    Read the article

  • Finding usage of jQuery UI in a big ugly codebase

    - by Daniel Magliola
    I've recently inherited the maintenance of a big, ugly codebase for a production website. Poke your eyes out ugly. And though it's big, it's mostly PHP code, it doesn't have much JS, besides a few "ajaxy" things in the UI. Our main current problem is that the site is just too heavy. Homepage weighs in at 1.6 Mb currently, so I'm trying to clean some stuff out. One of the main wasters is that every single page includes the jQuery UI library, but I don't think it's used at all. It's definitely not being used in the homepage and in most pages, so I want to only include the where necessary. I'm not really experienced with jQuery, i'm more of a Prototype guy, so I'm wondering. Is there anything I could search for that'd let me know where jQuery UI is being used? What i'm looking for is "common strings", component names, etc For example, if this was scriptaculous, i'd look for things like "Draggable", "Effect", etc. Any suggestions for jQuery UI? (Of course, if you can think of a more robust way of removing the tag from pages that don't use it without breaking everything, I'd love to hear about it) Thanks!! Daniel

    Read the article

  • Drag/drop problem (draggable in position:relative parent)

    - by MackDaddy
    Here's the scenario, I'm using prototype and scriptaculous, but I believe jquery would have the same issue. I have a list draggable images in a relatively positioned div. The problem is I can't drag the images out of the parent div... well... you can, they're just not visible. If you remove the position:relative on the parent div, it works just fine, I can drag items out of the div perfectly. However because of this little IE7 bug: http://snook.ca/archives/html%5Fand%5Fcss/position%5Frelative%5Foverflow%5Fie/ that position:relative is required. IS there another work around to this bug that does not require setting position? I've tried playing with z-index and everything I can think of to no avail. Here's the CSS for the box: #products{ width: 680px; height: 400px; border: 1px solid gray; /*background-color: #66FF00;*/ overflow-y: scroll; overflow-x: hidden; font-family:"Helvetica Neue","Helvetica"; font-size:12px; font-weight:bold; position: relative; } If you would like to see this bug in action, you can visit it here: http://twinmed-dev.com/template%5Fadd.php. Try searching for an item like "gloves" then adding it to the cart below. Thanks for any help.

    Read the article

  • Jquery and Prototype Conflict

    - by patrick
    I am having trouble running two javascript files on the same page. I used JQuery.noConflict() (http://api.jquery.com/jQuery.noConflict/) but no luck. <script src="http://www.google.com/jsapi"></script> <script> google.load("prototype", "1.6.0.3",{uncompressed:false}); google.load("scriptaculous", "1.8.1",{uncompressed:false}); </script> <script src="js/jquery.tools.min.js"></script> <script type="text/javascript"> $jQuery.noConflict(); jQuery(document).ready(function($) { $("#download_now").tooltip({ effect: 'slide'}); }); function show_text() { new Ajax.Request('./new.php', { method: 'post', parameters: { userid: $('userid').value }, onSuccess: function(r) { $('update').update(r.responseText) } }); } document.observe("dom:loaded", function() { $('loading').hide(); Ajax.Responders.register({ onCreate: function() { new Effect.Opacity('loading',{ from: 1.0, to: 0.3, duration: 0.7 }); new Effect.toggle('loading', 'appear'); }, onComplete: function() { new Effect.Opacity('loading', { from: 0.3, to: 1, duration: 0.7 }); new Effect.toggle('loading', 'appear'); } }); }); </script>

    Read the article

  • using respond_to format.js to replace the content of a textarea on rails

    - by Stacia
    I have some saved text in my create controller. If it's not stressful, I'd like it to populate a textarea on the page with the saved text along with displaying the error message fields (which is what's already happening). I've used things like replace_html before, but I don't know if there's an easy way to get to textarea or text field IDs and just replace the value of the text. For now I'm just going to do some javascript but it would be nice to know the rails shortcut. edit: I wasn't in the right mindset because this app uses extjs and was trying to figure out how to do it this way. The text box is actually an ext status bar (same as here : http://www.extjs.com/deploy/dev/examples/statusbar/statusbar-demo.html ) which doesn't get created until the page is finished loading. When I try to enter commnands like the first poster suggested, I get "setvalue is not a function". Playing with firebug on the page I can get it to set the value after loading by using (whatever method to get it through ext or scriptaculous).value = "lol" but none of the page update things work with this.

    Read the article

  • Javascript Conflict on PHP page

    - by patrick
    I am having trouble running two javascript files on the same page. I used JQuery.noConflict() (http://api.jquery.com/jQuery.noConflict/) but no luck. <script src="http://www.google.com/jsapi"></script> <script> google.load("prototype", "1.6.0.3",{uncompressed:false}); google.load("scriptaculous", "1.8.1",{uncompressed:false}); </script> <script src="js/jquery.tools.min.js"></script> <script type="text/javascript"> $jQuery.noConflict(); jQuery(document).ready(function($) { $("#download_now").tooltip({ effect: 'slide'}); }); function show_text() { new Ajax.Request('./new.php', { method: 'post', parameters: { userid: $('userid').value }, onSuccess: function(r) { $('update').update(r.responseText) } }); } document.observe("dom:loaded", function() { $('loading').hide(); Ajax.Responders.register({ onCreate: function() { new Effect.Opacity('loading',{ from: 1.0, to: 0.3, duration: 0.7 }); new Effect.toggle('loading', 'appear'); }, onComplete: function() { new Effect.Opacity('loading', { from: 0.3, to: 1, duration: 0.7 }); new Effect.toggle('loading', 'appear'); } }); }); </script>

    Read the article

  • Jquery + Prototype Question

    - by mikeyhill
    I recently inherited a site which is botched in all sorts of ways. I'm more of a php guy and initially the js was working just fine. I made no changes to the javascript or the any of the include files but after making a few content edits I'm getting errors from firebug. a.dispatchEvent is not a function emptyFunction()protot...ects.js (line 2) emptyFunction()protot...ects.js (line 2) fireContentLoadedEvent()protot...ects.js (line 2) [Break on this error] var Prototype={Version:'1.6.0.2',Brows...pe,Enumerable);Element.addMethods(); protot...ects.js (line 2) this.m_eTarget.setStyle is not a function [Break on this error] this.m_eTarget.setStyle( { position: 'relative', overflow:'hidden'} ); protot...ects.js (line 43) uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: js/prototype_effects.js :: anonymous :: line 2" data: no] Googling around I found several posts that sometimes jquery+prototype don't play well and rearranging the scripts could fix this issue, however being that I didn't touch these sections I'm not sure where I even need to begin to debug. The previous developer incorporated a head.inc file which loads up prototype, scriptaculous and then many of the pages are in a sub-template loading up jquery for functions like lightbox. The site is temp housed at http://dawn.mikeyhill.com Any help is appreciated.

    Read the article

  • IE showing hidden div under certain circumstances

    - by karola
    After googling around and finding a lot of ie bugs I still did not find a description of the problem I have. The initial situation is a standard one. We have a tooltip which is actually a hidden div that will be displayed on mouseover at a given location. The div is hidden with display:none and contains a table with the content. We tried different libraries for showing the div (scriptaculous and jQuery Cluetip) but the effect is the same. The problem: Everything is fine as long as the contents fits the width of my window. But when I resize it until the horizontal scrollbar is activated the content of the hidden div will be shown at the end of the page when the tooltip is activated. This is really strange as it happens only under these premises. When more than one tooltip is involved the browser might even crash (and under Vista takes the whole system with him duh). I know it's a bit complicated to explain but I hope that someone at least had heard of that bug and can point me into the right direction.

    Read the article

  • How to get crossSlide and lightbox2 working together on the same page.

    - by imHavoc
    (CrossSlide) (LightBox) This is my header: <script type="text/javascript" src="<?php echo ROOT.'sources/js/jquery.js'; ?>"></script> <script type="text/javascript" src="<?php echo ROOT.'sources/js/contentSlider/jquery.cross-slide.js'; ?>"></script> <link rel="stylesheet" href="<?php echo ROOT.'sources/css/lightbox.css'; ?>" type="text/css" media="screen" /> <script type="text/javascript" src="<?php echo ROOT.'sources/js/lightbox/prototype.js'; ?>"></script> <script type="text/javascript" src="<?php echo ROOT.'sources/js/lightbox/scriptaculous.js?load=effects,builder'; ?>"></script> <script type="text/javascript" src="<?php echo ROOT.'sources/js/lightbox/lightbox.js'; ?>"></script> This is my body: <script type="text/javascript"> $(function() { $('#imgHold').crossSlide({ sleep: 3, fade: .5 }, [ { src: 'images/featured/ftcont_img1.png' }, { src: 'images/featured/ftcont_img2.png' }, { src: 'images/featured/ftcont_img3.png' }, { src: 'images/featured/ftcont_img4.png' } ]); }); </script> <div id="ftIMG"><div id="imgHold">Loading...</div></div> I don't have anything using the lightbox script on this page. But I want the keep the script in the header so in PHP I only have to call up 1 header. The LightBox "manual" said to add "initLightbox(); to the onload attribute on the body tag, so I did that and nothing changed. Now I also read somewhere else about a (jQuery.no-conflict), im wondering if this would be the way to proceed. Or if there is another way to fix this problems. Also, if I want to use (ThickBox3.1) on the same page with everything else. Would it be possible, and how to do so exactly? Also, sorry guys about not posting them up as links, apparently new users are not allowed to post up more than 1 link.

    Read the article

< Previous Page | 1 2 3 4  | Next Page >