Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About GoDxNero

  • Rank
  1. Thanks for your help, this is what I got now. And it seems to workJavascripts function initRanks(){var ranks = document.getElementsByClassName("rank");for(var i = 0; i < ranks.length; i++){ranks[i].innerHTML = i+1;}} Body <table><tr><td class="rank"></td><td></td></tr><tr><td class="rank"></td><td></td></tr><tr><td class="rank"></td><td></td></tr></table>
  2. <html><body><script type="text/javascript">for (i = 1; i <= 3; i++){document.getElementById('rank').innerHTML=+i;}</script><table border="1"><tr><td id="rank"></td><td>name</td></tr><tr><td id="rank"></td><td>name</td></tr><tr><td id="rank"></td><td>name</td></tr></table></body></html>
  3. In this code. The results boxes background are supposed to turn blue or red and alerts when all of the results are 15. This works with fire fox and ie8 but not on ie7 . Can anyone please help me decode this so that it work with ie7? Thanks alots in advance function id(name){/* this is just a shortcut to make the actual code shorter. */return document.getElementById(name)} function val(name){/* another shortcut function */return parseInt(id(name).value)} function updateValues(){id('r1').innerHTML = val('x1') + val('y2') + val('z3');id('r2').innerHTML = val('x1') + val('
  4. But if I put both the contents and the image together in one div it it wont stack >< . Or you mean make div z-index=2 and image z-index=1 ?
  5. Is there a known way to change background width or height ? I want to make a function which detects screen resolution and put them in a variable, then use that variable to change the width and height of my background . Is that possible too ? the body background I mean. Well I think this can be solved if I put another big div to wrap the entire page together and put my main background here, then I can change the width and height of the image I guess. But its not so handy ><. Wanna see if change body background width and height possible first : )
  6. I have seen those command screen.width on javascripts somewhere . Are they useless ?
  7. Well it was a code from Deidre'dad . It contains a function for setCookie and a function for checkCookie. He said it will work but I tried alots and nothings much happend : ( . Do I really need to implant a getCookie function ? if not what is wrong with the code above ?
  8. Yes you got it right away . 100% based on screen resolution and not on browser size . is it possible ?
  9. Do I need "getCookie" too ? I though there are always setCookie , getCookie and checkCookie right ? Please explain me ... I cant find anything more information on w3school .
  10. I have seen how to change background to always 100% depends on your browser size. But its really annoying because it change all the time when you change the size of your browser . So is there a way for background to always be 100% depends on your sreen resolution setting and not the size of your browser? So if I got a background of 1280x960 and a screen resolution of 800x600 the background image will become 800x600. But since it not depend on browser height and width the "100%" command prolly not work. Can I solve this probleem somehow with javascripts ? Like "get screen resolution setting" an
  11. Srry I am such a newbie ... tried countless time but cant seem to be able to solve the probleem on my own. Checked many forums on google but haven't found any answer . Please give me few hints how to solve it
  12. Well I am currently using this java script: function toggle(element) {if (document.getElementById(element).style.display == "none") { document.getElementById(element).style.display = "block"; } else { document.getElementById(element).style.display = "none"; }} How can I make it so that when I start a new function toggle, the previous ones get reset back to invis ? What I mean is that if I got 2+ div ( all vision = invisible ) . Once I click on the first button the first div will appear and when I click the second button the second div will appear together with the first and jus
  13. Btw i just found a good exemplaar so I copied and edit it abit. But a part is not working : <html><head><script>var expDays = 365;var exp = new Date(); var favImage = "";exp.setTime(exp.getTime() + (expDays*24*60*60*1000));function saveImage(form){ var favImage = form.favSelect.value; if ( favImage == "" ) return; SetCookie('image', favImage, exp); getBodyBG( );}function GetCookie(name) { var cookies = document.cookie.split(/; /g); var arg = name + "="; for ( var c = 0; c < cookies.length; ++c ) { var ck = cookies[c]; if ( ck.inde
  14. Just tried this but nothings show up . If I understand correctly the " setCookie ("background", "2", 1); " only create a cookie and give it a name right ? So this code " var background = getCookie("background"); " make that the cookie realise which is my current background or just get the cookie by name ? So if my current background name is Achtergrond01.jpg then " var background = getCookie("background");" var background will be Achtergrond01 . But I didnt give any specifiek name to my backgrounds . I only give the url of my background to onclick events :<img id="bg" src="Afbeeldingen/Bg-
  • Create New...