Jump to content

Euphorius

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by Euphorius

  1. Thanks man, seem the problem is with css but i was looking for ours and cannot realize whats wrong. Here is the code

    html {background-color:#00FF00; font-size:12px; margin:0; padding:0;}body {margin:0; padding:0;}ul,li {padding:0; margin:0; list-style-type: none; font-size:20px;}li {border-right:1px solid white; float:left; padding:4px; width:40px; text-align:center;}a {text-decoration:none;}#login {padding:0; margin:0; position:relative; }#menu {padding:3px; position:absolute; left:190px; margin:0; height:30px; width:966px; border-bottom:1px solid black; border-radius:3px;}#container {padding:0; margin:0; position:absolute; top:37px; left:192px; width:968px; height:700px; background-color:white;}#info {padding:0px; margin:0px; position:relative; float:right; background-color:green; width:200px; height:700px; border-left:1px solid black;}

  2. hello guys, i have this code

    <html> <head> <title>Page 1</title> <meta></> <link rel="stylesheet" type="text/css" href="style.css"> </head><body> <div id="menu"> <form> Ime: <input type="text" name="name"> Parola: <input type="password" name="password"> </form> <ul> <li><a href="index.html">Home</a></li> <li><a href="index.html">Home</a></li> <li><a href="index.html">Home</a></li> <li><a href="index.html">Home</a></li> <li style="border:0;"><a href="index.html">Home</a></li> </ul></div><div id="container"> <div id="info"> <p>asd</p> </div><p>1</p></div></body></html>

     

    so when i open in firefox the <ul> dissapear because of <form>, i tryed to put <form> outside <div id="menu"> but still the same. Also i've put <form> in his own div.

    Any ideas ?

  3. Confirm returns true if they clicked the OK button, or else it returns false. You can use that to decide what you want to do. var again = confirm('try again?');if (again){...}
    you meanvar conf=confirm("Gratz you've entered the right number, would you like another try ?");var x=document.getElementById("test").value;if (a==x){if (conf==true){location.reload(true);}else{window.close();} Just to remove ==true ?i've tryed but even if (a!=x) the confirm box appears... both ways
  4. Thanks for the answer.But the way i want it to be is a bit more complicated, something like that ->a=Math.floor((Math.random())*100+1);function test1(){document.getElementById("Random number").innerHTML=a;var x=document.getElementById("test").value;if (a==x) { confirm("Gratz, you've entered the right number"); } else if (a<x) { document.getElementById("result").innerHTML="Try lower number"; }else { document.getElementById("result").innerHTML="Try higher number"; }}my goal is when 'a==x' and the confirm box appear if you press ok, the program will generate another number (if possible, if not... refresh the page ), if you press cancel, the program will exit the page and i dont know how to do it. In the attached file it works but when you enter a number even if 'a' is not equal to 'x' the program pop up this confirm box and do nothing after that.Also i've put the random method as global, because if it is inside the function every time you press Submit, it will generate new number. Correct me if im wrong. :)

  5. Hello, im beginner in to programming and i need an advice. I'm almost sure the problem is in the nested (second) if and i dont know how to solve it. The goal of it is when the user recognize the number to be asked with confirm, if he need another number for recognizing or quit the page or window. The way i wrote the code it aways show the confirm box when i press the submit button.Thanks.

    jsStuding.html

×
×
  • Create New...