Weborum Webmaster Forum > Javascript delayed refresh
Help - Search - Members - Calendar
Full Version: Javascript delayed refresh
Weborum Webmaster Forum > Web Page Design > Javascript
sjthomas
OK I'm guessing this going to be an easy one for anyone even remotely skilled in Javascript which, I'm afraid, I am not. I'm running a web app across frames, problem is that when I submit the form on one frame, which points to another, it doesn't refresh the frame containing the form, if you get me. The problem here is that said form contains dynamically produced form elements that change depending on what the user entered.

And the last thing is that when the form is submitted certain variables are sent to an external java program using the passthru method, this means that PHP is basically stalled until it gets the response so ideally I would want to put a delay on the refresh of around five seconds (the wait could theorhetically be this long on a slow machine with alot of data) and some form of notification telling the user to wait for a few seconds.

Can someone point me in the right direction, as I've said before Javascript really isn't my strong point! cigar.gif

Added:
Actually I've discovered another little problem, this time with FireFox. Basically FF isn't updating either of the frames. I think the problem may be that the main frame which does all the processing actually outputs an SVG image which I think may be getting cached. The actually processing functions are working fine as I can see that the database is being updated correctly. This problem doesn't occur in IE as it updates the SVG on submission. Any ideas?
CBrown
CODE
setTimeout("window.location.reload()", milliseconds;


change milliseconds to a number... haven't tried it, but should work.
sjthomas
Wow managed to completely miss this thread lol.
Err I'm goign to seem really stupid here but how exactly whould I use that. Say I've got a simple form like
CODE

<form action="mainframe.php" method="post" name="add_nodes" target="mainFrame">
<input name="name" type="text" /><br />
<input name="Add" type="submit" value="Add" />
</form>


How would I use that code with the HTML? At this stage I feel the need to point out that I am USELESS with Javascript! smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.