Jump to content

Question on forcing update to 'include' statement


djarvinen

Recommended Posts

I have this html code:

<div class="t1desc">$ <?php include ("PaymentAmount.inc"); ?> </div>

Whenever I Submit/Post (via a button) to write new data to the 'Paymentamount.inc file', the web page then correctly updates the payment, apparently without refreshing the page (which is what I want).  But this gives rise to two questions:

1. What mechanism is updating (i.e., reading the file) the above element?

2.  Is there a way to update this WITHOUT doing a SUBMIT? 

Thanks.

Link to comment
Share on other sites

The act of submitting a form is refreshing the page. If you want to do this without submitting a form you will need a Javascript program to change the document. You will need to use AJAX if you want to make permanent changes to the server in addition to changing the currently displayed page on the browser. 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...