Restoring OTHER Form Field After Submit

Sep 23, 2005

On an HTML page with 2x different forms, how can I redisplay the same
page after a submit, restoring the values from BOTH forms even though
only one was submitted?

I have an existing PHP program that I am modifying, and need to
redisplay the same page after a submit (the button that submits is a
"change shipping" button, that allows the user to continue with the
rest of the page). The problem is that there are TWO forms - the one
that allows you to change shipping, and the other where the user can
fill in the billing address. Making this into one form is not really an
option, due to how the program is set up.

Since they are 2 different forms, submitting the "change shipping" form
does NOT bring the billing address fields to my PHP code in the POST.
This makes restore difficult.

I have a couple of kludgy ideas on how to work around this (mostly
javascript based - e.g. setting hidden fields in the "change shipping"
form when the user is changing the billing fields). However, I was
wondering if there were any other easy solution to acheive this.

View 3 Replies


ADVERTISEMENT

Form Text Field/SUBMIT Links To Onsite URL - On Home Page - Text Field And Submit Button ?

Feb 22, 2009

I have a website containing 26 subdirectories 'a' to 'z'

On the home page I want a text field and submit button

If someone for example types 'j' it will go to the 'j' folder home page

Does anyone know where I might find code like this?

View 1 Replies View Related

Restoring A Filename And Path On A FORM?

Nov 14, 2010

how to save form values in cookies, etc. for use when re-displaying the forms. for example, after an error has been detected. Naturally, PHP allows you to do this with $_SESSION variables.

But no one seems to have cracked the problem with FORMs having file uploads. Browsers will send the file to the server and the name, but not the path on the client computer (I suppose for security reasons).

So, if you want to re-display the page, you can fill in all the form data in your PHP script so that the user doesn't have to re-enter everything. But, since your PHP script only knows the NAME of the uploaded file, and not the path, whatever your fill in for the "xxx" in <input type="file" value="xxx" /> will be wrong.

View 4 Replies View Related

Submit Only The Text Field Part Of A Form?

Jan 16, 2006

I have a search interface that I'm building that uses radio buttons, jump menus and a keyword search text box.

Is there a way to have a little "go" button next to the text field that will submit just the search string in the text box to my searchresults.php page?

Right now, any submit button I put within the page submits all parameters from my radio buttons and jump menus in addition to the keyword values. I would like the keyword entry box information only to be used if there are any values in it and have any other variables (e.g. from the radio buttons) to be null so I don't get a search with keywords AND radiobutton values. Of course, if nobody clicks the radiobuttons, no problem, no values are passed, but I'm sure some pesky user will have some checked and then decide to do a keyword search...

I'd rather send the info to the same PHP results page, so I don't want other values to muddle up the keyword results. I'm sure I could erase the other values with an 'if keywords=anything then other variables are null' statement, but I want the user to think they're only submitting the keywords from the entire page (which is what a 'go' button next to the field would imply) and I thought there might be a simple way.

View 3 Replies View Related

Auto Submit Form Once Field Entered

May 10, 2007

how to submit a form once an entry has been put in a specific field?
for example, user enters value in a field and then it get's submitted.

View 2 Replies View Related

Setting A Hidden Field On Submit Of A Form?

Aug 8, 2011

I want to be able to set a hidden field with a value when I submit a form.

Here is the javascript

