Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #22911

Re: can i paste java script in to a div?

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>
Date 2014-01-31 18:21 +0100
Message-ID <XnsA2C6BAAC3F5A7eejj99@194.109.133.133> (permalink)

Show all headers | View raw


jcharth@gmail.com wrote on 31 jan 2014 in comp.lang.javascript:

> Subject: can i paste java script in to a div?

There is no java script, as java does not have a scripting form.
And if there where it wwould still be off topic on this NG.

Perhaps you mean javascript?

[I leave it to PE to argue that there is  no javascript either.]

> Hello I have a script that grabs a piece of code (widget) from my
> database and I puts the code in the page with  
> 
>  document.getElementById('mdiv').innerHTML = strVALUE;
> 
> but  it does not work. I dont think it can work.

Never use innerHTML for anything else than inserting plain text, unless you 
know EXACTLY what you are doing, and that on all target browsers.

Where is that database located? On the server?

> Is there a way to do this? 

If it is legal javascript, like jason, 
as a string in a variable, 
you can just execute it using eval(codeString);.

Remember that eval is evil, so also here, you are warned.

Do NOT use jquery when you want to discuss such here.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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