FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Javascript links.
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Javascript links. [message #17324] Thu, 25 March 2004 17:00 Go to next message
mocara is currently offline  mocara   United Kingdom
Messages: 157
Registered: January 2004
Karma: 0
Senior Member
Hi,
on posting a new message if I click on [Create Poll] or [Show all Smilies] I get a popup when (small) with a copy of the new message creation page inside. Obviously this is a javascript problem. Any ideas?


Pais.
Re: Javascript links. [message #17325 is a reply to message #17324] Thu, 25 March 2004 17:19 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
What browser are you using?

Works fine in all of the browsers I have access to. Plus I never heard of such a problem before, so I think this is an issue with your browser.


FUDforum Core Developer
Re: Javascript links. [message #17326 is a reply to message #17324] Thu, 25 March 2004 18:00 Go to previous messageGo to next message
mocara is currently offline  mocara   United Kingdom
Messages: 157
Registered: January 2004
Karma: 0
Senior Member
This is in IE, but not a problem in firefox.
The only difference between the source for this post page and the one on my site is that I have path_info instead of the default template.

So here we have
Quote:

onClick="javascript: window_open('index.php?t=poll&rid=1299&SQ=72a1f8bff2bc44cbd ac0685082c868ae&frm_id=16', 'poll_creator', 400, 300);">


And I have
Quote:

onClick="javascript: window_open('index.php/po/4/?SQ=0a799e6ae04cb97bc0275cdcfbc6a225', 'poll_creator', 400, 300);">


Pais.

[Updated on: Thu, 25 March 2004 18:02]

Report message to a moderator

Re: Javascript links. [message #17327 is a reply to message #17326] Thu, 25 March 2004 19:49 Go to previous messageGo to next message
mocara is currently offline  mocara   United Kingdom
Messages: 157
Registered: January 2004
Karma: 0
Senior Member
Think I have it.

Becaue we are using slashes, it thinks the current directory is /index.php/r/frm_id/2/

So in my case I changed the javascript lib.js to say

window.open("/newforum/"+ url,winName,options);

I realiase this is a clumsy hack, but it works for now Wink


Pais.
Re: Javascript links. [message #17328 is a reply to message #17327] Thu, 25 March 2004 19:54 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I'll try to replicate the problem in IE in a few days,
but I have not seen reports of such a problem with IE.
Re: Javascript links. [message #17709 is a reply to message #17328] Tue, 13 April 2004 15:43 Go to previous messageGo to next message
treebeard is currently offline  treebeard   United States
Messages: 44
Registered: April 2004
Location: Huge Universe
Karma: 0
Member
I've been experiencing this same problem, which I noticed in particular with the Change Passwords link on the Profile page and the Move Topic link on the Thread page, where instead of the change password popup or the list of forum destinations for the topic move, the calling page is loaded in the popup window. Interestingly, I've gotten this result on Windows XP/IE 6.0 and Windows 2000/IE 5.5 (and have heard from a few members of our community that they have had the same problems, though without specifying their platform/browser); however, on Mac OSX/IE 5.2 and Windows XP/Firebird .07 the behavior is as expected (iow, the proper target page is loaded in the popup). In both cases, I tracked it down to the javascript onClick event calling the popup window, so I was fascinated by mocara's explanation.

However, mocara's solution--adding "/newforum/"+ to the lib.js for window.open--didn't quite work; while I no longer got the calling page reloaded in the popup window, I instead got a 404 error, page not found. So the variable "/newforum/" isn't returning the correct forum path, but it is eliminating the problem of the index.php being considered the root.

I'm going to keep looking into this, but any and all suggestions are welcome. As Ilia knows, we have a customized install of three FUD forums running against a single shared database (with merge tables for the 2nd and 3rd forums). We want to use path_info, but as our user base is about 75% IE on Windows (whose isn't, unless you're a Mac-oriented site?), we have to be sure these links work correctly.
Re: Javascript links. [message #17710 is a reply to message #17709] Tue, 13 April 2004 16:20 Go to previous messageGo to next message
mocara is currently offline  mocara   United Kingdom
Messages: 157
Registered: January 2004
Karma: 0
Senior Member
I'm assuming you are replacing /newforum/ with the directory name where your fud is installed? I know that sounds silly, but I thought I'd check Smile


Pais.

[Updated on: Tue, 13 April 2004 16:20]

Report message to a moderator

Re: Javascript links. [message #17712 is a reply to message #17710] Tue, 13 April 2004 18:04 Go to previous messageGo to next message
treebeard is currently offline  treebeard   United States
Messages: 44
Registered: April 2004
Location: Huge Universe
Karma: 0
Member
Well, I am sometimes guilty of being overly literal, but yes, I did. I also tried it with "/newforum/" just for kicks, but in both cases I get the 404 error.

If you feel like taking a look, the url is http://srforums.prosoundweb.com/
Re: Javascript links. [message #17714 is a reply to message #17709] Tue, 13 April 2004 18:48 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fixed in CVS.
Re: Javascript links. [message #17717 is a reply to message #17714] Tue, 13 April 2004 19:15 Go to previous messageGo to next message
treebeard is currently offline  treebeard   United States
Messages: 44
Registered: April 2004
Location: Huge Universe
Karma: 0
Member
Thanks, Ilia. How do I access CVS?
Re: Javascript links. [message #17719 is a reply to message #17717] Tue, 13 April 2004 19:23 Go to previous messageGo to next message
mocara is currently offline  mocara   United Kingdom
Messages: 157
Registered: January 2004
Karma: 0
Senior Member
Hello.

Looking at your site now, you haven't changed your lib.js.
In your case surely it should be.

window.open("/"+ url,winName,options);


No?

Pais.
Re: Javascript links. [message #17720 is a reply to message #17719] Tue, 13 April 2004 19:26 Go to previous messageGo to next message
treebeard is currently offline  treebeard   United States
Messages: 44
Registered: April 2004
Location: Huge Universe
Karma: 0
Member
Actually, I changed it, then changed it back since the fix didn't work and I didn't want to be generating 404 errors. Curse me for a novice, but I didn't try "/"+ ... I'll give that a shot now.

Hey, that seems to have done the trick!

Thanks for the help!

[Updated on: Tue, 13 April 2004 19:34]

Report message to a moderator

Re: Javascript links. [message #17722 is a reply to message #17717] Tue, 13 April 2004 19:50 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
http://cvs.prohost.org/c/index.cgi/FUDforum/timeline
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: fud in egroupware -- mcrypt problem
Next Topic: Corrupt Archive v2.6
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 18:10:25 GMT 2024

Total time taken to generate the page: 0.02159 seconds