Updating Form Based On User Input

Jul 23, 2005

I have a form with a select field. Depending on what is selected in this field, I want to display or not display another select field. For example first field asks the user if they drive, if the user selects "NO" the form doesn't change. If they select "YES", another field appears with different makes to chose from. If they change back to "NO" the second field dissapears again.

View 5 Replies


ADVERTISEMENT

Updating Textare Based On User Input?

Aug 11, 2010

The user writes some text/figures to a number of text boxes (WMSURL , WMSSRS and so on). When the user pushes the "Compile request" button, it should concatenate all the values to one single strind (and it do). Now comes my problem; the concatenated string should appear in the larger textarea (id=textarea), using the onclick for the Compile request button.

Here's the code (partly):

<script type="text/javascript">
<!--
// Function that concatenates the values in the fields to a WMS GetMap query

[code]....

View 6 Replies View Related

AJAX :: Updating FORM Action Based On Input

Aug 2, 2011

Let me preface this by saying that I have ZERO experience with Ajax, and have simply copied this code from a blog elsewhere. What is shown below ties to a php file that I developed for a search function on our site. As the user enters their search term(s) in the text input field, the div below is populated with potential results through AJAX. I get all that.

However, I'd like to extend this a bit more. I'd like to enable to user to click the Enter key to follow the URL of the top search result automatically, without having to move their mouse and click on it.

Since I'm using PHP to generate the actual URL, I'm sure I can just send this back as a variable via AJAX, but with my lack of understanding, I thought I'd poke around here for some assistance. Can someone show me how to tweak the code below to accomplish what I'm looking for?

Code:

<script type="text/javascript">
function showResult(str)
{
if (str=="")

[Code].....

I'm less concerned about getting the Enter key to perform the submit than I am about passing the URL variable back to the form via AJAX. I've seen lots of examples of getting the Enter key to behave this way, I just didn't want to muddy up the original code above.

View 4 Replies View Related

Adjusting Form Based On User Input

Feb 3, 2001

This is probably easy, but I flipped through the first 100 posts and couldn't find a similar question.

I would like to set up a form with multiple radio boxes in a table. The first row containing two selections, second containing 2..... Once the 1st row/column is selected, the 1st row/2nd column automatically displays the information from the first selection.

I am not necessarily looking for exact code on how to do this, just reference points to go to, and preferably suggestions on the best(meaning quickest) language to do this with.

View 1 Replies View Related

Form - Show Specified Items Based On User Input?

Feb 17, 2010

So I am trying to make a form that will eventually take the user to a specified link. It is a form that uses drop down menus. I based this off of someone elses code (with permission :)), but it shows everything <= user input. I cannot for the life of me figure out how to make it only show only one of the next options.here is the JS code:

