Category : javascript

I’m trying to dynamically change the <script src=oldValue"/> InputValue depends on what user types in input and after submitting page will reload with new <script src=newValue"/> <input type="text" id="text" /> <input type="button" id="btn" value="Submit" onClick="javascript: window.open(‘http://www.mywebsite.com/print/’ + document.getElementById(‘text’).value);" /> <script src="//script.ashx?company=InputValue" async></script> Source: Ask Javascript..

Read more

I have this output [["0,7431",312,188,22,117,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["0,5592",314,328,23,124,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["0,8693",311,465,24,128,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["0,5",314,611,21,115,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["3,4874",311,751,26,120,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["81",404,455,19,22,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["19",428,460,21,19,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["76",452,459,19,20,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["8,8",605,604,23,27,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["12,1",646,608,22,26,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["54",681,612,22,25,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["11,0",794,652,21,27,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["10,5",832,648,21,32,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["38",867,657,20,28,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["23,5",1013,650,25,26,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["5,0",1051,654,22,25,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["78",1089,661,21,22,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["17,6",1614,652,25,31,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["15,7",1652,659,27,28,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["63",1687,670,26,23,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["5,0",1820,662,25,24,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["10,3",1866,652,21,32,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["29",1900,668,20,22,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["5,1",2030,659,27,27,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["32,4",2071,652,23,34,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["81",2103,673,26,21,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["10,6",2238,659,29,33,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["41",2281,672,21,29,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["49",2314,671,25,27,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["7,5",2485,657,27,28,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["56",2526,664,24,28,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0],["34",2560,670,29,25,"",0,"Arial","14","0000CC","255","255","255","0.5","666666","center","","1","4",0 * And I want to only output the text between the first " " at each line. So it would look like this: 0,7431 0,5592 0,8693 0,5 etc… The text is variable and it’s changing depending on the site I am browsing. Is this possible? Source: Ask Javascript..

Read more

I used this code to convert epoch to human readable date var timestamp = 1293683278; var date = new Date(timestamp*1000); var year = date.getFullYear(); var month = date.getMonth() + 1; var day = date.getDate(); var hours = date.getHours(); var minutes = date.getMinutes(); var seconds = date.getSeconds(); I need to change it to UTC+3 how can ..

Read more