HTML & WEB-Design

Moderators: Jonathan
Number of threads: 1222
Number of posts: 3302

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
XHTML + JAVASCRIPT = WORKING + DTD = NOT WORKING Posted by sarkiemarkie on 17 Mar 2010 at 6:49 AM
Im using XSL and javascript and im trying to do the below function in javascript. The &lt; is in place of a '<' becuase XSL gets confused if you do that.

The problem now is that it 'compiles' but when i open the page in IE, FF, SF.... none of the javascript works becuase now it is crashing at the &lt; bit...

ALL of this worked before I had put in the decleration for the XHTML transitional DTD... and now it suddenly doesnt work... i have tried absolutely everything and have been google'ing for days!!!! PLEASE HELP


JS CODE

    function init() 
    {
 

    
	var height= screen.height;
	
	    if(height&lt;350)
	{
		document.getElementById('contentstyle').style.fontSize="16px";
		document.getElementById('title').style.fontSize="18px";
		    document.getElementById('inlineimage').style.width="50%";
		
	}
	

     } 



XHTML DECLERATION

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" 
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />



<xsl:template match="/">
  <html xmlns="http://www.w3.org/1999/xhtml">  
............
Report
This post has been deleted. Posted by atlantis2000 on 23 Nov 2010 at 3:14 PM
This post has been deleted.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.