File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes !DOCTYPE and function refreshIt() not working together Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "!DOCTYPE and function refreshIt() not working together" Watch "!DOCTYPE and function refreshIt() not working together" New topic
Author

!DOCTYPE and function refreshIt() not working together

Rolf Hicker
Greenhorn

Joined: Mar 13, 2006
Posts: 6
Hi,

I�m new, just as a warning to start with. We have one problem we can�t figure out.

If we have a !DOCTYPE at the start of the page - as it is supposed to be, our function is not working at all:

function refreshIt()

alert("alert"+form1.select.value);
window.location.href = form1.select.value + "-cat.htm";


as soon as we remove the !DOCTYPE everything works fine - is there any way around this problem? I really would like to have validated webpages.

Appreciate your comments
thanks
R
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14670
    
  11

there should not be any problem.
How did you write the doctype ?
(note that there is a forum called HTML/Javascript)


[My Blog]
All roads lead to JavaRanch
Rolf Hicker
Greenhorn

Joined: Mar 13, 2006
Posts: 6
this is what we used:

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

+ metatags etc.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14670
    
  11

Please read 4.8 Script and Style elements for XHTML:
http://www.w3.org/TR/xhtml1/#h-4.8

And please read the Naming Policy and change your name. Thank you
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56168
    
  13

"wildnis",

Satou is correct about your display name.

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56168
    
  13

Also, this forum is for JSP questions, not javascript. Please take the time to post your question in the proper forum.

Moved to the HTML forum.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: !DOCTYPE and function refreshIt() not working together
 
Similar Threads
ajax:Callback function not being called for every readystate change for first request
!DOCTYPE and function refreshIt() not working together
ajax:callback function not called for every readystatechange of the request
JSF Issue not getting Values in Backing Bean
Page Bean not setting text property