Scott Posted November 2, 2011 Share Posted November 2, 2011 I'm messing around with different ideas for showing photos etc and something has really stumped me. I can go to a website and view pictures of cars for sale (I won't name it, just using it as an example). The site uses the exact same bit of code that I'm looking to implement yet when I do so I get asked if I want to run scripts or activex etc. Now, this website is definitely running scripts. I thought I would check the code out to see if something clever was put into it to bypass the checks or something but I found nothing. The REALLY strange thing is that if I save the index of the forum and open it, it works fine. If I then open the page in notepad, don't touch a thing, then re-save it with a different name.... I then get the scripts warning when I try to open it. Is there a file signature or something like that? I'm finding it really strange that opening a file and saving it in a different location would make any difference to how it operates. At first I tried it with wordpad, so I assumed some formatting must have remained or something. Notepad retains nothing that I know of though? It's not really much of an issue, just more of a curiosity than anything. I know very very little about web development so thought I would ask on here as I know a few of you guys are into it as a hobby/living etc. Thanks Quote Link to comment Share on other sites More sharing options...
SupraShaun Posted November 2, 2011 Share Posted November 2, 2011 Are you saving the file in a different directory than the original and are you loading in any external files? Quote Link to comment Share on other sites More sharing options...
Scott Posted November 2, 2011 Author Share Posted November 2, 2011 I just tried another little test. I held in control and dragged the file into space creating a copy. When I try to run the copy it doesnt work. If I re-name the original it works fine, if I name the copy the same name as the original it still doesn't work. Very strange, I'd love to know why this is. Quote Link to comment Share on other sites More sharing options...
Scott Posted November 2, 2011 Author Share Posted November 2, 2011 Are you saving the file in a different directory than the original and are you loading in any external files? Loading in a couple of js files but they are in the same directory, everything is the same. Quote Link to comment Share on other sites More sharing options...
SupraShaun Posted November 2, 2011 Share Posted November 2, 2011 How are the js files being loaded? Quote Link to comment Share on other sites More sharing options...
Scott Posted November 2, 2011 Author Share Posted November 2, 2011 They aren't being loaded, it's before anything even happens. I'll try to explain it better. I downloaded an index.htm file to my empty desktop. When I double click on the index.htm it opens the offline page without the images etc etc. I then copy that file to the same location (empty desktop other than original file) using the drag and drop method while holding CTRL. I then open up index - copy.htm and immediately I get prompted to click to allow scripts & activex etc. If I rename index.htm to indexbiscuits.htm it still works without any prompt. If I rename index-copy.htm to index.htm it still gives the prompt. Comparing the 2 files they are identical. Comparing the contents of both files they are also identical. Hope that's a little better Quote Link to comment Share on other sites More sharing options...
SupraShaun Posted November 2, 2011 Share Posted November 2, 2011 Can you paste the code that is loading the js files? Quote Link to comment Share on other sites More sharing options...
SupraShaun Posted November 2, 2011 Share Posted November 2, 2011 Or send me the file if you want Quote Link to comment Share on other sites More sharing options...
Scott Posted November 2, 2011 Author Share Posted November 2, 2011 It's ok bud, I think I've got it. It seems that the file offline brings up the error, downloading it from being online it works fine (even though it's opened offline). If I then make a copy it doesn't work, but if I upload it and then try it... it works fine. As I said, it's not the code. It was before any code was even running, the pre-warning to code being ran Quote Link to comment Share on other sites More sharing options...
Angarak Posted November 2, 2011 Share Posted November 2, 2011 Are you using Internet Explorer and therefore possibly viewing the offline files under a different 'security zone' setting than online files (hence prompts for executing scripts in local files)? Quote Link to comment Share on other sites More sharing options...
Scott Posted November 3, 2011 Author Share Posted November 3, 2011 Are you using Internet Explorer and therefore possibly viewing the offline files under a different 'security zone' setting than online files (hence prompts for executing scripts in local files)? Yeah I am, that could possibly explain it but the strange thing is that the original download of the index.htm that I checked works fine in offline. It's only new copies of it that throw up the security warning. As I said, I can change it's name and location and it still works, if I make a copy of it (eg if I was to email it) it doesn't work though. Might be yet ANOTHER security flaw for M$, not sure as it's not my area lol. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.