Search Depending On What User Selects

Jul 20, 2005

what i want to do is create several radio buttons and a textbox for
searching purposes. the search will perform a search depending on
which button the user selects.

here is what i have now:

- for each radio button, i use the onClick event handler, which calls
a function called showMe()

- showMe() {
if (button 1 was selected)
document.write('form which will search down path A');
else if (button 2 was selected)
document.write('form which will search down path B');
else if (button 3 was selected)...
}

this works, but once the user makes their selection, the search form
will pop up on another page. how do i fix it so that the search form
will display on the same page as the radio buttons? Is there any
other way to accomplish this?

View 1 Replies


ADVERTISEMENT

Show Text In Search Box After User Selects Something?

Sep 8, 2010

I have this search box form with 2 select boxes :

<form action="search.php" method="get">
<select name="RingType">
<option value="Nose">Nose</option>
<option value="Toe">Toe</option>

[Code]....

For example, when a visitor selects "Belly" RingType, I want "Belly Ring" to appear in the search box.

and

when the visitor selects "pearl" NecklaceType, I want "pearl necklace" to appear in the search box.

if the visitor first selects "Belly" RingType, and then selects "pearl" NecklaceType, I want "Belly Ring pearl necklace" to appear in the search box.

After making his selections in the search box, if he types something in the search box, it should add to what is already there in the search box. Or, if he first types something in the search box for example, "jewelry" and then selects "pearl" in the necklacetype select box, the search box should show : "jewelry pearl necklace"

View 8 Replies View Related

Function Works When User Selects Value, But Not In Value Preloaded?

Mar 30, 2011

I have a script one of my pages which is designed to prevent a user from selecting the same option from a drop down more than once. Here is the script:

Code:
function changeSelect(sel) {
option = sel.selctedIndex;
var sels=document.getElementsByTagName("select");

[Code]....

Here is the basis: A user is greeted with a page of blank fields. On the right is a drop down menu which has the select options you see. The user enters the address of a few DNS servers, then selects their main and least favorite DNS of the group. If there is a "Main DNS" already selected, it will blank the originally selected drop down, and fill in the newly selected drop down.

The problem I'm having, is when the user calls their settings back, the PHP will load the proper "main" and "last" options, but I have to select two more to get it to blank. I know this is because the script is called with an "onchange" function, but I've tried using "onLoads" and I've also tried making a quick function to "select" the option, but to no avail.

View 1 Replies View Related

JQuery :: Catch The Value Of <select> When A User Selects An Option?

Aug 15, 2011

how can i cath a html <select> event? i have a <select> list... i want to catch the value of <select> when a user selects an option..

View 2 Replies View Related

JQuery :: (autocomplete) Not Selecting Value Unless User Explicitly Selects It?

Sep 30, 2009

I'm using the jquery autocomplete plugin.Suppose the user starts typing, and the autocomplete presents a drop-down of possible values. If the user presses return, the first valuein the drop-down is selected.What I want instead is the user experience that Firefox's search boxprovides: As the user types, search suggestions are offered. If theuser presses return without selecting a suggestion, what the user hastyped so far is submitted. And of course, if the user does explicitlyselect a value from the drop-down, then the selected value is

View 1 Replies View Related

JQuery :: H5validate - Livequery - User Selects From A Dropdown Menu - Via AJ

May 27, 2011

I'm currently using h5validate with my forms but recently setup a few where a second form is generated based on what a user selects from a dropdown menu (via AJAX). Since the new form ID's were not existing when the document was loaded jQuery does not bind h5validate to the new form. I found a plugin called livequery that will bind new elements on the fly. Unfortunately, I'm pretty new to jQuery and can't quite figure out how to make this work with h5.

My current h5 function looks like this, where formID is the ID of the from that does not exist but is later loaded in via AJAX.

Here are the sites to the two plugins:

View 2 Replies View Related

OnClick - Show Image + Link - Displays Whenever The User Selects A Combination

Nov 14, 2010

I opted to use JavaScript & PHP (instead of Flash) to create a sort-of "t-shirt designer" -- basically, it's a gallery-type script that allows users to scroll through t-shirt styles, swap colors, and so on, prior to reaching the actual design tool. And I'm starting to regret.

It's actually working very well so far, except for one thing: I want the t-shirt option that the user selects to link the user to the design tool. The "gallery" already has an image for each possible option that displays whenever the user selects a combination, but I want to make that image is a clickable link.

I have no idea where to start -- I know next to nothing about javascript -- and to accomplish this in Flasjh I'd have to start this stupid basic thing all over again from scratch, and it would defeat the point of not using Flash in the first place, so

View 2 Replies View Related

Dynamic MCQs - Error Alert If User Selects Wrong Choice?

Nov 2, 2009

I am creating dynamic questions and question's choices (radiobuttons or checkboxes) from database when runtime..after users answer the question, press next button to pass the next questions

For example
1) Question definition
a)choice definition
b)choice definition
c)....

