Waplocus
Graham Plz Graham I've Tried Includin xt:Include in the js math below code plz fix it 4 me. thanks
/* START */
var quotes=new Array()
quotes[0]='<xt:include file="/EXT/Aji1" />'
quotes[1]='<xt:include file="/EXT/Aji2" />'
quotes[2]='<xt:include file="/EXT/Aji3" />'
/* END */
var whichquote=Math.floor(Math.random()*(quotes.length))
document.write(quotes[whichquote])
Copy code
Lordeagle
Waplocus Javascripts slows down page load, why not use
xt random include? Am not with the function code by heart, but google will get you there if u search with the bold phrase above or surf
http://tutorial.graham.yn.lt .
If u must use javascript learn to always end every javascript statement with a semicolon
;, and make sure that the string contained in the files that u wanna include has no single quot
' in it.
Graham
Waplocus It will work but only if the script is on the actual page it will not work from a js file called as a script src as they are not parsed by xtgem they are parsed by the browser
also the quotes must all be on one line in the included files or it breaks the javascript
demo
http://adgj.mw.lt/files/test_1
A random include is
<xt:include file="/folder/*" />
see
http://syntax.xtgem.com/manual/xtgem/default?func=xt_include
random included files can contain anything
Waplocus
Graham Please Explain The <xt:includefile="/random_includes/*" />
Graham
Waplocus you just replace the file name with the
* it then picks a random file from the folder
if you want to use it more than once from the same folder on the same page you just add another variable and value pair to make it re-cache the random value
<xt:include id="whatever" file="/EXT/*" />
Copy code The folder must only contain the files you want to include nothing else
thats it no javascript required
your 'quote' files can even be html pages as the headers are stripped before the file is included
only the body content is used
Waplocus
Graham wot of the index file in the folder, wil it also include it?.
Graham
Waplocus Give the quote files their own extension and use it in the include
ie
<xt:include file="/EXT/*.txt" />
Then it will only include files with that extension
http://adgj.mw.lt/files/test_1 the first include is done this way
Even I did not know you could do this but I just tested it and it works!
Note this does not seem to work with the id="whatever" for multiple use and it makes the include fail But I am looking into it
Waplocus
Waplocus Plz I Want To Pay 4 My Hosting On Xtgem And In Return I Want U Guy To Remve Ads Nd Make PHP To Run On My Site, Wud Dat B Possible?.
Graham
Waplocus At present there is no upgrade system in place
To be honest there was so much fraud it ended up costing us a lot more than the income we got from it