Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.