-
Javascript not working in traditional or strict pages
I had to copy a piece of java code into the head of a new xhtml doc. The original page and the first couple of lines of code are the original code below. The page holds an .swf that calls a java function. (THIS WORKS)
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>index</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script language="javascript">
function scrolling(){
document.body.scrollTop = 750;
}
</script>
_____________________________________________________________
I made a new page in Dreamweaver /the default is xhtml transitional
and copied the code so the page now looks like this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="Your description goes here" />
<meta name="keywords" content="your,keywords,goes,here" />
<meta name="author" content="Your Name" />
<link rel="stylesheet" type="text/css" href="/2009/idnynew.css" title="idny1.css" media="screen,projection" />
<title>XXXXXXXX</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="../AC_RunActiveContent.js" language="javascript"></script>
<script language="javascript">
function scrolling(){
document.body.scrollTop = 750;
}
</script>
THIS DOES NOT WORK
The java function does not work in the xhtml traditional or strict xhtml for that matter.
Can someone tell me why and what I have to change in the java to make it work in xhtml trans or strict?
Is it healthy to leave it alone and put the page up the way it is deleting the first line of code?
Below are two links to the same looking page.
http://idesignnewyork.com/2009/idnyhome2009.html - not working
http://idesignnewyork.com/2009/newindex.html - working
To see what I mean when the page loads click the blue JOBS / INTERNS button the working page will move down like an anchor to the Y 750 position
look at the source files for both pages, so far no one could answer this
this question was sitting in the Adobe forum for days unanswered so I thought it would be answered here.
anybody?
-
First of all, they are not Java functions. They are JavaScript functions.
Then, try changing <script language="javascript"> to <script type="text/javascript">. In XHTML, <script> tag doesn't have an attribute called language, only type.
Similar Threads
-
Replies: 5
Last Post: 05-06-2006, 10:22 PM
-
By robertmazzo in forum ASP.NET
Replies: 2
Last Post: 01-09-2006, 02:45 PM
-
By Keith Sarver in forum Web
Replies: 0
Last Post: 12-14-2002, 02:18 PM
-
By Jane L in forum Architecture and Design
Replies: 1
Last Post: 06-29-2002, 01:50 AM
-
By Murray Foxcroft in forum Web
Replies: 5
Last Post: 11-02-2000, 02:42 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks