LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-06-2009, 06:14 AM   #1
sriphp
Member
 
Registered: Apr 2009
Posts: 48

Rep: Reputation: 15
javascript poblum on fedora


Hai all,

this is srinath.m

in my php file javascript is not funtioning porerly on fedore but in windows it worked sucessfully.

i am using dropdown box using div. it is working in windows but not in fedora

also javascript 'this' operator and object are not working in some areas.

please help me below is my code segment.

<?php

session_start();

?>

<!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" xml:lang="en" lang="en">

<head>

<link rel="stylesheet" type="text/css" href="styles/panelHeading.css" />

<script type="text/javascript">

var dropboxleft=0 //set left position of box (in px)

var dropboxtop=0 //set top position of box (in px)

var dropspeed=15 //set speed of drop animation (larger=faster)

var displaymode="always"



///Don't edit beyond here///////////



if (parseInt(displaymode)!=NaN)

var random_num=Math.floor(Math.random()*displaymode)

var ie=document.all

var dom=document.getElementById



function initboxv2(l,h){



var ob = document.getElementById("mine");

//var l = getxPosition(ob);

//var h = getyPosition(ob);

//alert(l+ " "+h);

//this.get_mouse_pointer_coordinates(e);



this.dropboxleft = this.posx - 202;

this.dropboxtop = this.posy - 171;



if (!dom&&!ie)

return

crossboxcover=(dom)?document.getElementById("dropinboxv2cover") : document.all.dropinboxv2cover

crossbox=(dom)?document.getElementById("dropinboxv2"): document.all.dropinboxv2

scroll_top=(ie)? truebody().scrollTop : window.pageYOffset

crossbox.height=crossbox.offsetHeight

crossboxcover.style.height=parseInt(crossbox.height)+"px"

crossbox.style.top=crossbox.height*(-1)+"px"

crossboxcover.style.left=dropboxleft+"px"

crossboxcover.style.top=dropboxtop+"px"

crossboxcover.style.visibility=(dom||ie)? "visible" : "show"

dropstart=setInterval("dropinv2()",50)

}



function dropinv2(){

scroll_top=(ie)? truebody().scrollTop : window.pageYOffset

if (parseInt(crossbox.style.top)<0){

crossboxcover.style.top=scroll_top+dropboxtop+"px"

crossbox.style.top=parseInt(crossbox.style.top)+dropspeed+"px"

}

else{

clearInterval(dropstart)

crossbox.style.top=0

}

}



function dismissboxv2(){

if (window.dropstart) clearInterval(dropstart)

crossboxcover.style.visibility="hidden"

}



function truebody(){

return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body

}



function get_cookie(Name) {

var search = Name + "="

var returnvalue = ""

if (document.cookie.length > 0) {

offset = document.cookie.indexOf(search)

if (offset != -1) {

offset += search.length

end = document.cookie.indexOf(";", offset)

if (end == -1)

end = document.cookie.length;

returnvalue=unescape(document.cookie.substring(offset, end))

}

}

return returnvalue;

}

function posit(evt)

{ if (!evt) evt = window.event;this.posx = evt.clientX; this.posy = evt.clientY;}


</script>
</head>
<body>

<table><tr><td>

<table id="tblLower"><tr><td><font style="font-size:8pt"><b>Select</b></font></td>

</tr></table></td><td>

<div id='mine' class='dropheadlink' onmouseup='posit(this.event);' onclick='initboxv2(482,238);'><script type="text/javascript">this.mine.innerHTML = this.comboTitle("More Options&nbsp;"+"<img style='vertical-align:text-top;' src='images/simbol2.jpg'>");</script></div>

</td></tr></table>

<div id="dropinboxv2cover">

<div id="dropinboxv2">

<div id="more">More Actions</div>

<div id="delete" onClick="javascript: oMailbox.checkSelectOptions('1');dismissboxv2();return false">Delete</div>

<div id="masread" onClick="javascript: oMailbox.checkSelectOptions('2');dismissboxv2();return false">Mark As Read</div>

<div id="masunread" onClick="javascript: oMailbox.checkSelectOptions('3');dismissboxv2();return false">Mark As UnRead</div>

<div id="adstar" onClick="javascript: oMailbox.checkSelectOptions('4');dismissboxv2();return false">Add Star</div>

<div id="masunstar" onClick="javascript: oMailbox.checkSelectOptions('5');dismissboxv2();return false">Remove Star</div><br>

<div style="text-align: center;width:90px;"><a href="#" onClick="dismissboxv2();return false"><img border="0" src="images/close2.jpg"></a></div><br>

</div>

</div>

</body>

in external panelHeading.css file css rules are like

.dropheadlink

{

text-decoration: none;

position: relative;

}
 
Old 05-06-2009, 06:27 AM   #2
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Rep: Reputation: 51
I can see lots of spelling mistakes which everyone associated with this forum and other would find difficult reading.
Can you please perform spell-check in Open Office org?
 
Old 05-06-2009, 06:43 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Did you check it on windows using IE or with firefox? Javascript is client side and hence dependent on client browser. I have seen this issue arising a lot of times.
If you are running FireFox on Fedora, then cross check if you have got noscript plugin installed? If it is installed then disable it for time being and then recheck it.
 
Old 05-06-2009, 07:55 AM   #4
sriphp
Member
 
Registered: Apr 2009
Posts: 48

Original Poster
Rep: Reputation: 15
javascript problum on fedora

hai,

yes i am using fire fox on fedora

in windows IE it is working

where to cross check noscript plugin installed or not

please tell me i will try

Thanks
Srinath.M
 
Old 05-06-2009, 09:26 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
By default noscript plugin is not installed. But you might just want to be sure that it is not installed. You might also want to search google for browser independent script for your purpose. It might just give you some idea.

Edit:
I asked one of the developers at my office and he confirmed that there are scripts that he has come across that will not run as desired on all the browsers though the script is ok in programmer's view. That may happen if different browsers act differently on same javascript. You can wait for some java expert to come and elaborate on this.

Last edited by linuxlover.chaitanya; 05-06-2009 at 09:29 AM.
 
  


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
Fedora Eclipse IDE PHP/Javascript problem x3m_ia Programming 0 07-23-2007 03:16 AM
Ubuntu Edgy/Firefox 2/Javascript - Firefox closes accessing websites with Javascript Interdictor Ubuntu 8 11-02-2006 12:58 PM
Javascript help darin3200 General 4 09-04-2005 12:58 AM
Javascript maseby Programming 1 04-09-2004 06:16 PM
javascript in <td>? akaash Programming 0 03-18-2004 01:22 AM


All times are GMT -5. The time now is 07:58 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration