If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jan 2009
    Member #
    I have spent numerous hours trying to solve this but unsuccessful and hope someone shall find interest to debug this issue.

    I am using
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

    as doc type and using simple javascript to move a <div> item. It works fine with IE but with firefox the javascript just won't buzz. Ofcourse I have tried with diff doc type but same result. And i dont' think javascript has problem either because if i remove the doc type and try it on firefox, the div does move as desired.

    here is the html code, which is pretty simple.
    I am testing this on my local server( haven't tried it on actual server, may be that is the reason since the ddt url is present in doc type? but when i tested I am connected to internet so the doc type url shouldn't be a problem i suppose?)
    Following code is also validated and passes with
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
    <html >
     <title>Gaijatra &bull; An Open Platform for All</title>
     <script type="text/javascript">
     function GetObj(id)
      return document.getElementById(id);  
     function MoveTo(id,x,y)
      obj = GetObj(id) = x; = y;
    <body >
    <div style="width:400px; height:300px; background:#efefefl">
     <div id="me" style="position:relative;width:100px; height:10px; left:20px; top:20px; background:#ff0000;">
    <a href="javascript:MoveTo('me', 30,50);">move</a>


  3. #2
    Senior Member jyuill's Avatar
    Join Date
    Jan 2009
    Member #
    Your DOCTYPE specifies both Transitional and loose.
    You have

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//
    EN" "">

    Change the loose to transitional, or vice versa.
    Semantic, Valid, and Accessible Design!

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 01:50 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: