Re: Reload all included javascript src



Thanks,
but I think I will re-write it to ajax, as it will take less time for
me to do it like that.


Randy Webb je napisao/la:
Hrvoje Vencl said the following on 5/19/2007 8:07 AM:
Hi Randy,

Umm, hi.

can you write here a simple script that would do that job?

To do what job? Quote what you are replying to so people know what you
are referring to.

In that called script I only use:

document.write('some html code here');

Executing that script one time after the page loads would be the limit.
After the page loads, if you document.write to the page then it replaces
the current page. So, the only thing that would be in your page is the
html in the string you wrote. If you want to be able to continuously
execute the script without destroying the current page you need to use
something like DynWrite from the FAQ. Then, wrap it in a function and
simply call the function, end of problems. No need to try to keep
"reloading all included script files".

Just to answer the question, search the archives for loadJSFile and you
can find many different variations of a function that will load .js
files on the fly. You would simply have to loop through the script tags,
pick up the src attribute, and loadJSFile load the file again.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

.



Relevant Pages

  • Re: Reload all included javascript src
    ... After the page loads, if you document.write to the page then it replaces the current page. ... If you want to be able to continuously execute the script without destroying the current page you need to use something like DynWrite from the FAQ. ... You would simply have to loop through the script tags, pick up the src attribute, and loadJSFile load the file again. ...
    (comp.lang.javascript)
  • Re: Load hid.o module synchronously?
    ... > This loads the module and exits immediately, ... before the USB keyboard is probed and ready. ... > keyboard is either found or not found) before my script continues. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Easy Frames Question
    ... Take your javascript out of the function. ... > had success using RegisterStartupScript to get the script rendered to the ... > When the page first loads, and then the user clicks on btnReloadMenu, then ... What I need to know is how to execute the client-side script ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Easy Frames Question
    ... Take your javascript out of the function. ... > had success using RegisterStartupScript to get the script rendered to the ... > When the page first loads, and then the user clicks on btnReloadMenu, then ... What I need to know is how to execute the client-side script ...
    (microsoft.public.dotnet.framework.aspnet)
  • Jumpstart: syntax error and trying to load from /cdrom media, which disk to use for Solaris 8 image
    ... I'm not sure if I need to use that disk or the Solaris 8 Installation ... Using RPC Bootparams for network configuration information. ... Using finish script: diag_drv.fin ... Executing JumpStart preinstall phase... ...
    (SunManagers)