gingerbraid Posted May 16, 2006 Share Posted May 16, 2006 Hi, I would really appreciate your help on this. I've seen a similar post here, but I still couldn't figure my problem out. I have a page with two nested forms; the inner has a text input field where the user enters an ID and then clicks on a "Preview" button to upload information for that ID from the database onto another section of the form. This upload must take place before hitting "Save" to submit the main form. I have a [rather complex] validation code on form submission. If the validation fails, I want to reload the page at a specific anchor. Problem is, the form jumps to the anchor only when Save is clicked twice. I understand that some kind of refresh needs to be done.Does anyone know how to implement that refresh offhand, or do you need code to illustrate?TIA. Quote Link to comment Share on other sites More sharing options...
gingerbraid Posted May 17, 2006 Author Share Posted May 17, 2006 Anybody???Clarification: What I'm doing is SERVER-SIDE validation code, and I want to reload the form on the client-side at a specific anchor if the validation was unsuccessful.I have partially figured it out: The anchor doesn't work because the form is inside a function in a different class; the main class (which $_SERVER{"PHP_SELF"] refers to) performs validation and then calls a function in another class, which prints the form. Thus, the anchor is not found and, therefore, not redirected. Can anyone suggest a workaround?Much appreciated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.