Users have to choose any choices..if not, my system is giving alert, Actually my problem is about checkboxes. I created hidden textboxes, if question choices' type is checkbox. So the last choice definition is name "Other". If user checks the other choice, the hidden textbox is going to be visible. It is all okay until here. I want to give a error alert if user checks the other choice and doesn't fill the textbox when press next question. I don't validate this. How can i do it.

View 2 Replies View Related

Tracking User Activity - Track Whether User Is Typing In The Browser's Address Bar Or Aside Google Search Box

Oct 14, 2011

is it possible to track whether user is typing in the browser's address bar or aside google search box ( which appears in most of the browsers besides address bar)? if yes, I would like to know HOW? references are welcome.

View 4 Replies View Related

JQuery :: Not Refreshing Page - Form That A User Selects Item From Dynamic List

Mar 26, 2011

I have a search form that a user selects item from dynamic list hits the submit button and it returns each matchingresulton same page in an update form, i have 2 checkboxes in update form that updates the DB when 1 is checked, this all works fine until i check the checkbox the data updates ok but allremainingupdate forms are removed because the page refreshes.

So i need to update formstwith out page refreshing but i cant get it to work with multiple forms on same page.

View 2 Replies View Related

JQuery :: Replace The Entire Page When The User Selects Adifferent Option In A Combo Box?

Sep 5, 2009

I am trying to replace the entire page when the user selects adifferent option in a combo box. The code I have works for the firstiteration. However, It fails everytime there after.I went throughfirebug and it appears after the first refresh it never triggers theready() method.My Code is,

