Jump to content

Petty_Crim

Members
  • Posts

    82
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Petty_Crim's Achievements

Member

Member (2/5)

0

Reputation

  1. Ok the answer is IE doesn't work properly with onchange events. You have to use onclick which will work good in both Firefox and IE.
  2. I've made a form which now works perfectly in both FireFox and Internet Explorer except for one catch. When using Internet Xxplorer if I tick/untick a checkbox or radio button nothing happens until I click my mouse button again this is despite the checkbox/radio button using an onchange event. In Firefox as soon I untick or tick it something happens instantly but with Internet explorer once I change it I have to then click once more with the mouse somewhere on the page for something to happen. Does anyone know why this is happening? It only seems to be affecting checkboxs and radio buttons, onchange events for text boxes happen instantly strangely. The page is located here: http://btk.tfcph.com/x/signup.php?id=200
  3. Ok i have set it to: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Is that ok for XML?
  4. That validate thing says "This page is not Valid (no Doctype found)!" Anyone know what doc type I should use also how do you know what one to use?
  5. I am not using any doctype/mime-type if that makes sense. I don't have the line that says the doc type / mime-type cause I am using php. I've never bothered with that stuff does it make a difference?
  6. The link to it is here: (any id num works) http://www.btk.tfcph.com/x/signup.php?id=100
  7. I am getting this weird error with Internet explorer when I try viewing my php page. The page works 100% fine in Firefox but IE doesn't like it oddly. The page itself does not use any XML that I know of so I have no idea why I get this error. The IE debugger says the following: xml documents cannot contain multiple root level documents I am using php include in the page could this be the problem? I am also adding a link to a css file and a js file at the end of the page outside of the php. The page doesn't seem to be loading the javascript or css files so I am thinking it might be something to do with their positioning, it works fine in Firefox but IE doesn't seem to load them at all. This is how my page is setup: <?php include 'content.php'; ?> <script src="js_file.js"></script> <link rel="stylesheet" type="text/css" href="css_file.css" />
  8. Okay I solved it using this: (function(i) { var u = i; document.getElementById(text_button).onclick= function() { ajaxFunction(u, 0, position_count)}; })(i); It seems when you place a function in a loop using the value thats getting incremented it waits and then inputs the last value of the number being incremented in this case 10.
  9. Anyone know? My loop is outputting 1-9 for the button names, but for some reason when it comes to the function it just slams in a big 10.
  10. I've got this loop which seems to behaving badly for some reason rather then going +1 it instantly jams the figure 10 into my function parameter. I've placed a # in front of the the parameter: (position_count==9) for (i=1; i<=position_count; i++) { text_button="position_button"+i; if (i==position_num) { document.getElementById("status"+position_num).innerHTML="<font color='red'><i><center>FREE</center></i></font>"; document.getElementById(text_button).value='Apply'; document.getElementById(text_button).onclick= function () {ajaxFunction(#i, 0, position_count)}; } else { document.getElementById("i"+i).innerHTML=i; document.getElementById(text_button).value=i; document.getElementById(text_button).style.visibility='visible'; document.getElementById(text_button).onclick= function () {ajaxFunction(#i, 0, position_count)}; } } It should output 1-9 in that parameter but it goes straight to 10.
  11. I solved it you have to use: document.getElementById(text_button).onclick= function() {ajaxFunction(i, 1, position_count)};
  12. No worries, but you should remember this. Its almost impossible to copyright html or javascript and pretty much everyone borrows from everyone on the internet. Unless you save a website to file and then use it on your own with exactly the same images and everything you don't need to worry about copyright when it comes to html/javascript. In regards to your thing if its in house and your not some massive company and the code isn't copied line by line then you should be fine, its hard to prove you own a particular bit of code when theres millions of websites that use that bit of code lol.
  13. I'm getting this odd error 'Too much recursion' when I run my script. From googling it appears it occurs when you try to call a function inside another function. The error in firefox points to this line, which is inside the function 'ajaxFunction': document.getElementById(text_button).onclick= ajaxFunction(i, 1, position_count); I take that line is calling a function rather then setting onclick to a function? If this is the case how do i set onclick to a function?
  14. If you sell it then you can't use it, but if you use it in house and aren't selling then its ok.
  15. The code looks fine, I can't see anything wrong with it. There are some differences between firefox and ie but I use similar code to you in both and it works for me. So I'm not sure it could be something minor.
×
×
  • 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.