Jump to content

Fire Dragon

Members
  • Posts

    159
  • Joined

  • Last visited

Everything posted by Fire Dragon

  1. Thanks.I needed just this code.And thanks for blank code.I was searched this before.
  2. I have problem with my site's new layout.It contains three frames.1.Main window2.left navigation frame3.up navigation frameWell,I set simple link bar to up frame what contains three links.Index,Guestbook and Forum.I set target to Index and Guestbook,so them open in main window(or frame)that's okay.But forum link.I don't put target because I want it don't open in main frame.Now when I click Forum link, up frame disappears but left frame no.Why?And how I can fix this?I guess I can give "nickname" to my index page what vcontains all those frames but how?I understand how give name to frames because it happens in this line: <frame src="up.html" name="up" scrolling=no> But how set name to index what isn't frame?Using title tag?Thanks for help.This is really problem.
  3. Thanks.Post was very teaching.However can't figure how call PHP code when user presses Submit button.Maybe easisest thing what you can imagine but...
  4. Fire Dragon

    Submit

    Hi!I want create simple feedback form to my website what sends input field's text to my e-mail.W3schools have example for this but it haves something what I don't want.When you write something to field and you press Submit (or send what it is in that example) appears Outlook Express window where reads text field's information.Finally you must send message using Outlook Express.Is it possible that user only clicks button,and it sends mail to my e-mail?Thanks for help.
  5. Thanks.Lookes like my lsit don't have enought options. About that last what uses size attribute.I knew it before but it isn't really dropdown anymore,is it?
  6. I foud some time ago dropdown engine,and I used it.However I now have problem and I don't have experience with dropdown boxes.Problem is that my list is grow long,but box don't add scrollbar to it's right side.How I can set it so?Here is my code.I tried different things but nothing happened. <html><head></head><body><form><select onChange="location=this.options[this.selectedIndex].value;" style="font-family:'Arial';color:#000000;background-color:#FFCC66;font-size:10pt;"><option value="page1.html">Page1</option><option value="page2.html">Page2</option><option value="page3.html">Page3</option><option value="page4.html">Page4</option><option value="page5.html">Page5</option><option value="page6.html">Page6</option><option value="page7.html">Page7</option><option </select></form></body></html> Sadly...I don't remember where engine is,but I can try find it if needed.Thank you for help.
  7. I have problem with confirm box what I should use on my textbased game.There is question and you can say OK or Cancel.My problem is,that if you answer "OK",you should continue to next alert example.And then continue to next and next...But if you answer "Cancel",you must get different alert and then program must direct you to new URL.However,now program gives after Cancel message my OK answer's continue messages,what I write outside confirm box's code,and after those messages it directes you to new URL.Sounds confusing,so here is my code: <script type="text/javascript">function gameover(){window.location="http://www.geocities.com/zelda_life/game_over.html"}alert("It is dark night.")var lahdetko=confirm("Would you go to out?")if (lahdetko==true){alert("Outside is cold,but it feels good.")}else{alert("Huge boulder crashed your house,and you die.")gameover()}var nimi=prompt("What's your name?Asks stranger.","")if (nimi!=null && nimi!=""){alert("" + nimi + "...Interesting...")}</script> Like you can see,I tried function,but it gives same problem than just writing location after "Cancel alert".What I should to do,that it won't transfer player to prompt after "Cancel alert"?I know that I can write all alerts inside confirm,but my code probably have many many confirms and others,so I would like to write other code outside confirm.Thanks.I don't know do you understand anything,but I hope so!
  8. Why IE reacts so slow when user presses button?I have JS code what shows field what have value.If you press button,it increases that value.In Fire Fox value grows always when you press button.But in IE value grows much slower.What causes this,and can I do something about it,because my game program needs fast clicking,and I think it can cause problems for IE users Thanks.
  9. Yes,I know it has many things,what I can improve,but I'm still actually very new with JS.I knew most of those shortcuts before,but I am used to use longer clips. Interval was new to me.Thanks for it!
  10. I planned battle system for my text based game,and it works quite well.However,I got problem with timing.I set timing like w3schools' example shows,but it won't stop my system.I can't figure why Before I post code,here is some information,how code works,and what I want it do.Well,player must raise "power level" using button "Raise power" button.When player haves enought power,he/she can attack using "attack" button,what takes same value HP from enemy than power's value is.Enemy always waits 5 seconds,and attacks.Attack may cause 10 or 20 HP.If you lose your HP,code directes you to Google What is problem then?Well,if enemy's HP is 0 or under,I want it stops timing what cycles function what attacks to player.However,I can't get it work.After HP is under 0,function continues attacking.I used same kind code what is in W3schools' example.And finally,here is my code: <html><head><script>var player_HP=100;var power=0;var enemyHP=100;/*****************************ENEMY ATTACK********************************/function enemyattack(){var enemyattack=Math.floor(Math.random()*10);var time if (enemyHP==0 || enemyHP<0) { clearTimeout(time) alert("You win!") } if (enemyattack<5&&enemyattack>1) { player_HP=player_HP-10; document.getElementById('player_HP').value=player_HP; } else if (player_HP==0 || player_HP==-10 || player_HP==-20){ window.location="http://www.google.com" document.getElementById('player_HP').value=player_HP;} else { player_HP=player_HP-20; document.getElementById('player_HP').value=player_HP; } time=setTimeout("enemyattack()",5000) }/******************************PLAYER ATTACK***************************/function attack(){enemyHP = enemyHP - power;document.getElementById('attack').value=enemyHP;power = power - power;document.getElementById('powerlevel').value=power;}function powerup(){power=power+1document.getElementById('powerlevel').value=power;}</script><body><input type="button" value="Start!" onclick="enemyattack()" /><p>HP <input type="input" value="100" id="player_HP" /></p><p>Enemy HP <input type="input" value="100" id="attack" /></p><p>Power level <input type="input" value="0" id="powerlevel" /></p><input type="button" value="Attack!" onclick="attack()" /><input type="button" value="Raise power" onclick="powerup()" /></body></html> Thank you very much,if you can help me with this problem.It makes me crazy
  11. You are right.It may take very long Hmm,I actually don't know anything about PHP or ASP,but I think,that it would be possible create program,what automatically sends that e-mail.First team writes example 30 different tips.One for each day of month.Then,program sends them to users automatically at day.Then team can have much time find new useful tips.Sorry,if this is bad or impossible idea
  12. Yep.I understood what Pollux posted,but Scott100's code was little confusing Thanks anyway.
  13. Okay,I tried find example for this kind code,but after I searched half or one hour,I decided only ask it here.So,this may be stupid question,but how I can plus variable to another variable?Like this: <script type="text/javascript">var number1=100;var number2=100;function increase(){ number1 + number2 document.getElementById('number').value=number2;}</script></head><body><input type="button" value="Increase" onclick="increase()" /><p>Variable: <input type="input" value="0" id="number" /></p> I thought that you can only create number1 + number2 kind code,but looks like it won't work.I also want it show in input field.Now,when I tested it,field shows only "100",when I want it shows "200".That because 100 + 100=200Thanks for help!I really appreciate it,because I need this kind code for my script.
  14. Thanks.It finally works like I want.
  15. Like usual,I can't get it work right now Here is my code: <script>var value2=100;function decrease(){ var value=Math.floor(Math.random()*10); alert("Random number is "+value); if (value<5) { value2=value2-10; document.getElementById('val2').value=value2; } else if (value2<=0) { window.location("http://www.google.com") document.getElementById('val2').value=value2; } else { value2=value2-20; document.getElementById('val2').value=value2; }}</script><body><input type="button" value="button" onclick="decrease()" /><p>Value 2 <input type="input" value="100" id="val2" /></p></body> What is wrong now?I tried,but it doesn't activate window.location,even valu2 is 0 or less.
  16. Yeah,you are right By the way,I tried set that if value is 0 or less,code directes you to new URL,but I can't get it work right now.I tried if else statement,but I don't know why it wont work.Here is my code: else if (value<=0) { window.location("http://www.google.com") } I put it between if and else statements,but nothing happens when value is equal or under 0.What can be wrong?I also tried create own function,what checks value when user presses button,but it won't work.
  17. Sorry It was funniest mistake what I ever made I write accidentally <script><head> I'm very sorry!
  18. I only change name of values.In this time.However,I copied exactly same code to my notepad, saved and tested,but NOTHING happened.I can check it again.
  19. I can't get it work.I tried modify and only copy & paste,but when I press button,I can't see any alerts,or field's value won't change.What I did wrong?
  20. I understood that code,and I saw this before too,but it won't work my Fire Fox 1.5,IE 6.0 or Opera 8.5.Or then I do something wrong.However,I can't see any mistakes
  21. I tried make image what creates sound when mouse is over it.I succeed create this kind code with one website's help: <img src="Ganon.jpg" ONMOUSEOVER="document.all.music.src='pig.wav'"><bgsound src="pig.wav" id=music loop=2 autostart="false"> Problem is,that this works only with IE,and it plays sound also when page loads.Is there samekind code for Fire Fox and other browsers,and how I can prevent that sound don't play when page is loaded?I tried change autostart to false,but it plays still.Thank you very much!
  22. Hi!I create this kind code,but I want know one thing before I continue developing it.I want that code decreases one value,depend on what random value comes. function decrease(){var value= Math.random()if (value<0.5){value2=value2 -10;}else{value2=value2 -20;}} I have two questions.First,can you see any errors?Second question is about Math.random code.Like you see,this is function.If I create example button,and Math.random creates example value 0.42536.Than,I press again button.Question is,do math.random create new value?Example 0.84763.Thanks for help.I write this code to paper,and I can't test it yet,because it is part of huge code.I can't see any mistakes in it,but you can't never be sure... Thanks.
  23. Hmm,I like Geocities.I don't know is 15 MB enought for you,but Geo has good HTML-editor,I don't know what you guys think about it,but I think it is OK.Geo has pagebuilder program and so on.BTW,if you have problems with big files and sharing them,you should try service like Ihud.Free,and can host 50 MB files.Here is link:Ihud
  24. What do you exactly mean?Do you mean code,what copies part of document's text to your clipboard?Or do you mean that can you copy piece of code,from here,and paste it to there using Ctrl+C?If so,yes it is possible.It is only text.However,you must create all needed codes for code what you just pasted to your document,if it needs any.
×
×
  • Create New...