Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In forms, write a message in the same window after submitting

Status
Not open for further replies.

ale77

Programmer
Joined
Jul 18, 2003
Messages
38
Location
US
I have a form. I want the user to see the results in the same window (parent window) and not to send it to a popup window, or new window.
 
The solution to your problems would lie not in how to make the results appear in the same window. Rather what your code is doing to force the results in a new window.

Form results will display in the same window unless explicitly told to do otherwise.
 
specifically check your <form> tag ..

even more specifically check if you are using target=&quot;bla&quot; in your form tag.

Let us know if you are able to work it out from there


Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
Action=&quot;_self&quot;. But it's slow sinceit will repaint the form and the cursor position will go. So one way is below.

Have a hidden text field in the form. When the result is got (computed-say), the sequence

document.<formname>.<fieldname>.hidden=true;
document.<formname>.<fieldname>.value=<MyValue>;

will also do it.

End
 
Thanks for your help. I still can't solve the problem but I think it can be solve by doing something like this:

window.location.href = &quot;page.html?var=&quot;+totalpoints;

I'm still working on it, so I don't know if it will work

Other ideas?????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top