I have been looking at Prototype.js quite a bit lately as I need to create a very small library of similar functionality to a subset of Prototype.js. This is for use with Ruby on Rails.
About Prototype.js Rob G wrote:
1. It modifies the protoype of some built-in objects so that using say, for..in with an array object produces unexpected results.
I then thought I could use an instance of Element as the prototype of a MyElement constructor but that option has been squashed in the past as being not cross browser.
In the spirit of the season, I wanted to make it snow on my website. So I began digging. Eventually I ended up with a script that moved an image element down the page in a snowflake-like manner. The problem with it was it was dependant on an img element for every flake - simply no poor programming when using an Object Oriented programming language.So I decided I wanted to extend (in Java-speak; most of my programming background is in Java) the in-built Image object. The new object's src variable will lead to an image of the type of flake it is. (I want to be able to have more variance in images than a simple dot.) The new object will have a function that will allow it to move.A separate,unrelated function will control when each flakes move.
But when I request, it gives me this in the url: MajorCat%3AShoes That won't work, the search application on the backend doesn't filter properly because of the "%3A" instead of ":". When I manually pass in via the url: MajorCat: Shoes (at the end of the query) it works. So, that ":" is getting encoded. How do I get that IN the hash and make sure the request is unencoded when it goes out?
I'm thinking about developing a Google Maps style project for the university I work at. What I'd like to do is have a graphical image of our campus we currently use, but use AJAX to allow people to select a building and have the map dynamically move and point out the location.
The map is quite big so I was thinking of having it like Google Maps where you can drag the map through an iframe without having the page reload.
Does anyone know of some good tutorials on how to do this? While our campus is relatively large, it's not large enough to just use Google Maps instead of developing our own.
I'm looking for a tut on how to create tabs for content, not tabs for navigation/menu. Yes, kinda confusing, but here's an example of what I'm after code...
If you scroll down mid way, you will see a tabbed area where it provides the options to check out: Photos, Location, Aeriel and Street View. This is what I want to mimic (not the tabbed navigation up top in the menu bar).
Can you recommend any tutorials that would teach me how to do this?
I'm not sure what the proper term is, so let me give you an example. Imagine visiting a web page and reading the following:
My Groups Weather Trivia
If you click "My Groups," an element pops open displaying a list of names. I'm not talking about a pop-up windows that you can move around. This is part of the page. It's invisible until someone clicks "My Groups."
If you click "Weather," another element opens, displaying information on the weather. Clicking "Trivia" opens a box with trivia questions.
I wonder if someone could point me to a good script or tutorial that explains how to do this. I think my preferred default setting would close all the other elements when you open a new element. For example, if you click "Weather," then the Weather box opens, but everything else closes.
However, it would be nice to have the flexibility to modify the open-shut mechanism.
I want to make a dynamic 4 drop down menus with AJAX and PHP/mySQL, like this:
Last year, just a few days before holidays, I wrote a tutorial about a new feature available in Firefox 3 that allows web developers to do AJAX-style file uploads. Initially I intended to publish this tutorial as a SitePoint article, but it got rejected so I published it on my blog.
My application uses multiple lists in dynamic tables the contents of which change to reflext a user's context. I tried applying your tutorial code for assigning arrays to option values and text using the suggested pipe character "|" delimiter if one was used, but strangely in FireFox .search() to test for the presence of the pipe character returned 0 whether it was there or not! Using another character such as "#" worked fine. Also using DOM methods the text component had to be added by appending a TextNode otherwise the list simply displayed a list of 'undefined' items.My resulting function just unwraps an array of list items into an option group which is then appended to the select element at the calling end:[code]
I'm brand new to jQuery, and I am really interested in learning about it because of the potential it offers to enhance my webpages. To give you some background, I am self-taught in PHP and MySQL...not on a master's level, but I have designed and built database-driven sites with success and am confident that I can learn jQuery if only I could get pointed in the right direction. I have perused tutorials, links, forums and recently bought the jQuery Cookbook (I needed SOMETHING to go on and it was one of the few jQuery books at the local bookstore that felt as though it would be of help). My problem is, I am finding gaps in information that, to me, are critical to learning. I am looking for a nut-and-bolt approach, 'Do this, then do that' not the typical generalizations I keep encountering.
All I want to do to start with is to remotely validate a two-item form, you guessed it, username and email, against the contents of my database (the info for the validation plugins is just as vague and general). That's it. But the tutorials and examples are vague to me, and in one instance, a link was posted offering to display the server-side validation code used and the link was dead. I can't be the only person here who is stonewalled by these thoughtful, yet overly-general tutorials and books. if any of you have suggestions where I can find a concise, true step-by-step tutorial or book, I would love to know. Right now, it's just one frustrating day of research after another.
I'm looking for a tutorial type of help on using JQuery to create/populate a selection list. I've looked at their site (and searched on their site/google) and although there is tons of stuff there, I can't find what I need.
Sorry but I can't get the very first tutorial to work. I put the custom.js in a test_jr directory in htdocs. I also put the starterkit.html file in the same directory. I copied the contents of jquery-1.4.4.min.js into a jquery.js file also in the same directory. Then I did the custom.js page shown here:
I tried clicking on the [URL] and I get the starterkit.html page. If I click on the "some link" it doesn't do anything. What am I missing? There are syntax errors in my editor starting on the line with the asterisks* Why is there an error there? It looks like it closes the click function?