Jump to content

how to refresh 2 pages when submitting the form


akkad

Recommended Posts

let me explain the problem :

 

i have a page of three frames :

first frame : contains form

second frame: recieve and manipulate a form contents

third frame: contains links in the second page labels

 

so when i will submit the form in the first frame i want that the remaining pages to be refreshed , how i can do that?

If you don't want to use javascript,

you can use only two frames and the second one containing <iframe>.

Than you just submit your form fromt the first one into the second frame.

//file1.html
<frameset rows="120,*">
  <frame name="formframe" src="form.htm">
  <frame name="resultsframe" src="res.php">
</frameset>

//form.htm
<form target="resframe" method="post">
<input type="submit" value="send">
</form>

//res.php
<body>
<iframe src="links.html" style="position: absolute; right: 0; height: 100%; width: 200px;..whatever.."></iframe>
<?php /* form results... */ ?>
</body>

If you don't want to use <iframe> you can achieve similar results by using two framesets... (but you will have to resend form content through the second frameset).

onMouseOver="frame1.top.location='url.htm'; frame3.top.location='url.htm'; form1.submit();

 

change frame1 and frame2 with whatever frames you want to redirect. when doing form1.submit, it will redirect the page that the form goes to anyway. Make sure to name them all.

here is my code of the form page can u edit it to work with ur code with u gave it to me using javascript:

<code>

<SELECT class=formfield name=day>

  <OPTION  selected>- Day -</OPTION>

              <OPTION value=01>01</OPTION> <OPTION value=02>02</OPTION>

              <OPTION value=03>03</OPTION> <OPTION value=04 >04</OPTION>

  <OPTION value=05>05</OPTION>

  <OPTION value=06>06</OPTION> <OPTION value=07>07</OPTION> <OPTION

              value=08>08</OPTION> <OPTION value=09>09</OPTION> <OPTION

              value=10>10</OPTION> <OPTION value=11>11</OPTION> <OPTION

              value=12>12</OPTION>

              <OPTION value=13>13</OPTION> <OPTION value=14>14</OPTION>

              <OPTION value=15>15</OPTION> <OPTION value=16 >16</OPTION>

  <OPTION value=17>17</OPTION>

  <OPTION value=18>18</OPTION> <OPTION value=19>19</OPTION> <OPTION

              value=20>20</OPTION> <OPTION value=21>21</OPTION> <OPTION

              value=22>22</OPTION> <OPTION value=23>23</OPTION> <OPTION

              value=24>24</OPTION>

  <OPTION value=25>25</OPTION>

  <OPTION value=26>26</OPTION> <OPTION value=27>27</OPTION> <OPTION

              value=28>28</OPTION> <OPTION value=29>29</OPTION> <OPTION

              value=30>30</OPTION> <OPTION value=31>31</OPTION> </SELECT>

 

          <SELECT class=formfield name=month>

  <OPTION  selected>- Month -</OPTION>  

              <OPTION value=01>Jan</OPTION> <OPTION value=02>Feb</OPTION>

              <OPTION value=03>Mar</OPTION> <OPTION value=04

              >Apr</OPTION> <OPTION value=05>May</OPTION> <OPTION

              value=06>Jun</OPTION> <OPTION value=07>Jul</OPTION> <OPTION

              value=08>Aug</OPTION> <OPTION value=09>Sep</OPTION> <OPTION

              value=10>Oct</OPTION> <OPTION value=11>Nov</OPTION> <OPTION

              value=12>Dec</OPTION> </SELECT>

          <SELECT class=aws_formfield name=year>

<OPTION  selected>- Year -</OPTION>

            <OPTION value=2006>2006</OPTION>

            <OPTION value=2007>2007</OPTION>

</SELECT>

          <INPUT class=aws_button type=submit value=OK>

</code>

the other two frames are :

name : body , contatins: body.php

name :left  , contains :left.php

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.