function submitEntry() {
var form = document.sobi2EditForm;
if (form.field_secondarycat1.value=='Nurseries'){

[Code]....

View 1 Replies View Related

Form Text Field - SUBMIT Links To Onsite URL

Feb 23, 2009

I have a website containing 26 subdirectories 'a' to 'z'

On the home page I want a text field and submit button

If someone for example types 'j' it will go to the 'j' folder home page

Does anyone know where I might find code like this?

View 2 Replies View Related

Form Text Field - SUBMIT Links To Onsite URL - Code ?

Feb 22, 2009

I have a website containing 26 subdirectories 'a' to 'z'

On the home page I want a text field and submit button

If someone for example types 'j' it will go to the 'j' folder home page

Does anyone know where I might find code like this?

View 2 Replies View Related

Check Form Script - Text Field And A Submit Button ?

May 25, 2010

I have a form with a text field and a submit button. I don't want the form to submit if the text field is filled in correctly. for example a email address typed in the text field area. I'm working with spry validation but i guess i need to add some kind of onSubmit event, with javascript. I have some idea but not sure what to fill in by the "if statements" in the script.

View 3 Replies View Related

JQuery :: Firefox - Setup A Basic Form With A Name And A Button (not Submit) And One Text Field

Jan 10, 2012

My first day with jquery, and I've just been playing around a little but have run in to a problem in Firefox.

I've set up a basic form with a name and a button (not submit) and one text field.

All it does right now is open an alert box when the button is clicked. That's fair enough. However, in Firefox, if I have the text field selected and hit enter, it doesn't press the button.

How would I go about making sure the enter key presses the button? I'd like to avoid using onclick and a method in the form if possible. My aim eventually is to post data and return it without a page refresh instead of create an alert box.

<html>

View 2 Replies View Related

Submit Form - Drop Down Menu "required Field" ?

Aug 11, 2009

I am trying to make the jurisdiction drop down menu a required field. Not very good with code but done all of it apart from jurisdiction bit.

================================================
<!--
function checkFields(Obj) {
if (Obj.jurisdiction.value.length == 0)[code].....

View 1 Replies View Related

Copy And Paste Form RTF Document Into Field In Asp Form Cause It To Bypass Field Length And Javascript Validation - How To Overcome?

Jul 23, 2005

I have a web form with several fields. If I copy & paste from a RTF document into a field, the javascript validation and field length are bypassed and cause the form to fail.

View 3 Replies View Related

Hiding File And Submit Field After Submit

Jun 18, 2010

I've got the following 2 fields in my form:

Now I want to hide both of them as soon as the submit button is pressed.

View 1 Replies View Related

Restoring Scroll Position

Dec 5, 2005

Rather than have several different pages, an app was designed to have
different sections, all on one page. To get to the different sections the
browser is scrolled down. It may take several submits before everything gets
filled out correctly. The user complained because the page would not scroll
to the previous position, code was installed to save and restore the page
position, but it doesn't always go to the same place. Sometimes it does.
Sometimes it doesn't. Two text boxes are used to save position, and the page
is regenerated with x and y as literals by the server. The problem seems to
be what values are saved as the page is submitted. Code:

View 2 Replies View Related

Jquery :: Form Field Clear \ Form Field Reset?

Nov 12, 2011

i think this will help people a lot, cuz i couldn't find any simple answer by googling 3 hours...i need a very very simple jquery form field reset.here is the picture what i need:


HTML Code:
<script type='text/javascript' src='http://code.jquery.com/jquery-1.6.4.min.js'></script>
<script>

[code]....

View 2 Replies View Related

Saving And Restoring Check Box Status?

May 18, 2010

providing me the piece of code which saves the check box status and then to use the saved information to restore the check box status

View 2 Replies View Related

3 Submit Buttons - Stop Or Continue Form Execution With A Confirm Box On The Third Submit Button ?

Apr 23, 2009

On my form I have 3 submit buttons which handle different things.I am looking for a way to stop or continue form execution with a confirm box on the third submit button and the third only.I can't use onsubmit because that will trigger on all three buttons.

View 2 Replies View Related

Restoring The Background On Collapsible Floating Sidebar?

Nov 4, 2010

I haven't used much Javascript before and I have a question about the following code. I've taken it from this tut [URL] and changed it a bit so it applies an expand/collapse functionality to a floating sidebar on the side of a website I'm working on.

When I remove the background on the toggle function, it refuses to come back. I have a feeling it's a simple solution, I just don't know what syntax to fill into the second part of the conditional to restore the background image. I've tried display, show, an actual path to the image...

<script language="JavaScript" type="text/javascript">
function toggle() {
var bar = document.getElementById('floater');
var barText = document.getElementById('f_news');

[Code]....

View 1 Replies View Related

Saving/restoring Caret Position In A ContentEditable Div

Feb 2, 2005

I have a contentEditable element, and am using setTimeout() to call a function which changes the innerHTML of the div. Problem is that changing innerHTML moves the caret to the end of the text.

I need to keep the caret pos so the user can keep typing. I tried storing the caret pos with
cursorPos=document.selection.createRange().duplicate();

And then later restoring it with cursorPos.select() - which is IE only, but it doesn't work because the content of the div gets changed between calls, and the behavior is undefined (it basically selects everything) ...

View 1 Replies View Related

JQuery :: Submit And Reloading Form Values After Submit Button Is Clicked?

Jul 13, 2011

In the following .submit function, I am attempting to grab the value of the selected option in the facilityCodes dropdown list when I click the submit button and then during the submit function,select the facilityCode again in the dropdown list when the page reloads and then disable the list so that the user cannot change it.However,the situation is when I reload the page after the submit button is clicked the dropdown defaults to the first option and the list is enabled.I apparently am not understanding how.submit works so that I'm selecting the option I'm defining in my code below and then disabling the list AFTER the page reloads due to an error on the page. My question is how can I accomplish this?Here is my code:

$(function() {
$("#ARTransferForm").submit(function() {
var msgsCount = 0;[code]....

View 1 Replies View Related

Submit The Form Data To The Popup Window Without A Submit Button

Jul 23, 2005

The following will submit the form data to popup by clicking the submit button. I want it will submit the form automatically to the popup, there is no submit button in this page. Basically this page should not show up.

<script type="text/javascript">
function submitmyform(f) {
f.target = 'foo'
window.open('',f.target,'menubar=no,scrollbars=no, width=800,height=800');
f.submit();
return false;
}
</script>

<form name="myform" action="popup.asp" target="_blank" method="post"
onsubmit="return submitmyform(this);">
<input type="hidden" name="item" value="item"/>
<input type="submit" value="submit to popup"/>
</form>

View 2 Replies View Related

JQuery :: Submit Form Using Text Link Rather Than Submit Button?

Sep 28, 2010

I'm using mailchimps signup box (they don't have a decent forum to ask on) on my website and want to adjust the submit button and change it to a normal link. Here's the button that submit's the form:

[Code]...

View 14 Replies View Related

JQuery :: Global Focus With Clearing And Restoring Input Value's

Sep 24, 2010

Trying to create a method/function how ever you want to call it, that will allow me to clear input values on inputs with focus() and restore the input values if nothing is entered or keep what the user types on focusou().[code]

View 3 Replies View Related

JQuery :: 1.4 Restoring Page State On Back Button?

Jan 22, 2010

In Mac Safari 4.04 & Firefox 3.6, I am seeing page state being persisted on back button to page. I couldn't reproduce on jquery 1.3.2.

Here's a simple example:

<html>
<body>
<script type="text/javascript" src="jquery-1.4.js"></script>
<a href='#content1'>tab 1</a> <a href='#content2'>tab 2</a>

[Code]....

1. Click on one of the anchors.

2. Goto another page

3. Click the browser back button

Result: One of the sections is still hidden. Is anyone else seeing this? How is jquery doing this?

View 3 Replies View Related

JQuery :: Disable Submit Button On Form Submit?

Jan 31, 2008

I have a page with many forms that I need to change from a post to an ajax call. That part is working, no problem, but now I want to disable the submit button while it's waiting on the server response and then re-enable it when the response comes back.

Here's what I have:

$(function() {
$('form').each(function() {
$(this).submit(function(){

[code]...

I can't figure out what my selector should be to get the submit button of the form that's being submitted. What should I be using instead? Also, if the call errors out, I'd like to just post the form as usual.

View 12 Replies View Related

Check Which Submit Buttand Then Confirm Submit Form?

Sep 25, 2009

I have a php form and it has 3 submit buttons namely "delete" , "update_quantity" and "place_order".They all work fine but I want to build in a check for each one just in case the user click one of the buttons by mistake.So Each one must have a different message like for delete it must be, "Are you sure you want to delete Record nr ......" OK or Cancle.
And for update " Are you sure you want to update Quantity to....." OK or Cancle.

View 2 Replies View Related







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