Jump to content

Bob van Daal

Member
  • Posts

    49
  • Joined

  • Last visited

Everything posted by Bob van Daal

  1. Hey guys, So I am trying to do the following: assign a "default" value to a javascript variable, then change that value, and to then again be able to change the variable, <script> function functie1(x) { var z = "jasonr"; var x = prompt("Which chat do you want to see?", "Shroud"); if (x == "") { window.alert("You canceled."); location.reload(); } else { window.alert("You chose " + x ); document.getElementById( z ).src = "https://www.twitch.tv/" + x + "/chat?popout="; document.getElementById( z ).id = x; }} document.getElementById("clickMe").onclick = functie1; function functie2(y) { var k = "lirik"; var y = prompt("Which chat do you want to see?", "lirik"); if (y == "") { window.alert("You canceled."); location.reload(); } else { window.alert("You chose " + y) document.getElementById( k ).src = "https://www.twitch.tv/" + y + "/chat?popout="; document.getElementById( k ).id = y; }} document.getElementById("clickMe2").onclick = functie2; var y = k; var x = z; </script> this is my script, I am altering Iframe elements with it, what I want to achieveis that I can alter the elements multiple times where I can only do that once at this moment. I think it has something to do with that there is no element left that goes byid = z after it has been altered once, so now I thought I had to change the value of z into x after the function ran, but I cant get it to work. Can someone tell me what's what with the variable scopes or how I can assign the new values to it, I've looked all over but I am not getting wiser at all. Thanks in advance! Bob
  2. Hello, I am making a website that allows you to watch different Twitch chats at the same time by using the Twitch chat iframe which, at the moment I am trying to alter iframe elements using Javascript but I cant get it to work. <html> <head> <title>Dual Twitch chat overview</title> <link rel="stylesheet" type="text/css" href="clean.css"> </head> <body> <div id="navbar"> <ul> <li style="float:left"><a href="xo.html">Home</a></li> <li><a href="dualchat.html">Dual Chat</a></li> <li><a href="vierchat.html">Quadrupple chat</a></li> <li><a href="achtchat.html">Dual Quadrupple chat</a></li> <li><a href="prayforfns.html">#PrayforFNS</a></li> <li style="float:right"><a href="twitch.com">About</a></li> </ul> </div> <button id="clickMe">Choose</button> <button id="clickMe2">Choose</button> <script> document.getElementById("clickMe").onclick = functie1; function functie1() { var x = prompt("Which chat do you want to see?", "Shroud"); window.alert( x ); document.getElementById("lirik").src = x; document.getElementById("lirik").id = x; } document.getElementById("clickMe2").onclick = functie2; function functie2() { var y = prompt("Which chat do you want to see?", "Shroud"); window.alert( y ); document.getElementById("shroud").src = y; document.getElementById("shroud").id = y; } </script> <div id="chatlinks"> <iframe frameborder="0px" scrolling="yes" id="lirik" src="https://www.twitch.tv/lirik/chat?popout=" id="source" height="100%" width="100%"> </iframe> </div> <div id="chatrechts"> <iframe frameborder="0px" scrolling="yes" id="shroud" src="https://www.twitch.tv/shroud/chat?popout=" id="source" height="100%" width="100%"> </iframe> </div> </body> </html> I get the prompt and afterwards the popup with the variable but the iframes stay the same. Could anyone tell me what's wrong with the code? Thank you in advance! Bobster345589
  3. So I have an assignment to make a programme with small basic, its very simplistic. But I'm running to the problem that with the code under the marker "start" the points always get increased with 100 and at the marker "start2" the points consistently get decreased with 75. ready: TextWindow.WriteLine("Do you want to bet? yes(1)? High risk, high reward(2)? Or not(3).") answer = TextWindow.ReadNumber() If answer = 1 Then Goto start ElseIf answer = 2 then Goto start2 Else TextWindow.WriteLine("Maybe you'll reconsider?") Goto ready EndIf points = 100 start: TextWindow.WriteLine("Ok lets go.") var1 = Math.GetRandomNumber(10) If 5 < var1 < 9 Then points = points + 100 ElseIf 9 < var1 < 10 then points = points + 200 Elseif 1 < var1 < 5 then points = points - 100 EndIf TextWindow.WriteLine("You rolled " + var1 + ". You now have " + points + " points.") Goto ready start2: TextWindow.WriteLine("How many of your points do you want to bet?") bet = TextWindow.ReadNumber() var2 = Math.GetRandomNumber(10) If 1 < var2 < 5 Then points = points - bet + bet * 0.25 ElseIf 5 < var2 < 8 then points = points - bet + bet * 1.5 ElseIf 8 < var2 < 9 then points = points - bet + bet * 2.5 Elseif 9 < var2 < 10 then points = points - bet + bet * 4 EndIf TextWindow.WriteLine("You rolled " + var2 + ". You now have " + points + " points.") Goto ready What to do? Is it something with the if/elseif construction or does it have to do with the points variable or is it something else? thanks a lot in advance!
  4. ty so much but i figured it out, its my vlc, tyty
  5. my monitor is fine, but the video output is all dark and purple.
  6. the image is going black and purple, it looks fine on my second monitor.
  7. hey guys, so i rendered a couple of animations in blender as AVI JPEG, Now im trying to combine them in sony vegas, in the preview they look great but when i render them i only see black, anyway to fix? ty in advance
  8. Hey guys, so quite recently i got a new monitor a benq zowie xl2720, its really nice btw. but when I try to record my screen with obs or take a screenshot and i try to look at either one of them later the colours have all gone black and dark purple... anyway to fix this?
  9. Hi guys, I've been playing a lot of cs lately and have attempted to create buy binds several times in my autoexce and config, but every time I tried it just wouldn't work and I'd be too lazy to troubleshoot. How do I make my buy binds work? btw I added a couple of screenshots of my cfg and autoexec.exe. Thanks in advance Bobster
  10. Hey guys, I got a new monitor, pretty stoked bout it, it's a Benq Zowie XL2720. I've got 2 questions though: 1. Are these the correct drivers? http://www.benq.eu/support/downloads/ Because its just a zip withoutr a .exe 2. How do I ensure that I am using 144hz in AMD settings? graphics card is msi r9 380 and I am using a dual link DVI-d cable(to use 144hz). Thanks in advance/ Bob
  11. Change the order of the monitors in windows control desk
  12. Hey guys, So I have a 1920 * 1080p acer monitor, (hdmi, dvi, vga) hooked into my msi r9 380 2g(displayport, hdmi, dvi * 2) on an hdmi cable. I had a spare monitor standing around, a iiyama 1280 * 1024 (vga and dvi), hooked into my intel hd graphics gigabyte z-97x g-5 motherboard, with vga. I set them both up, and went to monitor setting in windows 10, i can duplicate them, put all on 1, put all on 2, and expand them. But when i expand them my mouse wont go to the next monitor. Thanks in advance guys,\ cya Bobster
  13. It is that machine, it runs SW: Battlefront and Fallout 4 without problems, the temp while playing is 35 degrees, usage is 100%
  14. I bought csgo today, and im trying to play with some friends but the screen keeps freezing and turning black, bringing me to the windows homepage. I tested it and the same thing happens when I'm playing offline vs bots. Does anyone know what the problem is? Bob
  15. So I'm building a NAS and to be power efficient I decided to go with an integrated CPU, but I'm having trouble finding out how much power this machine would draw PCPartPicker part list: http://pcpartpicker.com/p/byqH6h Price breakdown by merchant: http://pcpartpicker.com/p/byqH6h/by_merchant/ Memory: Crucial Ballistix Sport 8GB (2 x 4GB) DDR3-1600 Memory ($32.99 @ Newegg) Storage: Western Digital Red 3TB 3.5" 5400RPM Internal Hard Drive ($108.99 @ SuperBiiz) Storage: Western Digital Red 3TB 3.5" 5400RPM Internal Hard Drive ($108.99 @ SuperBiiz) Case: BitFenix Phenom Midnight Black Mini ITX Tower Case ($80.99 @ SuperBiiz) Power Supply: be quiet! 300W 80+ Bronze Certified ATX Power Supply Other: ASRock N3150-ITX Total: $331.96 Prices include shipping, taxes, and discounts when available Generated by PCPartPicker 2016-02-12 10:49 EST-0500 It'll be running FreeNAS. Thanks in advance
  16. wont go too hot I think, btw: I got that Intel NIC too, its great
  17. I've been an addict ever since I was 6 or 7 Can't really say anything else about it
×