Jump to content

ferrit91

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ferrit91's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have this so far <script type="text/javascript"><!-- function updatesum() { document.form.sum.value = (document.form.sum1.value) * 1000; } //--></script> <body> <form name="form" > Enter a number: <input name="sum1" onkeydown="updatesum()" /> Their sum is: <input name="sum" readonly style="border:0px;"> </form> </body> But when you put a number in it shows as 0 until you click off. I need it to show as they type
  2. I haven't tried one yet. I'm not sure what it's called.
  3. I want to add a part to my website where the sum shows next to a text field automatically and updates. So if i put 10 in the text field. The sum is to times it by 1,000 and the display would be 10,000. [10] 10,000
  4. <select name="con_what" id="con_what"> <option value="Error/Bug">Error/Bug</option> <option value="Abuse towards Staff">Abuse towards Staff</option> <option value="Porn">Porn</option> <option value="Racism">Racism</option> <option value="Piratcy">Piratcy</option> </select> Messages shown if value is Error/Bug show message An error or bug is when something is not quite right. if value is Abuse towards Staff show message Abuse towards Staff is where another members has said something that was not needed towards a staff member. etc... But i want it to show when they slect it and not when they change page. So it have to change instantly without refreshing the page.
  5. Its ok, i figured it out, for anyone else who is interested in how i did it its like this function seconds($int) { if($int < 3600) { $minutes = $int / 60; $seconds = $int % 60; $minutes = (int)$minutes; $seconds = (int)$seconds; if($minutes < 10) { $minutes = "0$minutes"; } if($seconds < 10) { $seconds = "0$seconds"; } $string = $minutes . "mins " . $seconds . "secs"; } elseif($int > 86400) { $days = $int / 86400 % 7; $hours = $int / 3600 % 24; $minutes = $int % 3600 / 60; $seconds = $int % 3600 % 60; $days = (int)$days; $hours = (int)$hours; $minutes = (int)$minutes; $seconds = (int)$seconds; // if($hours < 10) { $hours = "0" . $hours . ""; } // if($minutes < 10) { $minutes = "0" . $minutes . ""; } if($seconds < 10) { $seconds = "0" . $seconds . ""; } $string = $days . "days " . $hours . "hrs " . $minutes . "mins " . $seconds . "secs"; } else { $hours = $int / 3600; $minutes = $int % 3600 / 60; $seconds = $int % 3600 % 60; $hours = (int)$hours; $minutes = (int)$minutes; $seconds = (int)$seconds; // if($hours < 10) { $hours = "0" . $hours . ""; } // if($minutes < 10) { $minutes = "0" . $minutes . ""; } if($seconds < 10) { $seconds = "0" . $seconds . ""; } $string = $hours . "hrs " . $minutes . "mins " . $seconds . "secs"; } return $string; }
  6. function seconds($int) { if($int < 3600) { $minutes = $int / 60; $seconds = $int % 60; $minutes = (int)$minutes; $seconds = (int)$seconds; if($minutes < 10) { $minutes = "0$minutes"; } if($seconds < 10) { $seconds = "0$seconds"; } $string = $minutes . "mins " . $seconds . "secs"; } else { $hours = $int / 3600; $minutes = $int % 3600 / 60; $seconds = $int % 3600 % 60; $hours = (int)$hours; $minutes = (int)$minutes; $seconds = (int)$seconds; // if($hours < 10) { $hours = "0" . $hours . ""; } // if($minutes < 10) { $minutes = "0" . $minutes . ""; } if($seconds < 10) { $seconds = "0" . $seconds . ""; } $string = $hours . "hrs " . $minutes . "mins " . $seconds . "secs"; } return $string; } I need to add days to the time above, should be easy if you know what you are doing Thanks
  7. Hi, i am starting a site but i only wish to run it in the UK at first then go to more countries. How do i get the location of a user and if the location is not England, Wales, Scotland or Northern Ireland they get diverted to a page that says the site is not open in there country yet.
  8. ok, bare with me because im new, but if the users are saved on a database then add something in to like 'allowed' <? if(fetch allowed == yes){ ?> Page goes here <? }else{ echo"Sorry, you have already completed this page."; } ?> if its not done from a database maybe try adding it in a $_session and do the same but do <? if(!$_session[alowed]){ ?> Page goes here <? }else{ echo"Sorry, you have already completed this page."; } ?>
  9. sorry if title doesnt make sence, but am trying to set something up so that if there is nothing left to insert it insert blank cells. example td shows for every cell read from the database and say there are 7 in the database tr shows after every 5 using php meaning there is a row 3 missing td Picture may help a little i need php to count how many are left to fill until the next 5.
  10. Thanks for your help. This really helped me get it sorted and the site looks sweet.
  11. Hi, Im new to Java and stuff so please bare with me. I am currently looking at a new login for my site and i would like it to work like the one on we7(http://www.we7.com) When you click sign in it basically shows it on top of what you are doing and blacks out the background. Any sites that might help me create on of these would be great. Thanks Mark
×
×
  • 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.