<script language="JavaScript">
function ShowMenu(num, menu, max)
{

[code]....

View 56 Replies View Related

Creating A Form That Will Change The Number Of Fields Based On User Input

Jan 4, 2006

I have a form that collects information about up to 5 items. I would
like the user to be able to select from a drop down menu how many items
for which they want to compare information, and then have the form
change the number of input fields accordingly.

In other words, if the user selects enter info for 3 items, then input
fields for only 3 items are shown, if they change it to 4 items, then a
fourth column shows up in the table with the appropriate input fields.

View 2 Replies View Related

Email Form Info Based On User Input In Previous Page?

Nov 7, 2010

I'm just starting up in web design and I have an interesting challenge that I'm hoping can be solved w/java script. I have a site with an application form. When the form is to be submitted, the form data needs to be emailed to the correct person to handle that particular application. However, that can't be determined by anything specific in the form. It can only be determined by the link that they clicked on to get to the form. I really don't want to have 22 identical forms with just a different EmailTo addie, which is what the previous site developer did. Someone please tell me this can be done w/java script? If not w/java script

View 4 Replies View Related

JQuery :: Updating A Form Based On Checkbox Selection?

Apr 12, 2010

I'm working on a search filter trying to get a form to update itself depending on what options have been checked from a selection of checkboxes. i.e. selecting one checkbox can bring up other checkboxes. It's just posting the form to update_filter.php and putting the updated form into searchNavigation div.

$(document).ready(function(e){
$("input[type='checkbox']").change(function(e){
e.preventDefault();
update_filter();

[Code]....

This works for the first checkbox that is checked, but after that nothing.

Is it something to do with the fact that the form is not the same form that it was before the checkbox was checked if that makes sense? or shouldn't that make any difference?

View 2 Replies View Related

Go To Url Based On User Input?

May 28, 2010

I want a js that will have the user select from a drop down list a venue, then enter their username in one textbox, and password in another, so they're taken to /venue/username/password.html. Eg. If the soccer player frankie has password 1111, he'll be taken to /soccer/frankie/1111.html.My code at the moment is this:

<!-- Begin
site = "http://www.mysite.com.au/photos"; //
function combineMenus(frm, menu1, text1, text2) {

[code]....

View 4 Replies View Related

Get Image Based On User Input

Jul 23, 2005

Right now I am using the javascript 'prompt' to enter a photoid and the
script that I am using uses document.write
to put the proper image on the page ....i.e. PHOTOID =".jpg"

What I want is a simple user input text area and when submit is clicked a
placeholder image beneath is exchanged for the proper
image based on the user's input.
example: User enters re4555 and the image re4555.jpg replaces the image
nosel.jpg
that I have created which basically says 'no image selected'.

View 5 Replies View Related

Calculations Based On User Input?

Jul 14, 2010

Dear expert (Ok, i am new to this and should maybe not address this as a letter )I hope someone can help me ... this is what i want to achieve (I am using frontpage)I want to create a table (this i can do!) that require a user input (number of guests).It then has SEVERAL options:- Select an option from a drop down list, and a price is then loaded from somewhere to create a total for that option and display it in the table (And keep that total for adding later)- Check a box, and if checked it creates a further calculation, displaying and storing the number for further calculation.a number of the above options, and a grand total on the bottom.I found more or less a page on a site that does what i am looking for, but after looking at the code, i have even LESS of an idea how it works Can someone PLEASE help me, or point me in the right direction?(I am not looking for someone to just write the code for me, as this will not teach me anything, and i want to learn)

View 9 Replies View Related

Jquery :: Autocomplete To Redirect A User Based On Their Input

Jun 29, 2010

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:

[Code]....

View 7 Replies View Related

Redirecting To URL Based On User Entry In Form?

Apr 17, 2011

I'm trying to create a form where the user enters data in a field and is redirected to a URL based on that entry - example: user enters 1234 and he is directed to mypage.com/1234/index.htm - if that folder does not exist it would give a 'try again' error.

View 18 Replies View Related

Fill A Form Box2 Automatically Based On Form Box1 Input

Jul 23, 2005

How would I put this together so,

<input name="input1" type="text">

<input name="input2" value="whatever is typed into input1" type="text">

I would like to be able to type something in input1, and see it type
into input2

View 2 Replies View Related

Echo A Variable In A Form Based On User Selection?

Aug 15, 2009

here is part of a form I have:

<select name = "pulmonologist" >
<option selected="" value="">---Select---
<option value="none">None</option>

[code].....

View 1 Replies View Related

Pass User Input From A Form To One Database Field Using Several Form Elements

May 4, 2009

I need to pass user input from a form to one database field. I'm relatively new to JS but the idea I had was to have several form elements and use JS to collect the users input and send all the values through a hidden element. What's happening is the variable names are being sent rather than the values. The code below is only passing to the next page. Limitations: I am editing an intranet site built by a 3rd party so a lot of the files we've been given are encrypted. I cannot change the method to post.

[Code]....

View 3 Replies View Related

Invoice Form - User Can Add - Input Field - After Adding A New Input Field - The Content In The Other Fields Is Deleted

Sep 1, 2011

I'm now working on kind of invoice form which in it the user can add as much input field as he wants.

The problem is that after adding a new input field - the content in the other fields is deleted.

Code:

View 8 Replies View Related

Change Form Based On Previous Input

May 7, 2009

I was wondering if it's possible to make it so that once a user selects a certain option in a list, it makes the next input for that form change to either a textfield or a list without losing the values entered in the inputs above.I know PHP is a server-side script, does that make this not possible?

View 3 Replies View Related

Grab User Input From A Form?

Jun 17, 2009

I need to grab whatever the user types in an input box and append it to the URL the page is going to, how do I do that?

javascript:var cbobject= document.searchCatForm.inp_searchCat.value; alert(cbobject);

Code:

<form id="searchCatForm" name="searchCatForm" action="catalogue/search?input=" method="post">
<div class="searchField">
<input id="inp_searchCat" name="inp_searchCat" value="Search catalogue"

[Code]....

View 4 Replies View Related

URL Link Dependant On User Input In Form

May 28, 2007

I have a form setup on my webpage that grabs a couple pieces of information from the user (ie name, address, etc.) and when the user enters this information and submits the form, the base URL of Code:

View 3 Replies View Related

Have Two Input Boxes On A Form Which Receive The First And Last Name Of A User?

Jan 17, 2011

I have two input boxes on a form which receive the first and last name of a user. I want to be able to use charAt() to get the first letter in each box and pass it a third box on the same form. is this doable? May I request some help? I was thinking something like the function below would be the starting point --I stand correct, as it is not working.

<script type="text/javascript">
var str="Mossa";
<!--document.write(str.charAt(0));-->
document.write('<INPUT TYPE=text size=2 VALUE="str.charAt(0);">');
var str="Barandao";

[Code]...

View 4 Replies View Related

Dynamically Create And Redirect To Hyperlink Based On Form Input?

Jun 30, 2009

I am having a problem with the following script. It sometimes works and sometimes does not. For instance, I placed the HTML code on my desktop and saved the text as .htm-

Open the file in IE and click to accept blocked content. Then I entered a number. Sometimes it works and goes to the document.location url.. but sometimes it just goes to code...

View 1 Replies View Related

JQuery :: Allow User To Select And Unselect Form Input?

Jan 11, 2012

I have a form with checkboxes and I want a user to be able to select all checkboxes at once and then deselect. I have some code but it only selects and then if I click it doesnt deselect the input items.

What are some other ways to approach this or anyone know why it doesnt work?

$(function () {
$('#selectall').toggle(
function() {
$('#friendslist .sel_emp').attr('checked', 'checked');

[Code].....

View 2 Replies View Related

JQuery :: Updating Multiple DIV Based On The Previous DIV?

Mar 5, 2010

I have the following HTML:

<div id="box">
<div id="inner-new">
content
</div>

[Code]....

This code block occurs several times. Sometime the first div ist just "inner" and the second div is missing.

Now I need to update the "new" DIV based on the height of the previous inner-new DIV. For one it works fine:

var height = $('#inner-new').outerHeight();
$('#new').css('margin-top', height*(-1)-30);

But how could I re-use this universally for all my boxes. It needs to check if the DIV "box" contains the DIV "inner-new" as first element, if that is true it need to update the DIV "new".

I tried several things with $('#box').each(function(i) { ... }); but couldn't come up with a solution.

View 1 Replies View Related

Force User To Input 2 Decimal Places In Form Field

Jun 17, 2010

I have a small piece of code (taken largely from W3 Schools)that checks that there is a decimal point entered in a form field, but what I really need is to check that the number entered ends in 2 decimal places.

e.g.
10 is Invalid
10.00 is Valid

My current code is below. Can someone explain what I need to do to ensure that the user enters a number including two trailing decimal places please?

[Code]...

View 1 Replies View Related

Updating User Submitted Text?

Sep 16, 2011

What am I doing wrong here? I am trying to make it where the user can name the link whatever he/she wants.... I think it might be this part... links[i] = name.linkPosition.value; Where linkPosition is a variable.

<div id="navBar">
<ul>
<li><a href="#" id="link0"><script>document.write(links[0]);</script></a></li>[code]...

Now the links are updating but I get NaN for each link.

View 2 Replies View Related







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