If member clicked 'remember me' on confirm alert after entering the loginid and password, browser will save this information. But if some other clicks on register/join on the same browser, the login and password fields are populating by default. If member didn't say 'remember me', like saying 'not now' or 'never for this site', it is not populating. Note: Both the form names have the same name. Is there anyway to fix it without changing the form name.
I have a problem here with my coding. I want to have three levels combo box. However the second level is not populating the values, therefore the third level cannot be populated also. I have attcached my codes here. Pls have a look and tell me where is my error.
I am populating a select box from ajax .. it is loading fine ..But when i submit the form then the value of select box is never passed .. As if there is no select filed on the form ..
Code:
<SCRIPT> function content() { var retval="abc";[code].....
So when I submit the form .. The county field is never passed on to next page .
I have built myself an invoicing system and I am in the midst of upgrading it. Currently I have a dropdown box with all the items we sell in it and next to that a unit price text field. Currently you select the item and them manually type in the price. The issue is you have to know the price. What I want to do is once you choose an item it automatically adds the unit price. I am sure this is easy and have a funny feeling I have done this years ago. If anyone can point me in the right direction that would be great. An example or download code would be even better.
I have an application with many fields over several pages. After hitting Load, a Summary field is filled (via Javascript) with all the input from the various fields. This is working perfectly. Is it possible to make a button that, when clicked, will open the user's email client with the body filled in with the contents of this Summary field? Obviously the field will need a unique ID so JS can target it, I'll use onClick, and I'll need the mailto: tag, but I don't know what syntax to use to put it all together. Also, the script should check to make sure the field is full (they should tap on "Load" first), so the length of Summary needs to be checked. Only the Safari browser will be used for this.
I have a form that has a drop down. In the drop down are items the person can select, then next to the drop down there is a link to add an item if the item is not listed in the drop down. That link is a popup window for the person to add a new item.
My question is, is there a way that after the person adds the item via the pop up the popup window closes and the drop down is now showing the new item they selected without losing all their form data they already entered??
I have a flash game that passes a score via URL string i.e.(URL) and I want it to populate the "value" of this hidden form field (<input type="hidden" name="Score" value=""> ), but I dont know where to begin. The form is in an HTML doc and not within flash, if that makes any difference.
I have a dropdown (picklist) on the page, and when the user selects one of the company names in the list the onChange event fires and kicks in some AJAX to get the company's details from the database. The details are just the various locations of each company.
The way I am doing it now I have a simple div on the page below the picklist and I am using PHP to draw out the entire HTML, including the values sought from the database, and then just using innerHTML on the div to dump the info in there.
But it strikes me this is not really an efficient way to do this. Should I just have the PHP form an XML doc and then use that to populate the form fields?
If so how do I use the DOM to create text fields on the page, and then populate them with the info returned from the DB?
I just know basic HTML & CSS. However, was working on a project that would require a little javascript. It's for a travel agency and the idea behind it is there is a "booking page" that is basically an html form with a bunch of hidden values (like the destination airport code, the origin airport code, etc). The only thing a potential customer has to do is use a selection list and pick the dates available for that travel sale and hti submit. However, there's a new promotion coming out next week where if you book to travel for certain dates, you can use a promo code to save $100 on your vacation. What I would like to know is if there is anyway I can use javascript so that if a person selects the promotional dates, it auto-populates the promotional code text field.
I have a table set up with a .click() function on each row sothat if it is clicked on, a class is added to the row thus changingthe background, etc. I was wondering if there was is a way to takethe id of the row that was clicked and populate a hidden field withit. What would I need to include in my .click() function for this towork?Here is my current one:
The table, and the input id element, are dynamically created from database records and I use jQuery live to initialize the datepicker for each field, like so:
The idea is that when I click in the input field, the datepicker pops up and allows the user to input a date. While the date shows in the input field in the table, the value attribute of the input field is empty. I can't use the getDate() method on the datepicker, since I can't programmatically connect the datepicker element in any particular row with the input element in that row. I tried the onClose method shown below, but that doesn't work either. Has anyone done this successfully?
The following form validation script works, currently if one of the five fields are completed, a message appears the remaining field(s) must be completed etc. Although the information the user has inputted in the first field is cleared. How can this information be available, if there is one problem in the form it doesn't make sense that the user must re-input all the information again. I look forward to hearing your response,
Not exactly sure this is the right forum to post this but just to give it a shot.I am relatively new to programmming...I am currently working on a web appliation using MySQL DB and use PHP/SQL.I have a web form i have created. What i want to achieve is that when a user fills in one of the fields...a text field, i want 8 other fields to be AUTO filled with different values related to the one the user filled in
but it isn't right. It breaks the javascript, and doesn't run at all. Anyone have some clues or answers for me? I don't use jquery or javascript enough to figure it out.
I have a page with 2 iframes lets call them "navigation" and "main". Now in the frame navigation, if you click a link i need both frames to load a new page, lets say to google for the purpose of this example. I have the following in the frame "navigation": <a href="#click" parent.main.location='http://google.com'">Google-ize Me</a>
Now this works all fine and dandy in IE, but the problem lies in Firefox and Netscape. It doesn't seem to work.
I have a form with some text fields that are disabled UNLESS a checkbox is checked. Initially the text fields are disabled and the checkbox is unchecked.
The code is something like this:
Code: function disableTextbox() { if (chk.checked) { txt.disabled = false; } else { txt.disabled = true; } }
<form action=something.cfm> <input type=checkbox name=chk onclick=disableTextbox();> <input type=text name=txt disabled> <input type=submit> </form> When the form is submitted, some validation is performed. If anything fails, I display an error message and show a link to go back (history.back).
The problem that I am having is that when you click on the link to go back, the checkbox on the form is checked, but the text fields are disabled.
You have to re-click the checkbox to update the text field.
I'm working on a site and for my login area, instead of using labels for the textboxes, I wanted to just put default text in there.
The JS that I am using is supposed to only enter the default values in the textboxes if they are blank. Unfortunately, I think the JS runs before the browser puts the "auto remember" stuff into the boxs, so the JS will always put the default values in the boxes.
The problem is that, when its time for the browser to enter the auto remember stuff, it sees that there is already stuff entered, so it doesn't enter the previously-remembered login information.
I'm pretty sure that what I'm trying to do is possible, but maybe I'm going about it the wrong way. Could somebody suggest the appropriate way to do this? code...
Can someone explain how I can use javascript (I am assuming this is the best way to do it) to add two field values together. I.e. field 1 plus field 2 equals field 3 (this is in a php form)
Also how can I set a field to be a value depending on what the user selects, i.e. they may have eight items to select from and each one has a different value.
The above javascript will then use that value to add to another field value to give a me a total value....
I type something on the current textarea/input and all the values get removed after I add another field.
<script language="Javascript" type="text/javascript"> <!-- //Add more fields dynamically. function addField(area,field,limit) { if(!document.getElementById) return; //Prevent older browsers from getting any further. var field_area = document.getElementById(area); var all_inputs = field_area.getElementsByTagName("input"); //Get all the input fields in the given area. //Find the count of the last element of the list. It will be in the format '<field><number>'.
If the //field given in the argument is 'friend_' the last id will be 'friend_4'. var last_item = all_inputs.length - 1; var last = all_inputs[last_item].id; var count = Number(last.split("_")[1]) + 1;
//If the maximum number of elements have been reached, exit the function. //If the given limit is lower than 0, infinite number of fields can be created. if(count > limit && limit > 0) return; //Older Method field_area.innerHTML += "<li><textarea id='steps' name='steps[]' rows='5' cols='40'>