View Full Version : Javascript Problem in PHP?
Strangeplant
08-16-2006, 08:04 PM
I'm using a php password protection scheme for several pages, and one (only this one) has a problem with the screen comming up blank on entering the first time after signing in. The second time, it's ok. It contains two javascript external references, e.g.:
<script language="javascript" src="chainedmenu1.js"></script>
Other protected pages contain embedded javascript, and there is no problem. ALL of the php code is identical. AND, it only happens with FF! When using IE, all of the pages operate correctly (and that's unusual). Has anyone else encountered anything like this?
WestCoast
08-16-2006, 08:25 PM
hi, i cant help you but can i have the script?
WestCoast, try http://www.twey.co.uk/?q=loginscript. It requires PHP and MySQL.
Strangeplant, can you provide a demo?
Strangeplant
08-21-2006, 01:43 PM
Thinking about this again, I can see how logic has failed me: I'm a scientist, not a real programmer, and using observations and the implied constraints on cause and effect have gotten me into numerous dead ends.
I found the problem and corrected the error, finally. I was deceived by known error paths and my prediction of their causes based on browser performance. I'll know better than to believe in apparent 'evidence' next time.
Programming is a performance art.
I'm a scientist, not a real programmer, and using observations and the implied constraints on cause and effect have gotten me into numerous dead ends.What, you expect computers to be logical or something?
Both Javascript and PHP are filled with little surprises for the novice programmer. :)
alexjewell
08-21-2006, 07:35 PM
Simpler login script, may work easier?
$username = "admin";
$password = "testing";
$self = "testing.php";
if ($_POST['username'] != $username || $_POST['password'] != $password) {
echo
// FORM HERE, two fields: username and password
;
else {
echo
// PASSWORD PROTECTED INFORMATION HERE
;}
}
It doesn't require javascript, which is a plus...
I dunno
If anyone wants it.
mburt
08-21-2006, 07:37 PM
I'm a scientist, not a real programmer, and using observations and the implied constraints on cause and effect have gotten me into numerous dead ends.
All coding in general doesn't make assumptions like a human would. You have to define everything that you could use in a script.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.