this will lessen if not totally resolve those codes conflicting issues..
[color=red][b]tricks number 1: good for those who have multiple ONLOAD function[/b][/color]
this is the oldest compiling tricks made by Archer
this will guarantee to resolve [b]ONLOAD CONFLICT[/b]
[quote]var css = document.createElement("link");
css.type = "text/css";
css.rel = "stylesheet";css.href = "CSS HERE";
css.media = "screen, print";document.getElementsByTagName("head")[0].appendChild(css);
scriptFolder = 'ROOT FOLDER URL HERE'
scripts = new Array()
scripts[0] = 'loader.js'
scripts[1] = 'tracker.js'
scripts[2] = 'scrollsubnav.js'
scripts[3] = 'scrollphoto.js'
scripts[4] = 'reposition.js'
scripts[5] = 'addbox.js'
for(x in scripts){
myscripts = document.createElement('script')
myscripts.src = scriptFolder+scripts[x]
document.getElementsByTagName('head')[0].appendChild(myscripts)}[/quote]
[b]if u guys are using the oldest loader script (IE) made by archer
like the one i posted here in other topic no need to use CSS inject...[/b]
eg: page with dual onload codes...
again my sample is using IE loader Script...
http://profiles.friendster.com/64508247
[b]==================== [/b]
[color=red][b]tricks number 2: [/b][/color]
[b]author:[/b] [color=red][b]ARCHER [/b][/color]
[color=red]save ur work as [b].txt/ swf[/b][/color][quote][color=red][b]rootFolder[/b][/color] = '
http://www.myhost.com/myfolder/myfiles/'
mycss = document.createElement('link')
mycss.rel='styleSheet'
mycss.href=rootFolder+'css[color=red].[b]css' [/b][/color]
navBg.appendChild(mycss)
var sCount
var myscripts = new Array()
myscripts[0] = 'myEnterPage[color=red][b].js' [/b][/color]
myscripts[1] = 'myTracker[color=red].[b]js' [/b][/color]
myscripts[2] = 'myWhateverDohicky[color=red].[b]js' [/b][/color]
for(sCount in myscripts){
a=document.createElement('script')
a.src=rootFolder+myscripts[sCount]
navBg.appendChild(a)
}[/quote]
[color=indigo][b]rootFolder[/b][/color] = name of main folder wher u upload ur css and js
pls [b]use one folder name [/b]for all of ur files
[color=indigo][b]css and js[/b][/color] part= name of ur file ... u dont need to put the complete url
if u need more slot for js just [color=indigo][b]add [/b][/color]
eg:
myscripts[3] = [color=indigo][b]'extra.js' [/b][/color]
if u got[color=indigo] [b]none [/b]or juz [b]one js[/b][/color] remove the excess or better yet just leave the js part blank
eg:
myscripts[2] = [color=indigo][b]' ' [/b][/color]
[b]arrange the myscript according to ur liking ..[/b]
[color=indigo][b]decide w/c script u want to load first.[/b][/color] and insert it into [b][0][/b] ....
[img]http://img245.imageshack.us/img245/8011/compilemz7.png[/img]
[b]==================== [/b]
[color=red][b]tricks number 3: multiple css [/b][/color]
<">same explanation as mentioned above
[color=red]============
[b]tricks number 4...
author angell[/b][/color]
[quote]var script = document.createElement("script");
script.type = "text/javascript";script.src = [color=red]"complete js url here";[/color]
document.getElementsByTagName("head")[0].appendChild(script);
var css = document.createElement("link");
css.type = "text/css";
css.rel = "stylesheet";css.href = "[color=red]complete css url here[/color]";
css.media = "screen, print";document.getElementsByTagName("head")[0].appendChild(css);[/quote]
[b][color=red]save this as txt or swf and use the linker.. as final step..[/color][/b]
hapi tweaking
Last edited by switpotato (2008-03-18 12:54:39)