Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Character Error in IE 7.0

Status
Not open for further replies.

tayorolls

MIS
May 8, 2007
42
0
0
US
Hi,

I have a radio group which I click on. Based on the radio button I click on, the respective dropdown box should appear greyed out and should be disabled.

I get an error "Invalid Character" at line 205 and 206.

Where line 205 is:

Code:
<input type="radio" name="SearchBy" value="Criteria" onclick="this.form.SelectPeriod.disabled=true; this.form.SelectPeriod.style=#ECECEC"><label class="label1">Criteria</label>

Line 206 is:
Code:
<input type="radio" name="SearchBy" value="Period" onclick="this.form.Search.disabled=true; this.form.Search.style=#ECECEC">&nbsp;<label class="label1">Period</label>

Which could be the invalid character here?

I am seeing the results in IE 7.0

Thanks.
 
I'm not sure I have enough info, but remove "this" on your references to those objects on your onclick handler.



[monkey][snake] <.
 
I did not quite get you. I changed the "form" to the actual form name

Code:
<input type="radio" name="SearchBy" value="Criteria" onclick="this.frmKaizen.SelectPeriod.disabled=true; this.form.SelectPeriod.style=#ECECEC"><label class="label1">Criteria</label>
				        <input type="radio" name="SearchBy" value="Period" onclick="this.frmKaizen.Search.disabled=true; this.form.Search.style=#ECECEC">&nbsp;<label class="label1">Period</label>

I still get the error. Do you mean remove the word "this"?

Thanks.
 
I had modified it to:

Code:
<input type="radio" name="SearchBy" value="Criteria" onclick="frmKaizen.SelectPeriod.disabled=true; frmKaizen.SelectPeriod.style=#ECECEC"><label class="label1">Criteria</label>
				        <input type="radio" name="SearchBy" value="Period" onclick="frmKaizen.Search.disabled=true; frmKaizen.Search.style=#ECECEC">&nbsp;<label class="label1">Period</label>

Kindly ignore the above post.

Thanks.
 
oh duh, I see the problem, I must be out of it.
Code:
this.form.Search.style=#ECECEC

Should be this:

Code:
this.form.Search.style.color=#ECECEC

OR

this.form.Search.style.backgroundColor=#ECECEC

Not sure what you are wanting.



[monkey][snake] <.
 
Silly monksnake:

Code:
this.form.Search.style.color=[red]'[/red]#ECECEC[red]'[/red]
                             ^       ^
                             |       |
                             \       /
                              \     /
                               \   /
                                \ /
                          Don't forget these
OR

this.form.Search.style.backgroundColor=[red]'[/red]#ECECEC[red]'[/red]
                                       ^       ^
                                       |       |
                                       \       /
                                        \     /
                                         \   /
                                          \ /
                                         or these

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
Thanks for the pointer. Now with the change, I do not get errors anymore.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top