473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Javascript+XHTML Validation Problem

The javascript we use to help protect against email address harvesting is
causing the following error when trying to validate XHTML 1.0 Transitional:

Line 91 column 172: character ";" not allowed in attribute specification
list.
....2.length;var v1="";for(var
v4=0;v4<v5;v4++){v1+=String.fromCharCode(v2.charCo Here are the surrounding
lines of code:<script type="text/javascript">var
v2="RLDJCRMGXZQDVBSQHNLK";var
v7=unescape("%3B9%25.%22%2294%183%3F%20%3F%23%3D0f +%28%3E");var
v5=v2.length;var v1="";for(var
v4=0;v4<v5;v4++){v1+=String.fromCharCode(v2.charCo deAt(v4)^v7.charCodeAt(v4));}document.write('<a
href="javascript:void(0)"
onclick="window.location=\'mail\u0074o\u003a'+v1+' ?subject='+'\'"
title="Email us at: p e r s o n AT h o s t DOT e d
u">'+'person<!--1sd23-->\u0026\u002364\u003b<!--4sdf32-->host\u0026\u002346\u003bedu</a>');</script><noscript><a
href="http://www.host.edu/~user/cgi-bin/mail.cgi" title="Email us at: p e r
s o n at h o s t dot e d
u">person<!--123-->@<!--432-->host<!--klsdf-->.edu</a></noscript><br
/>Anyone have any ideas?Thank You,John Ho************@indiana.edu
Dec 27 '05 #1
1 2269
johoward wrote:
The javascript we use to help protect against email address harvesting is
causing the following error when trying to validate XHTML 1.0
Transitional:

Line 91 column 172: character ";" not allowed in attribute specification
list. document.write('<a href="javascript:void(0)"
onclick="window.location=\'mail\u0074o\u003a'+v1+' ?subject='+'\'"
title="Email us at: p e r s o n AT h o s t DOT e d


The short answer is: http://www.w3.org/TR/xhtml1/#h-4.8

The longer answer involves pointing out the lack of support for
document.write in browsers parsing XHTML as XHTML and the utter
pointlessness of serving XHTML to clients if you never serve it as XHTML.

I suggest sticking to HTML 4.01 (and moving away from Transitional and to
Strict).

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Dec 27 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: NotGiven | last post by:
I have a web form with several fields. If I copy & paste from a RTF document into a field, the javascript validation and field length are bypassed and cause the form to fail. Any ideas?
5
by: JJ_377 | last post by:
I want a JavaScript validation function to fire on an ASP.NET textbox's change event. Here's what I've been trying and it is not working. The following added in the webform's page load event: ...
1
by: karen987 | last post by:
I have a comment form, on a news website, ASP page, which users fill in and it adds comments to a news article. The reader clicks on a headline and the comments open up in a new window. It already...
1
by: ll | last post by:
Hi, I am working with a page that has both cfform elements and 'plain html' form elements. In particular, I am needing to validate my textarea form field and my email text field. On one of my...
1
by: shrin | last post by:
Hi all, I want to use asp.net validator and javascript validation function on a single form for different fields. also I want to execute some code on button click after the validation is completed....
1
by: arasapandy | last post by:
hi i have one problem in javascript validation,i need one RegEx for mobile number,format is (91-1234567),from left to right first 2 numbers after 2 numbers hyphen after hyphen 7 numbers,this format...
21
by: kiran83 | last post by:
My Text box can accept all types of data like alphabets,numeric,special characters ... Should give an error message 'if space is not a valid value ' when i am clicking a button... in asp.net with...
1
by: jerrydigital | last post by:
Hello, I have a form that i use ASP to process the form to my access database. It works well but I'm struggling to get the javascript validation to work. I have posted a small version of my form...
12
by: btreddy | last post by:
Hii Experts, im facing a problem with the javascript validation.i've a gridview in my web form and added a footer tempalte and placed textboxes in tht tempalte ,just to add a new row to the...
3
by: gayuvinu | last post by:
Hi, I am new to javascript, I need your help in javascript validation of a string. string of length 6, last 4 characters can be padded with "8" while entering. valid strings are ZJJL74 ZJJL7*...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.