Changing Doctype From Strict To Transitional Stops Script?

Oct 12, 2010

1- I have a Tabs list (Services/Solutions/Internal...) in below website which has been done using Javascript.

[URL]

Now if I change the Doctype from Strict to Transitional the javascript ceases to work correctly (and I was not able to find why).

See here:

[URL]

2- I need the Transitional doctype because my language menu does not work with Strict!!! and I guess fixing the Javascript might be easier than that.

What is the problem? What should I do to avoid such problems? (I guess I prefer strict type XML documents).

View 3 Replies


ADVERTISEMENT

Update JS To Work With A Strict DOCTYPE

Nov 16, 2006

I am now using a strict !DOCTYPE and want to ensure that my pages comply. The Javascript I used to use no longer works - how can I seperate it from the structure of the page?

<input name="rdo1" id="rdo12" type="radio" checked="checked" value="didnt"

<textarea name="txtarea1" id="txtarea1" cols="20" rows="5">

<script type="text/javascript">

/*
Clear default form value
*/

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}
</script>

View 3 Replies View Related

Doctype Stops This Js From Functioning In Ie?

Sep 25, 2011

This <div> layer positioned always at bottom left of the screen on scrolling (and calling some code from labpixies) works well in non-ie browsers, but in ie it requires the omission of the doctype declaration. Why? Is it possible to fix it so that it works with the doctype in ie?

<!doctype html>
<html lang="en">
<head>
<title></title>
</head>

[Code]...

View 8 Replies View Related

HTML 4.01 Transitional Validation

May 15, 2006

A page including the code fragment below works - in FF - but HTML 4.01
Transitional validation tells me:

"document type does not allow element "SCRIPT" here"

