code logs -> 2016 -> Wed, 14 Sep 2016< code.20160913.log - code.20160915.log >
--- Log opened Wed Sep 14 00:00:09 2016
00:33 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code
02:30 catadroid` [catadroid@Nightstar-tnkkpm.dab.02.net] has joined #code
02:33 catadroid [catadroid@Nightstar-eji0dr.dab.02.net] has quit [Ping timeout: 121 seconds]
03:22 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [Connection closed]
03:27 gizmore [kvirc@Nightstar-uo5cuf.dip0.t-ipconnect.de] has joined #code
03:33 orth [orthianz@Nightstar-fb6.gt0.148.118.IP] has joined #code
03:42 orth_ [orthianz@Nightstar-kj395a.spark.co.nz] has joined #code
03:42 orth [orthianz@Nightstar-fb6.gt0.148.118.IP] has quit [Connection reset by peer]
03:49 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
05:06 Derakon is now known as Derakon[AFK]
05:13 NSGuest19694 [quassel@Nightstar-7qsccf.fios.verizon.net] has quit [Ping timeout: 121 seconds]
05:15 orth [orthianz@Nightstar-34n.t4f.148.118.IP] has joined #code
05:18 orth_ [orthianz@Nightstar-kj395a.spark.co.nz] has quit [Ping timeout: 121 seconds]
05:23 starkruzr [quassel@Nightstar-7qsccf.fios.verizon.net] has joined #code
05:24 mode/#code [+ao starkruzr starkruzr] by ChanServ
06:09 orth [orthianz@Nightstar-34n.t4f.148.118.IP] has quit [[NS] Quit: Bye]
06:29 Kindamoody[zZz] is now known as Kindamoody
06:51 celticminstrel [celticminst@Nightstar-f17t1s.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:08 catadroid` is now known as catadroid
07:18 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
07:18 mode/#code [+qo Vornicus Vornicus] by ChanServ
07:23 mac is now known as macdjord|slep
08:07 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
08:24 Kindamoody is now known as Kindamoody|afk
08:29 Azash [Azash@wizard.engineering] has quit [Operation timed out]
08:33 Azash [Azash@wizard.engineering] has joined #code
08:33 mode/#code [+o Azash] by ChanServ
08:34 gizmore|2 [kvirc@Nightstar-piu155.dip0.t-ipconnect.de] has joined #code
08:35 gizmore [kvirc@Nightstar-uo5cuf.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
08:57 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
08:57 mode/#code [+qo Vornicus Vornicus] by ChanServ
09:00 catadroid` [catadroid@Nightstar-sql5t4.dab.02.net] has joined #code
09:04 catadroid [catadroid@Nightstar-tnkkpm.dab.02.net] has quit [Ping timeout: 121 seconds]
10:06 catadroid` is now known as catadroid
12:43 wolfmoon [uid178473@Nightstar-2dc.p8m.184.192.IP] has joined #code
12:44
< wolfmoon>
Hello :)
12:44
< wolfmoon>
How does one change the DOM value of an element in Javascript?
12:45
< wolfmoon>
document.getElementById('#comp_amtcrlimt') = 5000;
12:45
< wolfmoon>
Will that work?
12:45
<@TheWatcher>
No
12:46
< wolfmoon>
Okay, how would get that to work then?
12:46
<@TheWatcher>
Is it the contents of the element you want to change?
12:46
< wolfmoon>
document.getElementById('#comp_amtcrlimt').value = 5000;
12:46
< wolfmoon>
Sorry, missed the value
12:46
< wolfmoon>
Yes, the input value of it. It is an input box that needs to be populated with 5000
12:47
<@TheWatcher>
Okay, you're close then - drop the #
12:48
< wolfmoon>
Thank you :)
12:48
<@TheWatcher>
so just document.getElementById('comp_amtcrlimt').value = 5000;
12:54
< wolfmoon>
While I wait for it to run, does it matter that you write stuff to the page before changing the element? (using Response.Write)
12:56
< wolfmoon>
I have to edit a 3000 line ASP page to populate a few fields. But the current setup is it calls Response.Write first. Will this break the page?
12:59
<@TheWatcher>
response.write is a server-side thing, that'll be generating the HTML to send to the client; the javascript runs client side. Ideally you want to use a DOM ready event handler to set element contents in javascript to avoid problems
13:00
< wolfmoon>
Okay... How do I get it to run client side then?
13:01
< wolfmoon>
Add it to the value pushed into Response.Write?
13:01
<@TheWatcher>
If you have access to the asp generating the page, can't you just set the value in the element in the source before it gets sent, without any need for javascript?
13:02
< wolfmoon>
Nope
13:03
<@TheWatcher>
Do you have a framework like jquery available on the page?
13:03
< wolfmoon>
I can't even tell where it gets the fields from. Nor where to put it. It is *very* hidden away. And ambigious. The way the system was written was to use client side code to change the fields and such
13:03
< wolfmoon>
Shitty system to be honest
13:03
< wolfmoon>
I don't think so
13:07
<@TheWatcher>
Okay, if you can insert arbitrary javascript into the page, you could use <script>document.addEventListener('DOMContentLoaded', function(){ document.getElementById('comp_amtcrlimt').value = 5000; }, false);</script> but if you're dealing with IE that'll only work on IE9+
13:17
< wolfmoon>
Thank you :) I will see if I can implement that
13:21
<@TheWatcher>
(although if you have to do any substantial amount of js work at all, I'd really recommend looking at getting jquery or some other framework available in the page. Working with raw javascript - without any library like jquery/mootools/etc to add a degree of sanity - in an real environment is a cavern of spiders and woe)
13:22
<@TheWatcher>
(*especially* if you're trying to be cross-browser compatible)
13:23
< wolfmoon>
I'll keep that in mind
14:07 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
14:07 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
14:07 mode/#code [+qo Vornicus Vornicus] by ChanServ
14:43 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
14:44 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
14:44 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:11 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
15:14 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:14 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:29 macdjord|slep is now known as macdjord|wurk
15:30 catadroid` [catadroid@Nightstar-4lv1ho.dab.02.net] has joined #code
15:33 catadroid [catadroid@Nightstar-sql5t4.dab.02.net] has quit [Ping timeout: 121 seconds]
15:56 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [Operation timed out]
15:58 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
15:58 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:58 mode/#code [+qo Vornicus Vornicus] by ChanServ
16:00 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code
16:00 Netsplit Golgafrincham.Nightstar.Net <-> Krikkit.Nightstar.Net quits: @PinkFreud
16:09 Netsplit over, joins: @PinkFreud
16:09 catadroid` is now known as catadroid
16:12 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
16:13 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code
16:13 mode/#code [+o gnolam] by ChanServ
16:14 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
16:14 mode/#code [+qo Vornicus Vornicus] by ChanServ
16:26 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
16:26 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
16:26 mode/#code [+qo Vornicus Vornicus] by ChanServ
17:03 grindhold [quassel@Nightstar-0ona3l.cyan.servdiscount-customer.com] has quit [Connection closed]
17:14 celticminstrel [celticminst@Nightstar-f17t1s.dsl.bell.ca] has joined #code
17:14 mode/#code [+o celticminstrel] by ChanServ
17:31 grindhold [quassel@Nightstar-0ona3l.cyan.servdiscount-customer.com] has joined #code
17:31 mode/#code [+o grindhold] by ChanServ
18:27 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
18:35 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Connection reset by peer]
18:36 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
18:38 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
18:39 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
18:39 mode/#code [+qo Vornicus Vornicus] by ChanServ
19:04 wolfmoon [uid178473@Nightstar-2dc.p8m.184.192.IP] has quit [[NS] Quit: Connection closed for inactivity]
20:40 Derakon[AFK] is now known as Derakon
21:14 catadroid [catadroid@Nightstar-4lv1ho.dab.02.net] has quit [[NS] Quit: Bye]
21:17 gizmore|2 [kvirc@Nightstar-piu155.dip0.t-ipconnect.de] has quit [The TLS connection was non-properly terminated.]
23:00 catadroid [catadroid@Nightstar-o31dc0.dab.02.net] has joined #code
23:00 catadroid [catadroid@Nightstar-o31dc0.dab.02.net] has quit [[NS] Quit: Bye]
23:25 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code
23:45 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [Connection closed]
23:53 Kindamoody|afk is now known as Kindamoody
--- Log closed Thu Sep 15 00:00:25 2016
code logs -> 2016 -> Wed, 14 Sep 2016< code.20160913.log - code.20160915.log >

[ Latest log file ]