[thelist] (x)html 1.0 validation with javascript

Gordon MacLeod gomac11 at rogers.com
Tue Jun 22 21:24:59 CDT 2004


Not sure why yours doesn't validate, but onclick doesn't have to be
caps.

Anyway, this validates:

In your head:
<script type="text/javascript">
<!--
function newWindow(theWidth,theHeight) {
popup = window.open("","newwin","width=" + theWidth + ",height=" +
theHeight + ",resizable=no,status=no,scrollbars=no")
}
// -->
</script>

Your link:
<a href='file-path' onclick='newWindow(100,100)' target='whatever'>

Gord
-----Original Message-----
From: thelist-bounces at lists.evolt.org 
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Matt Tibbits

Hello everyone,

This being my first post to this list, I have what I hope is an easy
question.

After playing with HTML and the like for the past few years, I 
have gotten
serious about webdesign over the past few months.  The fact 
that I have been
tasked to develop a website for my company might have something 
to do with
this.

Anyway, I have completed my site and am validating my pages.  
The problem I
am running into is that one page has links which open in a popup window
using javascript. The link is as follows : 

 

<a href="dimetech/2004-06-18.htm" onClick="return
popUp('dimetech/2004-06-18.htm', 'imageName',
'width=600,height=400,menubar=yes,scrollbars=yes')">text</a>

 

Because onClick="return popup uses capital letters the page will not
validate as XHTML1.0 transitional.  If I use lowercase letters, the page
validates but the script no longer works.

 

Does anyone have a solution besides the good old standby, "forget about
validaton"?  Is there any way to validate and to have my script work?

 

Thanks,

 

Matt

 

Matthew Tibbits
IT Support Specialist [IM/IT Program] 
NB Easter Seal March of Dimes 
65 Brunswick St. 
Fredericton, NB,  E3B 1G5 
Phone: (506) 458-8739 Fax: (506) 457-2863 
 

 

-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 



More information about the thelist mailing list