Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-30-2006, 10:48 PM #1
- Join Date
- Nov 2006
- Thanked 0 Times in 0 Posts
submitting form in iframe from main page not working right
You can see there is an alert to display the contents of notes_1 on the form submit within the IFrame. There is also an alert at the end of the IFrame page to show the contents of note_1 upon load. If I change the contents of notes_1 and press the submit button in the IFrame, the first alert will show me the current content of notes_1 (the changed value). Upon reloading, the alert shows the contents of notes_1 to be the original value from the db because I'm not actually saving changes yet.
You see that all the Save link does on the main page is click the same submit button I pushed manually above. But when I do this the alert shows me the OLD value of notes_1 before I typed in something else. The alert on the bottom of the IFrame page happens showing that the page has reloaded, but IT DOESN'T REFRESH THE IFRAME. The IFrame continues to show what I typed into the field before pressing the Save link.
Two things I do not understand: 1) Why does posting from the main page give me an alert with the old value? and 2) why does the IFrame not refresh upon the post? The post was successful but the IFrame doesn't show so.
This is HTTPS if that makes any difference.
<!-- This is the main doc snippet -->
<legend> Emergency Contacts <a href="#" onclick="SaveEmergencyContacts(); return false;">[Save]</a> </legend>
<iframe SRC="EmergencyContacts.php" name="ECIframe" id="ECIframe" width="622" height="210" frameborder="0"></iframe>
<!-- This is the IFrame snippet -->
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form action="EmergencyContacts.php" method="post" name="ECForm" id="ECForm"
<input type"text" name="notes_1" id="notes_1" value="This is a test">
<input type="submit" name="test" id="test" value="Click Me">
12-02-2006, 11:07 AM #2
- Join Date
- Oct 2003
- on a ship
- Thanked 6 Times in 5 Posts
I make no attempt at pretending like I'm a professional. I offer help with what knowledge I do have.