<SELECT id="light" >
<SCRIPT type="text/javascript">
for (j=0;j<9;j++) {document.write("<OPTION VALUE='" + j + "'>
" + (j + 1) ) } ;
</SCRIPT>
</SELECT>

View 8 Replies View Related

Validation (xhtml 1.0 Transitional) Element Marquee Is Not Supported

Dec 15, 2009

// This is asp.net snippet
<marquee id="marqueeLeft" class="marqueestyle" direction="up" onmouseout="this.start();" onmouseover="this.stop();"
scrolldelay="500" style="height: 99px; width: 100%;" >
<asp:PlaceHolder ID="LeftPlaceHolder" runat="server"></asp:PlaceHolder>
</marquee>

When I moved the pointer to this <marquee> tag. It shows the error message "Validation (xhtml 1.0 transitional) element marquee is not supported". When i run my web app it runs successfully but it gives jscript error as System.Argument Exception as value for controls and behaviors must not be null.

View 8 Replies View Related

Javascript In Xhtml Strict

Jul 11, 2002

does anyone know of any sites that use (validating) xhtml strict, and also use javascript functions - rollovers etc?

(the strict dtd won't allow you to use the "name" attribute, in images, so I want to find out what the solution is to this problem)

View 4 Replies View Related

Select An Element In A Form Using Xhtml Strict

Dec 19, 2004

I am coding xhtml strict for my pages for the first time and I got some one problem with javascript:

I don't know how to modify the scripts to target elements on the page where the name attribute is deprecated.

Eg.

Code:

<form action="test.php" method="post">
<div><input name="text" />
<input type="submit" name="submit" value="search" /></div>
</form>
how can I modify the code to select such fild in such form ?

The following one is not working:

document.form.text.focus();

View 8 Replies View Related

XHTML Strict Validation For Custom Attributes?

May 1, 2010

how I can get my custom attributes to validate in XHTML Strict? I have to have it validate as it is for a class.Example of the form:

HTML Code:
input onkeyup="TF_filterTable(document.getElementById('dataTable'), filter)" size="40" tf_colkey="name"tf_searchtype="substring" />
Example of the JS:

Code:
var inputs = frm.getElementsByTagName("INPUT");
for (var i=0;i<inputs.length;i++)
{ //looping thru all INPUT elements[code].........

View 2 Replies View Related

Field Validator, With Inputs In Two Different Divisions. XHTML Strict?

Aug 10, 2009

I am using a javascript to validate that all form fields are filled in here:[URL].. The form input fields in the top div can be validated no problem. However, when I add to the javascript, this section of code:

Code:
if (document.forms['secondform'].firstname.value=="") {
themessage = themessage + " - First Name
";
}

And so on for the next few input boxes, the javascript stops working entirely, passing the user onto the next page without actually validating the fields. I feel it is because I am not calling the input boxes correctly in the javascript, but I am unsure how to do it.

I was thinking that maybe because they are in a different division if I added that in there somewhere I could get it clear up, but no such luck yet.

View 3 Replies View Related

Adsense Doesn't Show Up On XHTML 1.0 Strict Website / Fix It?

May 10, 2009

Adsense ads are not working on a site with XHTML 1.0 Strict doctype which is served as text/html. Any ideas what could be the problem?

One more thing, the ads show up on my localhost properly.

View 5 Replies View Related

Expand / Collapse At Vendor Level Fails With XHMTL Strict 1.0 And IE 7

Aug 25, 2010

I was able to achieve Collapsing/Expand at Project Level but not at the vendor level. However, same HTML works fine with IE 8 and FF. The Expand/Collapse at the Vendor Level fails with XHMTL Strict 1.0 and IE 7.

View 1 Replies View Related

Which Is The Best DOCTYPE To Use ?

Jan 5, 2011

which is the best DOCTYPE to use with JavaScript?Just validating now and its telling me that the<body onLoad="startclock()"> onLoad attribute is not supported....

View 6 Replies View Related

Doctype Killing JS In IE?

Dec 9, 2011

I was roughing out a feature I want to add to my site in notepad with no doctype declare.I got it just how I wanted, then realized it didn't work in IE. I added a doctype, it validates at xhtml strict, but it killed IE, while it started adding round corners in IE which wasn't working with no doctype...but now my JS isn't working... So I lost functionality of the JS while adding the round corner style that wasnt working when the JS was mostly working...FF works fine every damn way of course....I uploaded it to http://[url]......Also when it was functioning, the lower set of icons background wasn't showing. You can load that link ^^ in FF to see exactly what I'm going for....it works in ff

css:
body {
margin: 0px;[code]....

View 8 Replies View Related

Without DOCTYPE It Works, With It Does Not?

Aug 17, 2010

I have a javascript (snow.js) on my website. Without a DOCTYPE in my HTML it runs in IE, Mozilla and Chrome.Because my mouse-overs (hover) were not working in Chrome I needed to add a DOCTYPE, after it worked (DOCTYPE : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:[url].....).

But my javascipt still works in IE but not in Mozilla and Chrome anymore. This script runs with the following statements after <body> :

<script language="JavaScript" src="snow.js">
</script>

View 6 Replies View Related

DOCTYPE Causes Form To Fail?

Aug 2, 2011

I had to add the following DOCTYPE to a webpage in order for IE to parse my page design properly, and this caused the form on the page to fail in FireFox (which works fine without the doctype). The form works fine in IE.Here is the DOCTYPE I added to the top of the page;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The error log in FireFox says;

frmTest is not defined - Line 30

Here is the block of code it is referring to;

function MoveForward(ipage)[code].........

View 4 Replies View Related

Doctype Declaration Must Be On The Very First Line?

Oct 19, 2010

is it true that the doctype declaration must be on the very first line (there mustn't even be a blank line above it) in order for it to be "working correctly" ?

View 8 Replies View Related

The Doctype Destroys My Javascript

Jan 11, 2005

I use the following script for a scrolling button, it scrolls down with you if you scroll down.

Only one problem, it only works if I don't use any doctype.
If I do, the script stops working.

But without a doctype my CSS is rendered different, so that's not what I want ofcourse.

Somebody got an idea on this one? Code:

View 3 Replies View Related

Firefox, Doctype And Javascript

May 9, 2005

I have a section of Javascript code that works a treat in IE but does nothing in Firefox. If we remove the doctype it appears to work, put the doctype back in and it breaks. We need the doctype to remain in so the page renders correctly cross-browser. Code:

View 2 Replies View Related

Lightbox That Works Without A DOCTYPE?

Apr 5, 2010

For a variety of reasons that I won't currently go into, I need a lightbox script that doesn't rely so heavy on the document's DOCTYPE (Strict, Transitional, etc) and will just work with a page where the DOCTYPE doesn't get assigned.

View 5 Replies View Related

DOCTYPE :: Display A Map With Google Maps?

Aug 27, 2009

I am trying to display a map with Google maps. The code listed below is located at http:[url]....

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">[code]....

I find another example where some uses a CDATA tag, but it still doesn't work. http:[url]...I finally remove the DOCTYPE and it works. http:[url]....My problem is I want the DOCTYPE.

View 4 Replies View Related

DOCTYPE :: Customers Does Not Declare A .dtd Document?

Jul 22, 2009

I have a problem with customer website.My script creates an Auto-Greet that overlays the page, displays in the lower left of the browser and remains visible as the user scrolls the page.

My Mockup the customer home page. This is the desired action.http:[url]....Customer website: (undesired action)http:[url]....The only difference is that my customers does not declare a .dtd document.They have a <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">. On my mock-up, I declare a .dtd document and my script works.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http:[url]...

Question: I'm trying to figure out a way in javacript to dynamically change the <!DOCTYPE, is this possible?

View 1 Replies View Related

Xhtml Doctype And Form Name Attribute?

Aug 21, 2010

I have been attempting to transition to use of xhtml strict doctype andmy text editor, BBEdit (on Mac) tells me, when I ask it to check syntax,that the attribute 'name' is not allowed in form object, as in any otherform element that I tried to use it in. This begs the question, how doI script forms with javascript in the context of this doctype? None ofthe javascript texts I have address this issue (O'Reilly Rhino book andothers).I could figure it out, but it appears to be a complicated process, justdoing getElementById() and sorting it out.Does anyone have a reference to material that deals with this issue?

View 2 Replies View Related

GetDOCTYPE() Function - Get Various Properties Of DOCTYPE

Jun 10, 2009

Without getting into too much history on the why, I came into a situation where I needed to create a function to get various properties of !DOCTYPE so that other functions could adjust to work properly with certain DOCTYPEs (Strict, Transitional, etc.). I have tested the function in the following Windows browsers IE6+ FF3+ Chrome2+ and Safari3+ Opera9+. The only one that I can’t get working is Opera (testing with 9.64). I’m hoping that someone out that has a solution! Here is the code:

[Code]...

View 3 Replies View Related

Floating Menu Doctype Problem

Apr 18, 2006

I am trying to implement a floating menu with a strict doctype for HTML 4.01.

I have got it working without the doctype but as soon as I insert the doctype line it just falls flat on it's face, anyone know of a working floating menu for this situation?

View 2 Replies View Related

Loaded XML File Failing Due To Doctype Tag

Aug 30, 2011

I have an XML file that I'm trying to load into and xml object, however the doctype tag is killing the javascript, and does not parse the XML at all. If I remove the doctype, the javascript can parse, and I can access the XML DOM. So I know the XML is valid. Even with the Doctype, it validates. However Javascript does not like it. I don't have a choice to remove the Doctype tag of the XML.

If I remove the Doctype, this method works to parse the XML DOM:
Code:
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.load(filename);

Also, if I use the .open method to retrieve the XML, I cannot access the XML DOM via xmlhttp.responseXML. But I do get a result when I use xmlhttp.responseText, it displays the corresponding XML.
Code:
xmlhttp.open("GET", filename, false);

View 1 Replies View Related

Adding Doctype Removes Table?

Dec 15, 2010

I have a simple page that uses ajax, php, mysql to get database entries and displays them in a table by a limited number of results.

ie. it only shows 10 entries at a time.

Anyways, as soon as I had ANY DOCTYPE to the document, the table no longer shows up in Firefox. It will how ever show up in IE8 or if I remove the DOCTYPE.

Page WITH DOCTYPE
Page WITHOUT DOCTYPE

What on earth would be causing this? I have validated the page with W3C with VALID markup.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved