Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #23025
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: can i paste java script in to a div? |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <7e9fdcbf-198d-4e10-96e8-42e8eff38ab7@googlegroups.com> <faa2eba7-8ab5-42c0-88ee-5c415f26ef88@googlegroups.com> <52ebec9e$0$6657$9b4e6d93@newsspool2.arcor-online.net> <52ebecf1$0$6657$9b4e6d93@newsspool2.arcor-online.net> <85e0a365-f772-41dc-9c37-ffbca91a18b7@googlegroups.com> |
| Date | 2014-02-07 21:10 +0100 |
| Message-ID | <XnsA2CDD76127B3Ceejj99@194.109.133.133> (permalink) |
jcharth@gmail.com wrote on 07 feb 2014 in comp.lang.javascript:
> Re: can i paste java script
There is no java script, as java has no scripting version.
According to PE there also is no javascript,
but you can ignore that in the context of your Q.
Javascript, the language, cannot be executed,
javascript script, the command script, can.
> I was trying to fetch the javascript code from a page and then put it
> to work inside a dive. Looks like the better approach read the code from
> the page and use docuemnt.write to make it execute. But not luck yet.
Once a page is finished/loaded,
you should not use document.write() [unless you want the following],
because it generates an implicit document.open()
and the page will be rewritten from scratch,
overwriting everything that existed on that
INCLUDING any Javascript <script> elements on that page.
Once a page is finished/loaded,
you should manipulate the DOM to add/change/delete something.
Once a page is finished/loaded,
you cannot let javascript "work inside a div",
you can with javascript script change what is inside a DOM-element
that has a "div" tagname.
However, during the loading of a page,
you can use a html-stream like this:
<div>
<script type='text/javascript'>
document.write('jcharth@gmail.com');
</script>
</div>
I do not understand what you mean by "fetch the javascript code",
and what is a "dive" other than a way of jumping into the deep?
Please use a decent signature on Usenet.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
can i paste java script in to a div? jcharth@gmail.com - 2014-01-31 08:54 -0800
Re: can i paste java script in to a div? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-31 18:21 +0100
Re: can i paste java script in to a div? jcharth@gmail.com - 2014-01-31 10:25 -0800
Re: can i paste java script in to a div? Christoph Michael Becker <cmbecker69@arcor.de> - 2014-01-31 19:34 +0100
Re: can i paste java script in to a div? Christoph Michael Becker <cmbecker69@arcor.de> - 2014-01-31 19:35 +0100
Re: can i paste java script in to a div? jcharth@gmail.com - 2014-02-07 08:03 -0800
Re: can i paste java script in to a div? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-07 21:10 +0100
csiph-web