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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button validation problem in XHTML 1

Status
Not open for further replies.

johnwm

Programmer
Feb 7, 2001
8,469
GB
I am missing something really easy here!

I'm doing a new version of a page (first time using AJAX so the page isn't polished for publication yet!) and I'm getting a validation error on ONE instance of a button:
Error: there is no attribute onClick for this element (in this HTML version)

The button is inserted dynamically (around 36 times on this page) and only the first shows the error. Can someone please take a look at and spot the stupidity for me?

The page is generated on the fly so the relevant portions are shown here. First a section of aveling3.asp
Code:
<p>August 27th, 2006<br/>Back to serious stuff, and a whole bunch of stays to replace. Now that the front tube plate is out and we can crawl down the barrel we can see how many stays we need to do. While we're at this stage of stripdown, it makes sense to replace any with signs of wear or damage. The removal sequence is interesting, but does take a while. It does do a nice job though, and should avoid damage to the threads. I fear I may be at this part of the job for some time.</p><%myNum=35%><!-- #INCLUDE FILE="ajax1.asp" -->
  <p>August 23rd, 2006<br/>Boiler inspector visited early last week and agreed details on local repair to the barrel pitting.</p><p>We've had a bit of a busy week away from the engine as it was Mrs M's big birthday party. All the loose bits and pieces had to be moved and neatly stacked at the back of the engine shed, as the front half of the shed was commandeered for the bar. Everyone seemed to enjoy themselves and it was a great family get-together. Here's a couple of snaps of the birthday girl (she is the lovely redhead dressed in black)</p><%myNum=34%><!-- #INCLUDE FILE="ajax1.asp" --><p>We've now got everything back in place, and the boiler welder has started the pitting repairs.</p>
The ajax1.asp
Code:
<button type="button" value="<%=mynum%>" onClick="showCustomer(this.value)">Show pictures</button>
<%response.Write("<div id=" & chr(34) & "txtHint" & myNum &chr(34) & ">&nbsp;</div>")%>

If there is anything else you need, please let me know

Thanks!

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
if it is X/HTML the attribute is 'onclick' - remember all tags/attributes when using XHTML are lowercase just like XML so 'onClick' doesn't exists, it's 'onclick'

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Thank you very much - That was indeed the problem. I must get these glasses changed![smile]

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
lol - no probs :)

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top