Jump to content

Yali

Member
  • Posts

    283
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Yali reacted to MOMO in (HTML) Form Input to JS-Variable   
    If you're using jQuery
     
    var input = $('input[name="yournamehere"]').val();  
    Vanilla JS
     
    var input = document.getElementById("youridhere").value;  
  2. Like
    Yali reacted to Hazy125 in (HTML) Form Input to JS-Variable   
    Adding to momo's answer. If you only have the one form element with the name htmlInput, then a more precise example would be 
    var input = document.getElementsByTagName("htmlInput")[0].value; If you have more than one input called htmlInput you can just do the following
     
    var input = document.getElementsByTagName("htmlInput")[0].value; var input2 = document.getElementsByTagName("htmlInput")[1].value; var input3 = document.getElementsByTagName("htmlInput")[2].value; Note that when counting with JavaScript you start counting from 0, not 1
  3. Like
    Yali reacted to vorticalbox in (HTML) Form Input to JS-Variable   
    <!DOCTYPE html> <html> <head> <style> .whitetext {color: white;} body{background-color: black} table{border-style: ridge; border-width: 10px; border-color: white; padding: 10px; padding-right: 20px; padding-bottom: 20px;} td{border-style: groove; border-width: 10px; border-color: white; padding: 5px; color: black; font-family: arial;} tr{border-style: groove; border-width: 10px; border-color: white;} th{font-family: arial; color: white; padding: 5px;} </style> </head> <body> <table> <tr> <th></th> <th></th> </tr> <tr> <th></th> <td><input type="number" id="htmlInput" onchange="myFunction()"></td> <td class="whitetext" id="output"></td> </tr> </table> <script> function myFunction() { var inputJavascript = document.getElementById("htmlInput").value; document.getElementById("output").innerHTML = inputJavascript; } </script> </body> </html>
     
  4. Like
    Yali reacted to SCHISCHKA in (HTML) Form Input to JS-Variable   
    try the onchange() function
    https://www.w3schools.com/jsref/event_onchange.asp
    you can put your code in there to execute a function that will update your variable or do whatever it is you want to do with it
  5. Like
    Yali reacted to SCHISCHKA in (HTML) Form Input to JS-Variable   
    here is the example
    https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onchange2
    <!DOCTYPE html> <html> <body> <p>Modify the text in the input field, then click outside the field to fire the onchange event.</p> Enter some text: <input type="text" name="txt" value="Hello" onchange="myFunction(this.value)"> <script> function myFunction(val) { alert("The input value has changed. The new value is: " + val); } </script> </body> </html> this is what youre suppose to do to write code that properly manipulates the DOM
  6. Like
    Yali reacted to Hazy125 in (HTML) Form Input to JS-Variable   
    Ok, I think I accidentally confused you with my post. The option I gave you was slightly different to momo's. Your form element doesn't have an 'id' attribute, but it has a name attribute. So I gave you the getElementsByTagName method to use. This method returns a list of all elements with a 'name' of whatever you choose, which is why you have to specify the number in these brackets [ ]. If you want to use id, it is much easier, no need to worry about the number thing you just need to change your input and script as follows
    <script> var inputJavascript = document.getElementById("htmlInput").value; </script> <input type="number" name="htmlInput" id"htmlInput">  
    Second. In my previous post I mentioned that JavaScript counted from 0. So you would have needed to have it like this anyway
    var inputJavascript = document.getElementsByTagName("htmlInput")[].value; Instead of the number 1. Since you only have one with a tag name of htmlInput, it would put that tag at the start of the list it makes. So the first item in that list is item 0..... Sorry, I think that little explanation didn't help all that much
     
    Third, your script doesn't work quite the was you imagine it would. JavaScript needs triggers to function. You have no triggers. And as I'm writing this @vorticalbox has provided you with a solution for the trigger problem. Basically, in his solution any text in your text box gets put into the next table item when you click that button.
     
    This works fine, but if you want it to happen as you're typing or don't want the button you can just change your input to the following 
    <input type="number" id="htmlInput" onKeyPress="myFunction()"> Instead of having the button in vorticalbox's example
  7. Like
    Yali got a reaction from Mikensan in Had a RAID Array, well had...   
    Ok, so it worked!
    I will set up a parity array in the new pc, so all my work is backed up. Thx for the help!
  8. Funny
    Yali got a reaction from Mug in How to turn 280° Pictures into one Panorama   
    tried that but the max amount of distortion is not enough for the picture haha
  9. Like
    Yali reacted to Bhrom in PC keep rebooting infinitely.   
    Just checked, I have the latest BIOS version.

    For the RAM problem, i had no clue because only happens when I do the psu thing, but if I restart again after that (i mean regular restart from desktop) i would work propperly again.

    Thanks for your help MaxBunny
     
    Yee I guess you are right, if I dont find any solutions ill just contact them and tell them the problem. I was just wondering if there was any solutions to it, or if it was some configuration problem so I dont have to send them back the pc, wich is kind of a pain in the ass.

    Thanks for your help Yali
  10. Like
    Yali reacted to another random person in Camera Engineer?   
    I may not be the most experienced but apparently "I have a talent for filming" (I also can't afford Ursa Minis)
    Basically,  by using parts from other manufacturers, who too want to make a profit, means you will have to jump the price of the cameras to make money while not providing decent quality. I know if I was running and gunning I wouldn't want to be stuck in an awkward position trying to look at a screen mounted elsewhere on the camera. 
    I would recommend that you use software like Autodesk Inventor and electronically make a body for your planned camera bodies, so that way you could submit those plans into a factory in china or a mass production factory in order to get a quote on the cost. I'm a bit skeptical on C-fast storage so maybe go SSD. Cheap Canon batteries? Maybe try 18650 batteries in a plastic pack to give it that professional feel. XLR input is a great idea but I would recommend adding any cheap mic, you have no idea how many times integrated mics have saved me. 
    Just summing up, if you have a passion about saving people money spent on professional cameras, then this is a great way to go, I don't know the accurate pricing on the parts and the cost to manufacture but I would recommend maybe getting a Kickstarter or prior funding. Publicization also helps heaps.
    If you go through with this idea I wish you the best. Good luck my friend.
  11. Like
    Yali got a reaction from another random person in Camera Engineer?   
    didnt even think about it. But yeah, a viewfinder of course haha. Maybe i get to play around with inventor today, im stoked!
  12. Like
    Yali reacted to Mnpctech in Modding FAQ - [New Layout]   
    One of my customers directed me to your guide. Very nicely done and Thank you for crediting my photos and sharing my links. 
     
    My DIY PC case painting guide video, (Ep#3 of Mod Men) can be applied to both aluminum or steel PC cases.
     
     
     
     
     
  13. Like
    Yali got a reaction from W-L in PWM Fan splitter vs Y cable   
    Oh ok yeah makes sense. I have a phobya splitter board that attaches to the motheboard and directly to the psu with a molex. So it probably just regulates speed through the mobo and takes the additional power from the psu then thank you, and good job on the Modding FAQ!
  14. Like
    Yali got a reaction from Nup in What do you want to know about "No Man's Sky"?   
  15. Like
    Yali got a reaction from Xizerz in What do you want to know about "No Man's Sky"?   
    in north america the release date for pc is the 9th, the one for europe is the 10th.
     
    added
  16. Like
    Yali got a reaction from ThinkWithPortals in What do you want to know about "No Man's Sky"?   
    added
     
    added
  17. Like
    Yali reacted to Goodman2265 in Can I buy DDR3L ram?   
    Yup completely fine. Just pop the ram into the slots and smooth sailing. One thing though. Can your mobo even handle 16 gb per a slot?
  18. Like
    Yali got a reaction from Goodman2265 in Can I buy DDR3L ram?   
    Yeah i checked that, thanks for reminding tho
  19. Like
    Yali got a reaction from Sintezza in Can I buy DDR3L ram?   
    Its not the DDR3L that gets me the advatages, the slightly more amount of ram (24gb more) is where it hits. DDR3L just has some good deals on ebay.
  20. Like
    Yali reacted to GlassBomb in Car Enthusiast Club [Now Motorcycle friendly!] - First thread to 150k! ¯\_(ツ)_/¯   
    What are you looking to get from the car? What's your budget and such as well?
    Since you like the Golf's, then I'm just going throw in the Scirocco as a first suggestion as a car to look at. 
     
    Personally, my first car was (and still is) an E46 BMW 320i that I bought last summer.
  21. Like
    Yali got a reaction from dalekphalm in First Car!   
    I dont think im a learner anymore as i did my permit in the usa and thats now 3 years ago. Since then i drove my mothers jeep which only i cleaned and maintained. So yeah i never repaired anything that has to do with the engine but im certainly not some dumbass who cant drive. (Oh and i managed to not scrape with the jeep once, :D) Also, driving in switzerland is on another level, so if i'd stil be a total newbie i wouldnt have had a chance to get my permit back here. Yeah theres the thing with the cash... Well because i really dont earn enough to pay the insurance on a bigger car + the overpriced gas in switzerland, im probably going with an older golf, and i can get my experiences from that + i wouldnt have a lot of problems finding parts.. So thx guys!
  22. Agree
    Yali got a reaction from yuriinfo in First Car!   
    yeah i really like the miata... the mr2 was my dads first car ^^
  23. Like
    Yali got a reaction from EK Luc in 970 MSI does it fit?   
    Yup got it, fits perfectly!
  24. Like
    Yali got a reaction from Unhelpful in Black Friday.   
    Thx dude!
  25. Like
    Yali reacted to GodSpoon in Quiet Power Supply?   
    I have an HX650 and the fan never kicks on unless you put >50% strain on it 
×