Here is what I'm envisioning: The user selects a state, then in the 'Cities' box, he starts typing the name of his city. However, it autocompletes the name for him based on the state he chose. So if he chose California and started typing in "Los Angeles", it would autocomplete "Los Angeles" for him. Does that make sense? Is there a script out there that can do this?
I've created a registration form with sponsorship options hooked to checkboxes. My original form used ASP to keep values in hidden fields to use for totaling everything at checkout time.
Now I'd like to use PHP and Ajax to place the value into the text field related for each option checked.
I'm able to do that making an Ajax call. My problem that I need help with is this: If the visitor decides to uncheck a sponsorship option, the value placed in the associated field remains on the form. How do I replace that value with a null or empty string if they decide to uncheck their original choice?
I've tried JavaScript to no avail so far, both in the client side and server side code. I'm very new at this and I need help. Will jQuery work without having to change a bunch of code?
I am working with this regexp to extract address: city, state, and zip. This version kinda works but it extracts one element of an array instead of three and keeps my "city" too long, including all text before it. ..................... var regex = /s*(.*)s*,s*([A-Z]{2})s+(d{5}(-d{4})?)s*/g; function doit(){ var arr = d.innerHTML.match(regex); if(arr.length=3){ d2.innerHTML = arr[0]+" | "+arr[1]+" | "+arr[2]; }else{ d2.innerHTML = "Found "+arr.length+" matches"; } } //--> </script> ....................... <div id="myDiv"> Some text here, not always break after <br>New Haven, CT 06460 plus whatever text here too </div>
Here is my code for looking up a city, and state by zip code. I am getting no errors and I believe it should work, but the code does not seem to want to function. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[URL]"> <html xmlns="[URL]"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>City and State Lookup</title> <style type="text/css"> .....
I'm new to jQuery. The little project I am working on is setting up a web form such that when the user enters their zip code (US only), a call is made to a php function which returns the appropriate City and State data. The one spot I am having difficulty with is in retrieving this data from the php file. I have read and reread the pages in the jQuery manual about .get, .post, .ajax, etc. and I am somewhat at a loss as to how to go about picking up the data that the php script generates.
I saw this code at [URL] and wanted to expand on it by adding a Zip Code field. The problem is it doesn't want to work for me and I don't know what I'm doing wrong. My source code is below.
I am new to jquery and I need to make a form that allows a user to select a state and a city that they go to school in. I am using the cascade juqery plug-in [url].
Which I think is a great plugin) The problem is there is a lot of data and it takes a long time for it all to load (some 28,000 records).
What I want to do is split it up into different files and then load only the file that contains the data for that start/region.
To say I'm new to JavaScript is a bit of an understatement so bear with me. I have a site set up with a variety of layers of toggles. When you enter the site all of the items are collapsed and you click the headings to expand. Each of the toggle-able items have ids. It works great for users who start at the homepage.
However, when I send people to any of the inner topics, all they see is the initial collapsed state of the site. I want to be able to provide a URL that will set the toggle to open, and show all of the content for that section on entry.
Here is my code and js, can anyone point me in the right direction?
So, for example, if someone chooses "California" out of the State list (select box), the City list next to it gets updated with all of the cities in California.
I have a property site and I currently have it set up do that when entering a property the person selects a country.Depending on the country selected, the town drop down populates with certain towns in that country.ecause of the number of countries this javascript is pertty large and that worries me slightly. Also, if someone hasjavascript turned off then it doesn't work.In order to make it more accessible, would I have to seperate the form into 2 sepertate pages.
I want to build an Ajax based autocomplete feature. Being a server side guy, I have little knowledge regarding layers and DHTML stuff. Having already implemented the AJAX part of the app, I am stuck with the layers thing.
The Google Suggest autocomplete is cool. Has anybody written code (free) or adapted Google Suggest kind of thing for their own use (like querying from database and showing results) ? Can you point me to some links or resources on the net.
I have 6 horizontal navigation image links on top of my site. The regular images are black n white, but on the hover they transform to a colored image. Each image leads to a different page on my site, I'm wondering if I can make the image corresponding to that page light up whenever on that page.
I don't know what it is I am doing wrong, I am trying to get the menus to either expand or contract based on their previous states, i.e if already expanded if clicked again contract, and if contracted, expand, so far it doesn't work for the about and services link(but works for the expand all and contract all links), Code:
I'm trying to get Jquery's Autocomplete to redirect a user based on their input - according to Jquery, it works like this: An autocomplete plugin can be used to search for a term and redirect to a page associated with a resulting item. The following is one way to achieve the redirect:
What you can see is that I have a bunch of images which form a chart, each of the images has multiple classes.I want to write a function which when called fades in/out images dependant on whether all related checkboxes are checked or not.Checkboxes are related to the images by id on the checkbox and class on the image, as I'm sure you can see. I will be calling this method each time a checkbox is checked.
I'm trying to get the two followup questions underneath the checkbox to show up only if someone places a check there, but for some reason the way I've got it set up now it's simply hiding the area I want to show up altogether, and the checkbox has no effect on it.
Rather than waste tons of space pasting it here, here's the pastebin: [url]
Alternatively here is the live version:[url]
I'd prefer to have the form collapse when the additional questions are hidden, though if i can get this working at all.
On my index.htm, I have a horizontal cell named "memberarea" which originally shows username & password input fields. After the user logs in, this area changes itself to a "Welcome Name, Lastname" field. I want that this cell displays again the username and password input fields in case of the session of the user has expired. I have tried it with the following code (within the Iframe in index.htm):
The name list is now getting huge and I would like to allow my admins to be able to type in the first few letters of a buyers name and have the select form "find" what the admin is entering. But I need the value of the buyer to be passed as the buyer's id for DB purposes.
I found a script on these forums that actually does what I want using a <select> field, but there is one little annoyance with it. Whenever a letter key is pressed, the <select> finds the first occurrence of the letter (as usual with a <select> field). It does come back immediately, but it doesn't look good when you are typing through the options and it keeps flashing from one to the other. Code:
I'm using a jquery autocomplete (plugin v 1.1) in an older application. It works fine. I'm now writing a new one and I'm using the jquery ui 1.4.4 version of autocomplete. In the 1.1 version, if I typedizzaand the only match in the resulting list waspizza, thenpizzawould be highlighted and clickingenterwould select pizza. The newer version will not do this.Pizzawill show up alone in the list but I still have to arrow down, or click it to select it. Is this a lost feature or is there a property that activates'auto-select'?
Well, my problem is with the use of basic plugin for Jquery Autocoplete, I have not used any of the many that circulate on the Internet. I managed to do well the search and query the database, it returns me the names of the students, the problem comes when I assign the id of the selected name to a hidden field of the form to send via the id _get to another page editor.
To achieve this autocomplete (or autosuggest), I created 3 files. 2 to make the query and process, and the next file that contains the form and the Javascript code that should work.
busq-alumnos.inc.php:
Anyway, the point is that everything works fine except the assignment of the hidden field id on the form.
I am trying to copy the billing information to be the same as the shipping information when they select the checkbox. Everything seems to work except for the State field which is a drop down. Depending on what country they select, the state field will automatically populate. how I can copy the billing state to be the same as shipping as well?
I have been using the jquery autocomplete plug-in for some time now and find it very useful. Lately I have come across the following problem in one of my JSP pages. The autocomplete suggestions are displayed and formatted properly. But when I select the one that I want, the result briefly appears in the input field and disappears. Simultaneously, the entered result automatically triggers another jquery search. The contents of my JSP page is given below. The same jquery code works perfectly well with other JSPs.
Code: <%@ include file="../common/include.jsp" %> <script> var cols = []; // column mappings : 0=Last name, 1=First Name, 2=Title, 3 = Employee ID $ .ready function { .....