[thelist] (x)html 1.0 validation with javascript

Matt Tibbits metibbits at yahoo.ca
Wed Jun 23 09:13:49 CDT 2004


Actually the problem was not with OnClick...after a good nights sleep it
just jumped off the screen at me this morning...

If you look at this link <a href="" onclick="return popup(' ')...the popup
function was written as popUp in the actual script. I changed it to all
lowercase in the script (popup) and now it works fine. Oh, the little
things...

Anyways, since everything is now lowercase it validates using strict XHTML
1.0 and my script also works.

Thanks,

Matt


-----Original Message-----
From: Gordon MacLeod [mailto:gomac11 at rogers.com] 
Sent: June 22, 2004 10:25 PM
To: thelist at lists.evolt.org
Subject: RE: [thelist] (x)html 1.0 validation with javascript

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