LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-04-2006, 11:38 AM   #1
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Rep: Reputation: 15
Unhappy javascript change div position?


hi all

got a small problem i manged to get the positions changed of the div tags, it works perfectly on opera but not firefox, any ideas why?

here is my javascript:

Code:
function anime1(anime) {
//10 secs delay
setTimeout('anime()',10000)
}
function anime(a) {

//get div elemnts
document.getElementById("a").style.top=370;
document.getElementById("b").style.top=390;
document.getElementById("c").style.top=410;
document.getElementById("c2").style.top=250;
document.getElementById("d").style.top=350;
document.getElementById("e").style.top=430;
document.getElementById("f").style.top=270;
document.getElementById("g").style.top=310;
document.getElementById("h").style.top=290;
document.getElementById("i").style.top=330;
document.getElementById("j").style.top=450;

}
the webdeveloper extension is giving me this javascript error:

Error: Error in parsing value for property 'top'. Declaration dropped.

thanks for looking and ur time

Last edited by ati; 05-04-2006 at 11:55 AM.
 
Old 05-04-2006, 01:06 PM   #2
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Original Poster
Rep: Reputation: 15
i have slightly improved the code to see if that would do anything, but no opera still renders it and firefox dont. any ideas would be very grateful.


Code:
function anime1(anime) {
//10 secs delay
setTimeout('anime()',10000)
}
function anime(a) {



document.getElementById("a").style.top = "370 px";
document.getElementById("b").style.top = "390 px";
document.getElementById("c").style.top = "410 px";
document.getElementById("c2").style.top = "250 px";
document.getElementById("d").style.top = "350 px";
document.getElementById("e").style.top = "430 px";
document.getElementById("f").style.top= "270 px";
document.getElementById("g").style.top= "310 px";
document.getElementById("h").style.top= "290 px";
document.getElementById("i").style.top= "330 px";
document.getElementById("j").style.top= "450 px";

}
 
Old 05-04-2006, 01:31 PM   #3
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Original Poster
Rep: Reputation: 15
http://img421.imageshack.us/my.php?i...titled15ro.gif


below is the foloowing error in firefox

thanks

Last edited by ati; 05-04-2006 at 01:36 PM.
 
Old 05-05-2006, 03:29 AM   #4
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Original Poster
Rep: Reputation: 15
thanks you all for lloking i managed to fix it was few syntax errors
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change default position of the X cursor or get rid of it!!! thebover Linux - Software 2 04-30-2009 12:47 AM
Reset the HTML content of a div with javascript phil.d.g Programming 5 02-14-2006 02:29 AM
Discovering position of an element in JavaScript Napalm Llama Programming 4 09-07-2005 03:59 PM
Javascript : <div> d4d4n9 Linux - Newbie 4 01-26-2004 08:36 PM
Change screen position through Linux theteenager Linux - Hardware 5 07-03-2003 10:52 AM


All times are GMT -5. The time now is 04:04 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration