If you follow the evolution of software development on Internet, you
may have the impression that every new development is Web based and
that the main areas of concern are whether you should develop new
application with Ruby on Rail or if you should choose Flash rather
than Ajax for the interface. However, if you ask developers, you may
find that the Web is not as ubiquitous in their work as you may think.
Even if 66% of the participants develop the majority of their new
applications with a browser as the interface, there is still a large
portion of developers that are working today for operating contexts
that are outside the Web world, like embedded software or Windows
applications. Code:
In order of priority, I need the following for Safari:
* a debugger (with watch) * a console (with errors and command line) * Web Developer toolbar (edit css, validate local) * DOM inspector (like Firebug or IE's DOM inspector). Firebug is awesome, though... * Possibly a source editor * anything else that is useful (like http://www.squarefree.com/jsenv/ or the other bookmarklets on squarefree.com that work for safari).
Does safari support hasOwnProperty now? What about named functions in object literals? syntax example:
I'm currently building a new search engine that will search around 15,000 products and would like some general advice as to the best way to approach it.I want to offer instant results, so the user will click an icon and the results change, no submit buttons or postbacks.My database is MS SQL and my frontend is ASP.Net, but for this I'm looking to develop the majority of the search functionality in JavaScript.What I'm asking really is what people recommend for the best way to approach providing instant results.
My current thinking is an initial database query loads the data into XML, then use JavaScript and XSLT to filter the XML and display the results, then as filters change these can be handled by the JavaScript and XSLT rather than going back to the database.Does anyone have any general advice on the best performing way to provide this sort of functionality that ultimately will give the quickest results?
How can I tell programmatically if I've executed my script from my home computer or from my server online? I have a batch of media files I'd like to contain in a dedicated directory, and that directory would have a different path on my home computer than on my online server; I'd thus like to reference one path over the other in my code based upon the location from which I'm running the script.It would be ideal if the solution would *not* involve a hard-coded reference to my existing online URL, since that may change over time, but instead simply "sense" whether the script has been executed online or not.
This works fine in IE: the div is positioned relative to the td of menu1. However, in Mozilla it doesn't work. The div becomes relative to the top of the page.
I would like to display any item that has ID associated with it on the top-left corner of its physical location (20px up and 20px right) with yellow background and red foreground.
I discover a strange bug in Konqueror 3.1.1. I design a javascript application which acts in one file called example.html. At the beggining of this js i write:
if (document.images) { folderopen= new Image(16,16); folderopen.src="http://www.sergioamo.8m.com/buttons/folder_open.png"; folderclose= new Image(16,16); folderclose.src="http://www.sergioamo.8m.com/buttons/folder_close.png"; } functions.... .... ... .. and my javascript works perfect. If i write:
if (document.images) { folderopen= new Image(16,16); folderopen.src="./buttons/folder_open.png"; folderclose= new Image(16,16); folderclose.src="./buttons/folder_close.png"; } functions... .... ... .. my javascript does not work properly. Does anyone knows if is imposible to use relative references with konqueror 3.1.1 or which is the problem?
I'm having an issue using .get and a callback. Basically, unlessI use a fully quantified path when I deploy my site the call doesn't work. When I'm developing on localhost, the site works fine. It's an ASP.NET MVC site. I'm fairly new to jQuery. If I replace the code with an absolute path, all seems fine. Obviously I'd rather use relative paths. I'd be grateful for any insight you could offer.
1. I have some links that open with Javascript. The HTTP links work just fine, but I have one link that is supposed to open a picture in a new window. The picture is stored in the root/images folder. So it's supposed to be a relative path, but no matter what I do, I get an error page. (images/snailmail.jpg)
2. I have added a mouserollover funtion to change a small picture on the page. I am trying to add a second function to that function, to stop the scrollbar in the lower left corner as long as the mouse hovers over the picture. For the first picture, it works fine, but with the 2nd picture which allready has a mouseover function, I am not sure what to do.
I've wondering if anyone knows of a script where I can scroll a div down the page as the user scrolls down the page. You know, like those annoying ads do sometimes
I've googled for some, but the ones I've tried only work to varying degrees when I want the div positioned relatively. The reason I want it relatively positioned is that my site is centred, and fixed-width.
Basically, I need it to scroll up and down in a 'side bar' area, and the main problem I seem to be having: not scroll below my footer area.
The two pages for preloading below seemed to preload images IF I used an absolute path but they don't preload the images if I just used relative paths like the ones below.
Give it a try. The two pages below using relative paths won't work. Then try changing the paths of the images in both pages to use absolute path(with http://) which will work.
But I want to use relative paths. What can be done? Other than inserting 1x1 size of the images I want to preload. Code:
In short, is there any way to have a js file know the location on the server where it is stored.. I can only find the domain/location of the current web page URI.
Explanation: I have a bunch of javascript and php files that are in one location and are shared across a whole bunch of subdomains (each on their own folder on the root). I call the script through a "scripts" subdomain (this is so all the subdomains can access them in one shot).
A couple of the js files are ajax incorporated and I want to call a php script. Obviously, I can't call to the "scripts" subdomain, nor can I use the root webserver (as it is detected as the calling subdomains root). The only thing I can think of is if I can call the php file RELATIVE to the JS file... but all I can seem to get is RELATIVE to the calling script, which won't work since the js file won't know where it's being called from.
I'm having a problem with css positions !! i want the position of an image to be fixed when the user scrolls till some point and the position should be set to relative after that
how can I get the absolute position of a relative element?
We dynamically create a page with multiple segments which are relatively ordered among each other. In these segments we have input fields. When such an input field is focused I need it's absolute position. Is there a way to do so with IE > 6?
I have an iframe with some javascipt that gets the mouse x and y position like this:
//inside the iframe's onmousemove call back funciton xMousePos = window.event.clientX + document.body.scrollLeft; yMousePos = window.event.clientY + document.body.scrollTop;
This gets the x and y position inside the iframe. But what I want is the x and y position of the parent window, not the screen like screenX. Is there any easy way to get parentX and parentY or to get the offset x and y of the iframe relitive to the parent from inside the iframe?
I have an unordered list element which has click events registered. What i want is to be able to find the nth relative sibling to the list item that is clicked. In prototype I can simply say $(elm).next(3) or $(elm).previous(3) for the 3rd sibling forwards or backwards from the current sibling.
In JQuery there doesn't seem to be a way of getting a sibling relative to the current one, other than the immediate next() or prev(). So if I want the third previous I have to do this inJQuery
How can make me selectting a country and then come out with a relative cities ?
for example if i select the American <select name="country"> <option value="american">american </option> <option value="australia">australia </option> </select>
I'm busy trying to build an interface where users can create a sort of collage with images that they upload. I know it is possible to get the position of a DHTML element relative to the screen, the problem is I need the coordinates relative to a main div tag so that I can "compile" the collage and then when it gets served it will look the same regardless of screen size.
I'm just figuring out how to use absolute inside a relative element to shift an image without changing the flow of the rest of the html. It's working for Firefox 4, but not IE 9.
In firefox the div element doesn't cause a hole in the flow. The div and the image inside is simply moved over to where they should be. But in IE, the image is sitting there as part of the flow bumping down the next things (the text and span tags) and the image isn't moving over to the right at all.
I've tried wrapping the div in an another div but that made no difference. Am I crazy to think this is supposed to work? I'm inserting the div and image tags dynamically in the client in javacript.
I wonder if you can help? I've implemented a ready made JavaScript vertical toolbar into my Web site but have problems with positioning. It only has by default absolute positioning parameters and I need to change them to relative as whenever the browser is resized the menu stays at the same place on the screen. I was told that using <DIV> tags can help, but I have no idea how to do it.
Can anyone please submit a working example code of asigning relative parameters to the menu?
I know that I cannot specify the zIndex of a relatively positioned div BUT it does have a zindex computed by the browser. That's why another div can appear below or above it. So, how do I figure out what it's zindex is so I can dynamically put something above it?
Using .currentStyle/getcomputedstyle doesn't work as it returns "auto".
I'm writing a JS script that will be available as open source. This script needs some accompanying image files. I have been planning to package the .js and the image files together in a single directory and let the user put that directory anywhere they want. Trouble is, I can't figure out how to write JS code to put a reference to these image files into the html. The image files are relative to the .js file, but I haven't seen anyway to figure out the path to the .js file (i.e. the path to the code I am now running). Is there a way? If not, how do people usually package up a .js file and some accompanying image files?