xam Posted March 26, 2006 Share Posted March 26, 2006 Hello everyone,I need help to fix my firefox problem with my below code..This is my tracklink.html file[code]<script type="text/javascript">function logClick() { window.focus(); bug = new Image(); bug.src = 'http://mywebsite.com/track.php?pg=' + escape(document.title);}</script><iframe src='showads.html' frameborder='0' width='300' height='50' onFocus='logClick()'></iframe>[/code]This is my track.php file[code]<?mysql_connect("localhost", "root", "mypass") or die(mysql_error());echo "Connected to MySQL<br />";mysql_select_db("stats") or die(mysql_error());echo "Connected to Database<br />";$ip = $_SERVER['REMOTE_ADDR'];$page = $_GET['pg'];mysql_query("INSERT INTO stats (page, ip) VALUES ('$page', '$ip')") or die(mysql_error());mysql_close();?>[/code]When someone click a link on the tracklink.html page, it should send pagename and visitorip to track.php and track.php should send this results to my database.. Everything is work with Internet Explorer, But mozilla cant sent results to track.php.. I tested it with direct link with mozilla e.g.: [code]http://mywebsite.com/track.php?pg=test[/code] It work.. Its %100 javascript error.... I need more stable javascript code to track clicked links.. My regards. Quote Link to comment Share on other sites More sharing options...
xam Posted March 26, 2006 Author Share Posted March 26, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]We have 30,227 registered members[/quote]Where ? Quote Link to comment Share on other sites More sharing options...
redbullmarky Posted March 28, 2006 Share Posted March 28, 2006 [!--quoteo(post=358706:date=Mar 27 2006, 12:54 AM:name=xam)--][div class=\'quotetop\']QUOTE(xam @ Mar 27 2006, 12:54 AM) [snapback]358706[/snapback][/div][div class=\'quotemain\'][!--quotec--]Where ?[/quote]??anyway, open your Javascript Console in FF (tools menu). you may need to clear it as some ads on some sites fill it full of rubbish...try out your site....what errors/warnings come up in the JS Console? 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.