Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-19-2005, 08:43 AM
|
#1
|
LQ Newbie
Registered: May 2005
Posts: 4
Rep:
|
Linux and JavaScript popup problem
I am building a simple web page, and I have one uses who uses firefox and Linix. Non of my javaScript is working for him. For example, this link should pop up a new window, but does not for him. It's very basic javaScript, and I'm wondering if there is anything I should know b/c it's Linux.
<A HREF="#" onclick="javascript penWindow(content='../includes/repHelpEE.cfm?id=4')">How do I correct my balances?</A>
function openWindow(content)
{
PopUp=window.open(content,"PopUp","width=600,height=325,scrollbars=1,toolbar=0,menubar=0,top=0,left= 300,");
PopUp.focus();
}
|
|
|
05-19-2005, 09:02 AM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Perhaps its blocking it cause he has popups disabled? I've seen some javascript do such things where Firefox is thinking its an unrequested popup. Or he simply doesn't have javascript enabled in his browser.
|
|
|
05-19-2005, 09:12 AM
|
#3
|
LQ Newbie
Registered: May 2005
Posts: 4
Original Poster
Rep:
|
I asked and he said javaScript is enabled, and he doesn't have a popUp blocker.
|
|
|
05-19-2005, 09:16 AM
|
#4
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Quote:
Originally posted by turk99
I asked and he said javaScript is enabled, and he doesn't have a popUp blocker.
|
Firefox has a built-in popup blocker..
|
|
|
05-19-2005, 09:20 AM
|
#5
|
LQ Newbie
Registered: May 2005
Posts: 4
Original Poster
Rep:
|
right, but he said it's disabled.
there is also some additional javaScript that isn't working. for example, form validations. Basic stuff to make sure there are no blank fields.
everything is fine on IE, Netscape, Mozilla, Camino, Firfox, Mac and XP. UGH!
|
|
|
05-19-2005, 09:31 AM
|
#6
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Quote:
Originally posted by turk99
everything is fine on IE, Netscape, Mozilla, Camino, Firfox, Mac and XP. UGH!
|
If you've tested it but it doesn't work on his and only his.. something wrong with his browser.. so its something he should worry about. Perhaps he should test it with a different browser on his machine.. but I wouldn't let one machine worry you.. if you provide a link, I'm sure dozens here would test it for you..
|
|
|
05-19-2005, 10:20 AM
|
#7
|
LQ Newbie
Registered: May 2005
Posts: 4
Original Poster
Rep:
|
Not knowing anything about Linux, does it handle javaScripting more stringently than other OS's and browsers.
For example, I have a variable that is set to either a number or nothing, do you think that would trip it up.
sometimes it's this:
var vacation = 12;
and sometimes it's this:
var vacation = ;
|
|
|
05-19-2005, 10:23 AM
|
#8
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
At times. IE is the worst to comply with the w3c standards for web pages and development. Something that might work in IE since it renders everything and usually renders it when it shouldn't usually won't work in the browsers that comply with these standards, like every other browser besides IE. Can you tell, I hate IE..
|
|
|
05-19-2005, 10:44 AM
|
#9
|
Senior Member
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897
Rep:
|
Re: Linux and JavaScript popup problem
Quote:
Originally posted by turk99 <A HREF="#" onclick="javascriptpenWindow(content='../includes/repHelpEE.cfm?id=4')">How do I correct my balances?</A>
function openWindow(content)
{
PopUp=window.open(content,"PopUp","width=600,height=325,scrollbars=1,toolbar=0,menubar=0,top=0,left= 300,");
PopUp.focus();
}
|
From my experience, Gecko's handling (Firefox, Mozilla, Ns7+...) of Javascript is the best available.
If you'll permit, I think href="#" is a bad habit. It is meaningless, and I've seen this kind of URL badly handled by some browsers. I usually had better luck with href="javascript :void()". But none of the two is the perfect solution, though. There just shouldn't be a href at all, or it should at least be empty, but I'm not sure most browsers would appreciate that
I don't know if this will solve your problem, but it's worth a try...
Yves.
[edit:]I don't understand! I tried editing this post twice, but the ONE-WORD "javascript" above keeps breaking into two words! It should read: "javascript :void()" all without any space at all.[/edit]
Last edited by theYinYeti; 05-19-2005 at 10:47 AM.
|
|
|
All times are GMT -5. The time now is 10:40 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|