How to cut image into a web page
I'd like to show a part of an image on my web page. Suppose the original format is 1024x768 the image shown has to be 100x768. It's not a re-size but simple a cut starting from 0,0 pixel. Any suggestions? ...
I'd like to show a part of an image on my web page. Suppose the original format is 1024x768 the image shown has to be 100x768. It's not a re-size but simple a cut starting from 0,0 pixel. Any suggestions? ...
I've been wondering if browsers fire any event when select box is dynamicaly populated? I would expect 'onchange' being fired, but that doesn't happen. ...
Hello, I have the following regex in PHP: /(?<=\')[^\'\s][^\']*+(?=\')|(?<=")[^"\s][^"]*+(?=")|[^\'",\s]+/ and I would like to port it to javascript like: var regex = new RegExp('/(?<=\')[^\'\s][^\']*+(?=\')|(?<=")[^"\s][^"]*+(?=")|[^\'",\s]+/'); var match = regex.exec("hello,my,name,is,'mr jim'") for( var z in match) alert(match[...
Is there a way to trigger a hidden button on an html markup page using jquery or jscript? How would I do that if possible? Thank you, James ...
Hi Guys, Is there a way to attach an event handler like onclick=alert("Hi"); to an existing document element? (an image in my case) I have already tried and failed with the following: img = document.getElementById("my_image"); img.onclick = "alert('hi')"; img.setAttribute ('onclick',"alert('hi')"); img.onclick = function() {"alert(...
Hello I'm having some trouble with the following code within my Index.html file: <SCRIPT LANGUAGE="JavaScript" SRC="clock.js"></SCRIPT> This works when my Index.html file is in the same folder as clock.js. Both Index.html and clock.js are in my root folder. But when my index.html is in these different directories clock.js does not lo...
I have a page that is referenced via a <script> tag from a page on another site. In the script src, I pass in the form I want my script to build (from a db table), and the div where the dynamically built form should go. The calling page looks something like this: <div id="FormContainer"></div> <script type="text/JavaScript" src="http:...
Various experiments I've carried out indicate that there is no foolproof way of responding to a 'mouseleave' event using jQuery. Two actions appear to not trigger any relevant event: Moving the pointer away from an element very quickly Moving the pointer off the element via some browser chrome (or out the the window entirely) The sec...
Possible Duplicate: Javascript: I have a custom right-click menu but still want the spellcheck! Is there a JS property or command to see if a word is underlined in red (ie. needs to be spellchecked) in Firefox? Ideally, for sample code it would be like... if I right click on a word the is underlined in red it will alert: //wat...
My organization is starting to use this feature and for testing it would be ideal if we could find and delete these values as well as see what's written to disk, but I can't figure out where IE8 is storing them. I found the .sqlite files in AppData\Local\Apple Computer\Safari for Safari and AppData\Roaming\Mozilla\Firefox\Profiles\ryb...
As a learning exercise I've hacked together a script for an SO feature request (for the purposes of this question please ignore the merits or otherwise of that request). In the script I've encountered a technical issue that my limited javascript knowledge can't get past and I'd appreciate suggestions on how to resolve it. To avoid spamm...
I'm trying to build some JavaScript in MooTools that fetches table row markup from the server, then adds it to a table. I have an object named htmlAjax that's set as a MooTools Ajax object. The object gets the HTML from the server correctly (tested this in the Firebug console), but when I attempt to add this markup to a new element, the ...
Hi, I'm debugging a weird problem with two simlar search forms - when user types some search criteria in a text box and hits enter, one form returns results and another just reloads. And it happens only in IE - FF treats both forms as expected. I suspect that hitting enter is triggering onclick for one of the search buttons in one case ...
I'm confused about the array returned by a regex match when using both /g (to get multiple matches) and parentheses (to get backreferences). It's not clear to me how to get the backreferences because the subscript of the match array seems to refer to the multiple matches, not the back references. for instance: string = "@abc @bcd @cde"...
Hi. How do I add a click event using addEventListener (window.onload) when the tags in question are being generated from the server (via an xmphttp request, no less)? Thanks! ...
Hi there, I have recently ran into this strange issue, I was trying to reference parent window in an iframe, but somehow window.parent or parent are always undefined. I got around the problem by using window.top, but this question still haunts me. Why is window.parent undefined? This is a .NET web app, if it helps. Update: I would...
I've been given a table based layout to work on and I need to display some tool tips above some input boxes contained in the table. I can't use any of the offset properties to do this since they all return 1 when the element is contained in a table. Does jQuery or some other library have a way of calculating this? ...
i see that that template has some code to see if the client has the required version, and it does stuff if it has or it doesn't and there is a <object> tag inside <noscript> question: if the stuff is gonna work with the <object> tag anyway why would you need all that stuff above with the control of version if it has or not ? ...
I'm working on a new project which has some complex javascript. I can't post any code so that's not what my question is about. I have a script which works in Firefox 3.0. It was pointed out that the script did not work in Firefox 3.5, so I'm trying to make it work. Indeed the script didn't produce the expected results, so I installed th...
My project requires polling a certain URL for a JSON response, using AJAX. The first AJAX request that I make alerts the server that I want some JSON content, and it begins building and cacheing a response, sending me back { "status" : "pending" } for each subsequent AJAX request until the JSON is ready. At that point, the response chang...