🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #39644

Dynamiczne ładowanie skryptów

#39644
From: c97
Date: Tue, 25 Apr 2006 11:01
20 lines
1329 bytes
Jak dynamicznie za pomocą JS załadować skrypt zewnetrzyny?

ponizszy skrypt nie dziala

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function dupa(){
    document.innerhtml='<script language="javascript" type="text/javascript" 
src="dupa.js"></script>';
}
</SCRIPT>
<input value="kliknij mnie" type="Button" onclick="dupa();">

--- dupa.js ---

alert('aaa');

--- koniec ---


C
Technical Details
Message-ID: <e2kvij$ffq$1@pippin.nask.net.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!not-for-mail
From: "c97" <nie.podam@bo.dostaje.za.duzo.spamu.pl>
Newsgroups: pl.comp.lang.javascript
Subject: Dynamiczne ładowanie skryptów
Date: Tue, 25 Apr 2006 13:01:09 +0200
Organization: NASK - www.nask.pl
Lines: 22
Message-ID: <e2kvij$ffq$1@pippin.nask.net.pl>
NNTP-Posting-Host: x.sejm.gov.pl
X-Trace: pippin.nask.net.pl 1145962900 15866 195.187.136.2 (25 Apr 2006 11:01:40 GMT)
X-Complaints-To: usenet at nask pl
NNTP-Posting-Date: Tue, 25 Apr 2006 11:01:40 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-Priority: 3
X-MSMail-Priority: Normal
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit