Jump to content

Weird problem.


Andy11548

Recommended Posts

Right, I have a script that if I have;

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

 

that part in my site, the script doesn't work. If I remove it, it does.

 

$(document).ready(function() {
  $('#feedback').load('check.php').show();

  $('#username_input').keyup(function() {
    $.post('check.php', { username: form.username.value },
    function(result) {
      $('#feedback').html(result).show();
    });
  });
});

 

If anyone knows why, it would be a great help.

 

 

Thanks,

Andy.

 

Link to comment
https://forums.phpfreaks.com/topic/241397-weird-problem/
Share on other sites

Nope, it's on my localhost.

 

All my other JS works, its just this one that doesn't and it's really confusing me, I really don't see why adding the doctype would stop the script working :S.

 

I got teamviewer if that'd do?

 

Thanks,

Andy.

Link to comment
https://forums.phpfreaks.com/topic/241397-weird-problem/#findComment-1240084
Share on other sites

you can try to put the browser to "quirks" mode, while still maintaining the reminder of the level of XHTML you are writing..try writing the doctype like this

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> //remove URL

 

Yes, and then screw up his box model and all block elements on the page....

 

@OP - have you tried running it with Firebug?  Have you tried just a simple HTML 5 doctype:

 

<!doctype html>

 

?

Link to comment
https://forums.phpfreaks.com/topic/241397-weird-problem/#findComment-1240155
Share on other sites

Nevermind, I give up with this,

 

I do have a lazy mind when I've been writing code for hours, so I'm starting from fresh again, making sure I take my time and type everything correctly, run everything through validation before I continue and yeah.

 

I'll see if I get this problem still once I've compleatly re-wrote my pages.

 

Thanks for the help,

Andy.

Link to comment
https://forums.phpfreaks.com/topic/241397-weird-problem/#findComment-1240401
Share on other sites

Archived

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

×
×
  • Create New...

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.