LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-29-2010, 03:50 AM   #1
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 833

Rep: Reputation: 35
Do I have a path problem, an Apache2 problem or a Javascript problem or any other pro


I have an unusual site that uses "frames". Beside frames for navigation (at the top), 2 frames (named "pane_l" and "pane_r" for left pane and right pane) are used for content and the site is multilingual.
The "index.htm" is a pure HTML frameset document that loads the same pure HTML form in each of these panes (main_prog_l.htm and main_prog_r.htm), this form asks the visitor through 'radio' buttons to select a language, by name from one pane or by flag from the other pane.

The first one to be selected (Submitted) calls a CGI that construct a path to the pages of the site and display splash pages in both panes in the wanted language through included javascript code and this is where I am having problems, I cannot find how to make a path that works.

The way these panes are changed in the wanted language is as follows:
a CGI programs (lingo_l.cgi or lingo_r.cgi) is called and returns a HTML script that is displayed in the same pane, javascript code in this HTML calls another CGI script to change the other pane.

The difference between these CGI programs is:
if the language is selected from "pane_l", "lingo_l.cgi" replaces "pane_l" with "splash_l" and calls (through javascript function) "pan_r.cgi" to replace "pane_r" with "splash_r".
if the language is selected from "pane_r", "lingo_r.cgi" replaces "pane_r" with "splash_r" and calls (through javascript function) "pan_l.cgi" to replace "pane_l" with "splash_l".

If document root is '/first_dir/second_dir/' and 'main_prog_l.htm' and 'main_prog_r.htm' are in the root directory, finding and executing these with a path as "main_prog_?.htm" works correctly but pressing "Continue." (Submit) in any triggers 'action="en/lingo_l.cgi"' (English directory) in the form to make the path "/first_dir/second_dir/en/lingo_l.cgi", this gives the following errors in apache2 error.log:
. . File does not exist: /first_dir/second_dir/en/en, referer: http://127.0.0.1/en/lingol.cgi
. . File does not exist: /first_dir/second_dir/en/en, referer: http://127.0.0.1/en/panr.cgi
If the "en/" is remove from all paths in these 'referers, Apache2 gets into an endless loop and I get the screen flickering the correct rendering on and off of files for which it does not have the correct path with a message at the bottom of the screen saying: "waiting for 127.0.0.1. .", the error log says: ". . File does not exist: /first_dir/second_dir/favicon.ico"

The problem mentionned above happens when testing on the same machine containing the server.
All the CGI scripts are preceded by the correct header (Content-type: text/html) and 2 new lines as required, followed by the HTML code to return, there is no messages in the error log in that respect.
All generated HTML code is tested and found valid at http://validator/w3c.
I have javascript debugger on and, after a few initial mistakes, there is no more error messages popping up.

Schematically, it goes like this:
. . . . . . . . . . . . . . . .index.htm (html frameset)
. . . . . . . . . . . . . . . . . . . . . v
. . . . . . . . . . . . . . . . . . . .v. . . v
. . . . . . . . . . . . . . . . . . v. . . . . . v
. . . . . . . . . . . . . . . . .v. . . . . . . . . v
. . . . . . . . . . . . . . . v. . . . . . . . . . . . v
. . . . . . . . . . . . . .v. . . . . . . . . . . . . . . v
. . . . . . . . . . . . v. . . . . . . . . . . . . . . . . . v
. . . . . . . . .in pane_l. . . . . . . . . . . . . . . . . in pane_r
. . . . . . main_prog_l.htm. . . . . . . . . . . . . . main_prog_r.htm (both pure html)
. . . . . . . . . v. . . . . . . . . . . . . . . . . . . . . . v
. . . . . . . . . v. . . . . . . . . . . . . . . . . . . . . . v
. . . . . . if selected. . . . . . . . . . . . . . . . . . . . v
. . . . . . ===========. . . . . . . . . . . . . . . . . . . . v
. . . . . . . . . v. . . . . . . . . . . . . . . . . . . . . . v
. . . . . . . . . v. . . . . . . . . . . . . . . . . . . . . . v
. . . . . . lingo_l.cgi (renders 'splash_l' HTML+js). . . . . .v
. . . . . . . . . v. . . . . . . . . . . . . . . . . . . . . . v
. . . . . . . . . v. . . . . . . . . . . . . . . . . . . . . . v
. . . . . . pane_r.cgi (renders 'splash_r'). . . . . . . . . .v
. . . . . . continued. . . . . . . . . . . . . . . . . . . . . v
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .v
. . . . . . . . . . . . . . . . . . . . . . . . . . . .if selected
. . . . . . . . . . . . . . . . . . . . . . . . . . . .===========
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .v
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .v
. . . . . . . . . . . . . . . . . . . . . . . . . . . .lingo_r.cgi (renders 'splash_r' HTML+js)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .v
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .v
. . . . . . . . . . . . . . . . . . . . . . . . . . . .pane_l.cgi (renders 'splash_l')
. . . . . . . . . . . . . . . . . . . . . . . . . . . .continue


Hope this makes sense.

Any help or hint most welcome.

Thank you for your help.

Last edited by rblampain; 12-29-2010 at 04:05 AM. Reason: presentation
 
  


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
[SOLVED] Javascript problem J_Szucs Programming 2 06-21-2010 11:41 AM
javascript problem with IE alitrix Programming 9 05-31-2006 10:14 PM
Interesting Video Problem with ATI Radeon 9800 Pro (not a 3D accel based problem) binarynova Linux - Hardware 1 08-27-2005 09:49 PM
Javascript in Linux problem? BajaNick Linux - Software 5 10-20-2003 12:41 PM
Elinks: javascript problem ashesh Linux - General 1 07-21-2003 02:06 AM


All times are GMT -5. The time now is 03:19 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