Groups
Sign in
Groups
comp.lang.javascript
Conversations
About
Send feedback
Help
info
Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Learn more
Dynamic code
24 views
Skip to first unread message
Jonas Thörnvall
unread,
Dec 4, 2021, 1:51:16 AM
12/4/21
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Is eval the only way to create and execute dynamic commands?
command="parent.MultiID.document.getElementById('MVOL"+track+"').value=CCvol"
eval(command);
Or is there a way to insert a string into a command?
JJ
unread,
Dec 5, 2021, 1:48:19 AM
12/5/21
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Script element injection; function instantiation; `javascript:` protocol;
and own JS interpreter.
Michael Haufe (TNO)
unread,
Dec 5, 2021, 12:20:27 PM
12/5/21
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
The correct answer is that you're doing it wrong.
Use a function and not a string. Your command is a reference to that function.
0 new messages