Search:
Type: Posts; User: lwc
Search :
Search took 0.01 seconds.
Thanks. BTW, why does this only work for the first catch:
theregex = "<script>([\s\S]+?[^<\/script>])<\/script>"
theregex1 = new RegExp(theregex, "gi")
if (theregex1.test(text)) { //...
Alright, I've programmed the solution myself:
<span id=dynamictext>hey</span><hr>
<input type=button onclick="bla(0)" value=Button0><hr>
<input type=button onclick="bla(1)" value=Button1><hr>...
I have a code that adds dynamic text to a page:
document.getElementById("dynamic").innerHTML = text
However, sometimes the text contains actual javascript. It seems it won't run because the page...
If I put the previous HTML inside a table:
<table><tr><td><form method="post"></td></tr>
<tr><td><input type=checkbox name=check[] onclick="bla(this)"></td></tr>
<tr><td><input type=text...
Well, since it doesn't give you a unique ID/name (if you use array named form fields), you can't use getElementByName/ID on the resulting child.
Even more so, the previous/nextsibling method...
Oh, how I loath the don't edit policy. Sometimes x.nodeType is 1 to begin with. It seems to be fixed by changing
while (x.nodeType!=1)
to
while (x.name == undefined)
<form...
Please allow more edit time, as the previous post could have been replaced by the following. I've programmed a way to control the amount of next/previous in next/previousSibling:
<form...
You can't (well, at least shouldn't) use something like
if (!a)
because false is a valid value (e.g. add(false)). What you need is Javascript's equivalence of
PHP's isset.
I wish Javascript...
This is also served to declare default values in functions.
Seemingly, the solution is:
if (myvar == undefined)
Alas,
A solution is given for this:
But I'd like to ask fellow posters...
Oh yeah, now I remembered why I used brackets in the first place!
Thanks tirna for the clarification about input vs. input1. Though I just used "input" for this example, I'll remember from now on...
I think you confused "justinput" with "input". I never had two different types of "input". Nevertheless, thanks for the discovery about the lack of need of "[]". I never imagined it wasn't even...
No, what I meant was how do I tell the second checkbox to change the second input field, simply because both of them are second?
Thanks! But as for the second part, how do you change the name that has a matching index to the checkbox? In this case, it would be 1.
I only manage to access non array named form fields.
<form method="post">
<input type=checkbox name=check[]>
<input type=text name=justinput value=testing>
<hr>
<input type=checkbox...