Problem with calling a function within a newly created element

D

DL

<select id="qType"+i name="qType"+i  onchange="doCheckbox('+i
+','+nextrow+')"><option value="YN" selected>Yes/No<option
value="CK">Checkbox<option value="RD">Radio</select>

// silly me, the form wasn't sent, how to expect an element of it?
// now, I only need this SELECT element for the doCheckbox function,
could I re-write the above code to
<select id="qType"+i name="qType"+i
onchange="doCheckbox(this.value,'+i+','+nextrow+')"><option value="YN"
selected>Yes/No<option value="CK">Checkbox<option value="RD">Radio</
select>
to pass the SELECT element's value along?

ok, the most desirable thing is to either send or somehow be able to
retrieve the newly populated value of the SELECT element from the
doCheckbox function. And if this option is a no go, send the whole
form? onchange="doCheckbox(form.submit(),'+i+','+nextrow+')"> //
won't work
// it's about 10:24pm here, am I getting real slow?

Thanks.
 
T

Thomas 'PointedEars' Lahn

DL wrote:
^^^^^^^^^
This is an attribution line. Again, please include one next time.

As you have been told before, code should be posted so that it has good
chances to remain executable when copypasted, after being line-broken.
Therefore, single-line comments should appear *before* the code they
describe, and if they are long enough, multi-line comments /* ... */
should be used instead.

So now you're blaming the result of your stupidity on the expertise of
others? (It's _he_ BTW, Thomas isn't a name you would give to a girl,
now is it?) :-(
[...] your explanation seems to indicate that there _isn't_ an element
with the ID you expect.

Ahe. I know where the problem is... maybe... Here's the code for this
portion,

<select id="qType"+i name="qType"+i onchange="doCheckbox('+i

If an HTML parser were to parse this, it would read either

<select id="qType" name="qType" onchange="doCheckbox('+i

or

<select id="qType&quot;+i" name="qType&quot;+1" onchange="doCheckbox('+i

In the first case the element would not have the ID that you expect it to
have; in the second case the result is invalid as IDs must not contain the
`+' character. But see below.
+','+nextrow+')"><option value="YN" selected>Yes/No<option
value="CK">Checkbox<option value="RD">Radio</select>

// silly me, the form wasn't sent, how to expect an element of it? //
now, I only need this SELECT element for the doCheckbox function, could I
re-write the above code to <select id="qType"+i name="qType"+i
onchange="doCheckbox(this.value,'+i+','+nextrow+')"><option value="YN"
selected>Yes/No<option value="CK">Checkbox<option value="RD">Radio</
select> to pass the SELECT element's value along?

My test indicates no. Then how?

You have posted invalid HTML. Assuming in your favor that the code is a
string value that is the argument of document.write() or something like that
instead, you have forgotten to escape `</' (End TAG Open delimiter) as `<\/'
within that string.
Unfortunately the other viable alternative of using Firefox with Firebug
isn't available at this point. A company called Aka??? embeded encrypted
code (probably to track what's going on with my FF usage),

What the heck are you talking about? Do you want to be a serious software
developer, or do you want to be a script kiddie?
but that's none of their f??? business and I cursed them publicly, and
they are security experts, now, my FF is hardly working, let alone the
powerful Firebug debugging feature). Trying the lame re- installation to
no avail...

Maybe you should someone let do the job who knows what they are doing.


PointedEars
 
D

DL

Unfortunately the other viable alternative of using Firefox with Firebug
isn't available at this point. A company called Aka??? embeded encrypted
code (probably to track what's going on with my FF usage),

What the heck are you talking about? Do you want to be a serious
software
developer, or do you want to be a script kiddie?
Maybe you should someone let do the job who knows what they are doing.

PointedEars
--

Fk off, you m fker for the last time on your m's grave! I've asked
you to do so repeatedly in private but you did not listen, so, I have
to publicly! Once again, you m fker, fk off!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,818
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top