how to attach onclick event to an array of elements (mootools)
Is there a syntax for the following thing: $$('.a-lot-of-elems').addEvent('someevent',somefunction); ...
Is there a syntax for the following thing: $$('.a-lot-of-elems').addEvent('someevent',somefunction); ...
so this is really weird to me but my code works properly for getting the geolocation if I run my code locally in the simulator, If I have the code on my server it does not work in the simulator, yet the same url and code on my server works on my actual iphone? It seems to not pick up on the geolocation javascript when its on my server in...
i am wondering if the :with attribute is removed from rails3 since i cannot find anything in the rails3 api - http://rails3api.s3.amazonaws.com anyone has a clue or give a hint on how to use the :with parameter to send data with a link_to non-working example: = link_to "Foo", {:action => "filter", :filter => "filter1",:with => "'test=...
I've a site with banner ads, loaded using iframes. The banner ads always scroll the parent window when the banner doesn't complety fit into the visible region. This is really annoying and I'd like to deny the javascript of the iframes to scroll the main window. Here is what I already tried: Move the iframe src code to another domain. ...
Hello friends, I am having a webview which dispalys large amounbt of data. I want to scroll Webview progmatically. I know window.scrollto() method is there but ,god knows why, it is not working. Can anybody guide me step by step how to do this ? I am sure there is some minor problem. Pl. guide me. ...
Hello, I have the following HTML: <ul actualpage=0> <li/> <li/> .... </ul> <ul actualpage=0> <li/> <li/> .... </ul> Im trying to get the value of actualpage of each ul and create a new attribute. Its easy but not in one jquery sentence... Its possible? Until now i have the following line (between ## simbols the missing part that i ...
In Javascript is there a function that returns the number of times that a given string occurs? I need to return a numeric value that is equal to the number of times that a given string occurs within a particular string for instance: var myString = "This is a test text" If I had to search for 'te' in the above string it would return 2....
Hi, I have a asp.net/c# web app. When do user leave a certain page, I would like to delete 1 particular temp file on the client machine, in the temp file folder. Can I do this at all? Can I do this server side or client side? Thanks. ...
The code below gets the username/password and runs it thru the backend.php script. <?php session_start(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> ...
I feel like a bonehead: I want to assign index=i to each LI I have selected, with i incrementing. It appears to assign them all at once though, and they all get index=1. Thoughts? $("#window ul li").each(function(){ var i = 1; $(this).attr("index", i); i++; }); ...
Given this very familiar model of prototypal construction: function Rectangle(w,h) { this.width = w; this.height = h; } Rectangle.prototype.area = function() { return this.width * this.height; }; Can anyone explain why calling new Rectangle(2,3) is consistently 10x FASTER than calling Rectangle(2,3) without the 'new' keyw...
Hello I have tried following similar steps as mentioned on this Auto login to Google Analytic to impress clients page <form id="googleanalyticslogin" action="https://www.google.com/accounts/ServiceLoginBoxAuth" method="post"> <input type="text" name="Email" class="gaia le val" id="Email" size="18" value="[email protected]" /> <input type="p...
I'm working on a small bit of functionality for three similar tabbed items. Basically, when you hover over one, I want the opacity of the two siblings to go to 50%. I set up a pretty basic jQuery hover event, here's the page code... <div id="footer"> <a href="#" class="footer-tabs" id="footer-seek">Seek</a> <a href="#" class="fo...
I have this two uls: <ul actualpage="0" id="lastcompanieslist" hideable="true" upperpage="1"> <li page="0" style="display: none;"><img src="/images/OrangeArrow.jpg">1</ <li page="0" style="display: none;"><img src="/images/OrangeArrow.jpg">2</li> <li page="0" style="display: none;"><img src="/images/OrangeArrow.jpg">3</li> <...
How to detect an event coming from the Firefox history dropdown box? I need to distinguish between the enter key simply pressed on input field or on item from his native history dropdown box. The reason is that I would like to call custom submit button (not first one, which is default) on the enter key pressed on any input field. But r...
I'm looking for the easiest possible way to hide an UpdatePanel while waiting for the submit response to come back. Stuff like described here - using Ajax Control Toolkit and the UpdatePanelAnimationExtender is both overkill and causing some issues, namely: Because there are a couple of hidden panels in the page it gets all messed up a...
I have an array created with this code: var widthRange = new Array(); widthRange[46] = { sel:46, min:0, max:52 }; widthRange[66] = { sel:66, min:52, max:70 }; widthRange[90] = { sel:90, min:70, max:94 }; I want to get each of the values 46, 66, 90 in a loop. I tried for (var key in widthRange) but this gives me a whole bunch of extra...
Hi Guys, I am using "malsups" jQuery corner plugin - http://jquery.malsup.com/corner/ - and having a bit of nightmare of a time with IE. Basically I have <ol><li> <span class="main"> <span class="test1"></span> <span class="test2"></span> <span class="test3"> <span id="test4"></span> <span ...
Hey, I've spent at least 2 days trying anything and googling this...but for some reason I can't get RegisterClientScriptInclude to work the way everyone else has it working? First off, I am usting .NET 3.5 Ajax,...and I am including javascript in my partial page refreshes...using this code: ScriptManager.RegisterClientScriptBlock(thi...
Hi Guys I have some pages that reference javascript files. The application exists locally in a Virtual Directory, i.e. http://localhost/MyVirtualDirectory/MyPage.aspx so locally I reference the files as follows: <script src="/MyVirtualDirectory/Scripts/MyScript.js" type="text/javascript"></script> The production setup is different ...