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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

executing javascript from php

Status
Not open for further replies.

fylnc

Technical User
Apr 24, 2002
15
GB
i am writing a script in a frameset to upload files, i then wish to display a link to this file in another frame. it works fine but i cannot automatically refresh the link window to display the new addition, i have attatched an onClick event to the upload/submit button. It works but i have to press the button twice to refresh the window.
Obviously it refreshes the page before it has updated it..
does anybody know how to 'force a button click' or run a 'javascript function' within PHP...

cheers
FYL
 
there is no way to execute javascript from php... perhaps using a javascript setTimeout/window-reload in the frame that need refreshing would work? it is iddicult t understand what you are asking for... do you have an example avvailable? -gerrygerry
Go To
 
what you can do is something like this:

upload the file in one frame, and when you finished just put this code:
<sript language=javascript>
window.document.framename.refresh();
</script>

i hope this work. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
cheers for your help...
it's working...
but other means...
i have simply added a message after the upload to notify the user that their file has been uploaded..then when they press the OK button beneath the message, it simply refreshes the page(in the other page) using your code..
sneaky eh???

Cheers
FYL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top