prototypejs

Setting innerHTML on iPhone

試著忘記壹切 提交于 2020-02-02 13:21:30
问题 I am setting the innerHTML property of document element within this way: document.getElementById('some_element').innerHTML = newHTML; And this works fine in web browser on desktop and on iPhone simulator. But on iPhone device this works good randomly. I mean, sometimes works, sometimes does not. One proposed solution from google groups is to try to repeat this function call about 20 times with 50 ms pause between. Come on. Is there some logical explanation about that mysterious delay? Here

Setting innerHTML on iPhone

a 夏天 提交于 2020-02-02 13:19:12
问题 I am setting the innerHTML property of document element within this way: document.getElementById('some_element').innerHTML = newHTML; And this works fine in web browser on desktop and on iPhone simulator. But on iPhone device this works good randomly. I mean, sometimes works, sometimes does not. One proposed solution from google groups is to try to repeat this function call about 20 times with 50 ms pause between. Come on. Is there some logical explanation about that mysterious delay? Here

Prototype + Flickr Ajax Request doesn't work with Firefox

末鹿安然 提交于 2020-01-25 09:16:08
问题 Hi every one I have a weird issue I been working with the Flickr API, in Flickr for make a connection with the server is through url format in my case something like this http://api.flickr.com/services/rest/?method=flickr.photosets.getList&api_key=10cb3dccaa050efebdc01540c1d4d227&user_id=51390557@N07&format=json If your run into any browser you are going to get a flickr function and is ok, but Im trying to obtain with Ajax of Prototype Im doing something like new Ajax.Request('http://api

How to know when an element will be off screen?

不羁岁月 提交于 2020-01-24 02:08:18
问题 I am writing a simple script that displays a dialog box when a user hovers over a profile picture. It dynamically determines the profile pics location on the page and then places itself to the left of it and about 100px above it. This part is working fine. My issue arises when a profile pic is at the top of the screen and a user mouses over it. The dialog will appear but the top portion of it will be above the fold (i.e. not in the current browser window). Naturally this is not good usability

How to know when an element will be off screen?

梦想与她 提交于 2020-01-24 02:06:31
问题 I am writing a simple script that displays a dialog box when a user hovers over a profile picture. It dynamically determines the profile pics location on the page and then places itself to the left of it and about 100px above it. This part is working fine. My issue arises when a profile pic is at the top of the screen and a user mouses over it. The dialog will appear but the top portion of it will be above the fold (i.e. not in the current browser window). Naturally this is not good usability

Conflict Bootstrap, Prototype Js and Jquery

蓝咒 提交于 2020-01-21 12:14:46
问题 After 7 days of search and after i have tried different solutions and it did not work i would like to ask: I have a page with prototype js, protaplasm, and scriptaculous and jquery and Jquery-ui and it was working perfectly with the jquery no conflict until i recently downloaded a design with Bootstrap and here comes the trouble. Prototype js fonctionalities are no more working. The ajax update of prototype js and the inplaceeditor the scriptaculous are no more working. I have tried most work

Php Javascript alternative for jquery grid

ぃ、小莉子 提交于 2020-01-17 08:22:23
问题 I want an alternative to a jquery grid for crud operations in php. I want to use a simple table with facilities such as searching, sorting an pagination. Is there any library for this? Can i use prototype.js for achieving this? Please guide me. 回答1: The only jQuery library out there that sort of is what you need is jqGrid. I am sufficiently unhappy with it that I am in the middle of writing my own grid for CRUD. FlexiGrid is better code and looks nicer but it is missing a lot. jqGrid is

Running JS/JQuery inside of prototype

大憨熊 提交于 2020-01-17 07:42:32
问题 I'm having a problem with Prototype Draggable windows.. I have a window and i want to launch some jQuery/Ajax/JavaScript functions inside of the window but seems like nothing works. Look an example i've made with a simple JavaScript popup script and when i click the div it doesn't show, same happens with every function i do. <script type="text/javascript"> function show_confirm() { var r = confirm("Press a button!"); if (r == true) { alert("You pressed OK!"); } else { alert("You pressed

observing multiple select menus with prototype

人走茶凉 提交于 2020-01-17 01:27:12
问题 I want to observe multiple select menus and respond to their changes using prototype but only the first menu seems to be observed. This is my code: $('product_options').select('select').invoke("observe","change",optchange); If there are - for example - 3 selects within product_options then it only observes the first, i thought it might be because of invoke so i then tried this: $('product_options').select('select').each(function(sel){ $(sel).observe("change",optchange); }); Still doesnt work

smooth scroll not working in firefox, works fine in IE

假如想象 提交于 2020-01-17 01:10:28
问题 My beloved Firefox is losing to IE on this. Anyone know why this won't function in Firefox? (doesn't even go to anchor), but scrolls smoothly in IE? document.observe("dom:loaded", function() { if ($$('a.scroll')) { $$('a.scroll').invoke('observe','click', function(event) { Event.stop(event); var elementLink = Event.element(event).readAttribute('href'); var scrollHere = elementLink.substr(1, elementLink.length); Effect.ScrollTo(scrollHere); return false; }); } }); applied as such: <a class=