Tiff
member
Posts: 36
Age: 28
Reg: 07-26-07
|
02-17-08 10:07 AM - Post#37581
Does anyone know how to execute a file (perhaps using js) after the html page has loaded?
Work at home mom of 2 under 2!
|
Edited by Tiff on 02-17-08 03:16 PM. Reason for edit: No reason given.
|
Eburonum
member
Posts: 59
Reg: 02-11-07
|
02-18-08 03:41 PM - Post#37634
In response to Tiff
What do you mean by "execute a file"?
|
Tiff
member
Posts: 36
Age: 28
Reg: 07-26-07
|
02-19-08 08:35 PM - Post#37767
In response to Eburonum
I wanted to call a file after the html page loaded. I ended up getting it to work...after my html page loads I write over the css file so that the source code can't be seen.
Work at home mom of 2 under 2!
|
|
Eburonum
member
Posts: 59
Reg: 02-11-07
|
02-20-08 08:01 AM - Post#37791
In response to Tiff
So you're overwriting the css file after a HTML page loads? When/how do you rewrite the file? I don't think there's a foolproof way to do what you want to do - anyone, for example, could simply browse to your css file and get the code...
|
Tiff
member
Posts: 36
Age: 28
Reg: 07-26-07
|
02-20-08 09:10 AM - Post#37797
In response to Eburonum
When the html file is accessed I have a little php script that writes the styles to the css file. After the page loads I call another php script that writes over the css file with a message saying that the css source is not accessible. I havn't tested it on every browser yet, but it seems to be working...at least enough so that an inexperienced coder can't get to it. So I am not really hiding it...just writing over it. I know people use Java or JS to burry content so that the inexperienced onlooker can't see the code (the obscurity is security method), but I don't have that kind of training.
My method isn't something that would be good for most websites because if you try to use the back button to get the html page the styles are lost...the page has to be refreshed to look right.
I call the php script (start.php) that rewrites my css file using:
<div id=pie></div>
<iframe
onload="document.getElementById('pie').innerHTML=
this.contentDocument.body.innerHTML"
scrolling=no width=100% height=0 frameborder=0 style="visibility:hidden"
src=start.php>
Work at home mom of 2 under 2!
|
Edited by Tiff on 02-20-08 09:24 AM. Reason for edit: No reason given.
|
Eburonum
member
Posts: 59
Reg: 02-11-07
|
02-20-08 10:24 AM - Post#37802
In response to Tiff
Sounds like an interesting idea, and it might indeed work - care to link me to it? :)
|