Question
How do i submit a form or a part of a form without a page refresh?

Answers

When creating a form make sure that the form element onSubmit attribute is set to a JavaScript function that returns false.

form onSubmit=doAJAXSubmit();return false; input type=text id=tf1 /input type=submit id=submit1 value=Update//
You can also submit data by associating a function with a form button in a similar way.

form onSubmit=doAJAXSubmit();return false; input type=text id=tf1 /input type=button id=button1 onClick=doAJAXSubmit() value=Update//
Note that the form onSubmit attribute is still set. If the user hits the enter key in the text field the form will be submitted so you still need to handle that case.
When updating the page it is recommend you wait to make sure that the AJAX update of the form data was successful before updating the data in the page. Otherwise, the data may not properly update and the user may not know. I like to provide an informative message when doing a partial update and upon a successful AJAX interaction I will then update the page.   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q I need to have an additive price based on a variant characteristic selected and then provide a discount for each of the characteristics. I must discount the correlating characteristic, not the gross value. Price ------ char 1 = 1.00 char 2 = 2.00 char 3 = 3.00 gross price = 6.00 discount ------ char 1 = 10% of 1.00 = .10 char2 = 20% of 2.00 = .40 char3 = 15% of 3.00 = .45 total discounts = .95 the discount may vary by customer. How do i find out how configure this?
  • Q What is file extension of webservices?
  • Q What is the procedure followed to creatively design the ad for a given product to make it sell-able?
  • Q Explain JSP and tell its uses.
  • Q Monkeys enjoy ______ on the branches of tree.
  • Q Which of the following is the BEST way to handle obsolete magnetic tapes before disposing of them? A. Overwriting the tapes B. Initializing the tape labels C. Degaussing the tapes D. Erasing the tapes
  • Q What are the various types of diagrammatic representation of data?
  • Q What is VST, EST & VGT?
  • Q Mention the type of fruit in Strelitziaceae Family?
  • Q What does General Insurance Policy cover?
  • Q What is the hardware version used in vmware esxi 5.5?