Jump to content


This topic is now archived and is closed to further replies.


Javascript help for firefox

Recommended Posts

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() {
    bug = new Image();  
    bug.src = 'http://mywebsite.com/track.php?pg=' + escape(document.title);
<iframe src='showads.html' frameborder='0' width='300' height='50' onFocus='logClick()'></iframe>

This is my track.php file
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 />";
$page = $_GET['pg'];
mysql_query("INSERT INTO stats (page, ip) VALUES ('$page', '$ip')") or die(mysql_error());

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.

Share this post

Link to post
Share on other sites
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]We have 30,227 registered members

Where ?

Share this post

Link to post
Share on other sites
[!--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 ?


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?

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.