<script type="text/javascript">
$(document).ready(function() {
$("#id_company").change(function () {

[code]....

View 1 Replies View Related

Create A Form That Expands Or Collapses With More Or Less Fields To Fill In When The User Selects Or Deselects A Check Box On It?

Apr 6, 2010

I need to create a form that expands or collapses with more or less fields to fill in when the user selects or deselects a check box on it. This form also needs to be secure. What is the best way to accomplish this?

View 19 Replies View Related

Changing Default Of DropDown List Depending On User URL

Sep 2, 2011

I have a form that I am using for several different pages as they are exactly the same... however at the top you must make a choice from the drop down box that then shows the appropriate fields to fill in. Can I make the drop down default to a certain option depending on which page they are coming from?

View 3 Replies View Related

Disable A Check Box Depending On Whether 1 Of 3 Radio Buttons Is Chosen By The User

Feb 24, 2009

I would like to disable a check box depending on whether 1 of 3 radio buttons is chosen by the user. As I am a js noob, I don't have any beginning code to start with.

View 7 Replies View Related

Making Check Box/textbox Invisible/visible Depending On User Action?

Oct 31, 2009

Basically, i have a past and present checkbox, start date and leave date. Now if the user clicks on the "present" checkbox i want the leave date checkbox to vanish and if clicked again i want to re-appear..Take a look at this page:-http:[url].....

now you can see at the moment i have the checkboxes past, present and 2 text boxes beneath. Can i do this?

View 3 Replies View Related

How To Hide/show The Rows Of A Table Depending On The Value Selected By A User From A Drop Down List??

Feb 15, 2006

I am maintaining a site which is written in ASP. Now i have to create
some new pages.

In one page we have a table with many rows. Now, I want to enable or
disable(showing and hiding also) 2 rows of this table depending upon
the value selected by the user from a drop down list.

View 4 Replies View Related

Is Live Search Any Help To User?

Jul 18, 2006

I'm working on a form to add items within a bespoke CMS and have been contemplated the pros and cons of implementing a type of live search within the form. The way I was thinking of it working is:Users start to fill in form to add items to the databaseI don't want them to duplicate these items so thought that as they type the item name, I could return a table of similar results below with a note to say "The database already contains these similar items - Please check to ensure you are not replicating ... blah blah"My 2 questions are a) is this actually of any benefit to the user or should I just tell them to check the list of existing items before starting and b) anyone know of any tutorials to tell me how to do it!

View 1 Replies View Related

JQuery :: Selecting Sections - Delete (actually Hide) Either A Salesperson Or Client Depending On Which Link The User Clicked

Jul 18, 2011

I am building a web application using PHP. It lists each salesperson and below it, the clients assigned to them. There are only about 5 or 6 salespeople. There could be any number of clients for a salesperson. Each salesperson is given their own div and client information (name, email, phone) is grouped with an unordered list:

Code:
<div id="salesperson-1">
<h1>Salesperson 1</h1>
<ul>
<li>Steve Smith</li>
<li>steve@company-a.com</li>
<li>555-5555</li>
<li><a href="#">Delete Client</a></li>
</ul>
<a href="#">Delete Salesperson</a>
</div>

I would like to be able to delete (actually hide) either a salesperson or client depending on which link the user clicked. I have been using JQuery throughout my site so far and I can accomplish the task for the salespeople by creating individual events for 6 salespeople. If there are only 5 people, the 6th event will never be triggered. If there are 6, everyone is covered. The tricky part are the clients since I can't guarantee a specific number of them. I would like to fit best practices as much as possible and reduce the complexity of my code if I can. Keeping that in mind...Is there a better way to handle the salespeople rather than rewriting the function 6 times? Can I pass a variable to a JQuery function using the onClick binder on the <a> tag --> <a href="#" onClick=deleteClient(10)> and use the variable to determine which client to delete? Would using a function in plain javascript and ignoring JQuery for this entirely be better?

View 2 Replies View Related

Dynamic Drop-down List - Create A Dynamic Menu Where A User Selects One Item And Another Select List Is Shown

Jun 30, 2009

I've been beating my head against a wall for a few days trying to get this working. I'm trying to create a dynamic menu where a user selects one item and another select list is shown, then another and another (and so on). Here is my JS, it *should* be taking the ID of the div, comparing it to the selected value and then showing another div by settings it's class property to visible:

[Code]...

View 1 Replies View Related

Flag A User In Search Results Or PHP?

Jul 7, 2009

I have a webpage in which I enter a search item to look for job seekers in the Los angeles area. I get back results and now I have a column in the results table by which I can flag a certain user in my profile if I am impressed with his profile. How do i implement this ?. I know I can use the on mouse click event but how to i relate that user to the employer who logs in and how so i save that user who is flagged wrt the employer You tube uses a similar concept in which a user can flag a video if its unappropriate .... mine is a similar concept but i need to flag a user each employer login ...

View 3 Replies View Related

Make A Button Link Me To Website With A Designated Search By User?

Mar 14, 2010

I'm new to javascript and I have a button in an interface for an app. It's like drag and drop and i want this button to link you to a certain website searching for what the user types in the searchField1 box. The button is button16. Such as you type dogs into the text box and you click the google button among other search engines and it will redirect you to a google search doing a search for dogs. But how do I make this button search google and search for whats in searchField1. I would really appreciate the help. Im looking everywhere to learn this but just cant find it. If you could tell me how or send me a link to a tutorial code...

View 2 Replies View Related

Processing Pending Events From Within A Longl Lasting Loop (because User Wants To Cancel A Search)

Jul 20, 2005

I have to make an application that works on pc and apple mac.
Therefore I am investigating if it's possible to use html/javascript.
The database has 10000 records and is sequentially searched. This may
take 20 seconds or so. I want the user to be able to quit the search
and also I want the outputscreen to be updated immediately when a hit
is found and not wait until the complete search is finished.

The problem is that the click-event of the 'Cancel-button' is
processed after the search is finished. Is there something like
application.processmessages (similar to Delphi) so all pending events
are processed?

View 3 Replies View Related

AJAX :: Stopped Working - When A User Begins To Type Their Search, After 3 Characters,script Jumps Into Action And Shows A List Of Results?

Mar 27, 2009

I have an AJAX script which is used for a "live search" type function.When a user begins to type their search, after 3 characters, my AJAX script jumps into action and shows them a list of possible results.I has worked fine for months, and now suddenly I have found that it is causing a javascript error.I have traced the error down to the "open" call... ie: this.xmlHttp.open("GET", url, true);Like I said, this has worked for ages and I haven't changed these files since I got them working.

View 1 Replies View Related

Search Term To Stay In Search Field After Search?

Dec 10, 2010

I have a search field on the website, and when I type a word to search, it search good, but after preforming the search, the search term from search text field disappears and become the default 'Search' word.

How can I make search term stay in search field after preforming a search ? For example, when I type into the search field 'JavaScript' I want that term to stay in search field and after the search is done.

View 1 Replies View Related

Html-file Where The User Inserts A Search Path For An Excel File?

Jan 28, 2010

I have one html-file where the user inserts a search path for an excel file. When the user clicks the button the data in the excel file should be presented in a <TABLE>. (Yeah, I know, activex only works in IE .. but that's good enough for this project)

The problem is .. I started out with a "fixed" search path for the excel file, so I didn't have the code in a function. That worked just fine. Once I added the function {} around the code it wouldn't work, it works just fine if I comment out the form-part and the function-part, and give the search path, of course.
It also works just fine if I use the function and form, but remove the <TABLE>- and <TR>-rows

[Code]...

View 1 Replies View Related

Instant Search - Code - Show Result String On The Search Field

Dec 13, 2011

I found this for instant search :

demo : [url]

index.php

Now i just want to edit one thing, when you search for something, results are shown under the search field, when you click on each result, goes to a link.

I want when clicking on a result, not going to link, just show that result string on the search field. where should i edit in script?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved