Problem with Perl opening in multiple frames

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
WriterSP
-


Joined: 15 Sep 2003
Posts: 3

PostPosted: Thu Oct 09, 2003 6:57 pm    Post subject: Problem with Perl opening in multiple frames Reply with quote

I am generating html from Perl into an html frame page with three frames (Header, Main, Menu), each frame carrying querystring info.

Only the last frame (bottom, Menu) loads successfully; the other two give the standard "file/page not found" error blanks. This routine works fine on my website (and the other routines also), but not on my local standalone PC running Abyss.

Is there a configuration setting I must change in Abyss to work with multiple frames and Perl? For what other possible reasons might this be occuring?

Help, anyone!
WriterSP@hotmail.com
Back to top View user's profile Send private message Send e-mail
JohnC
-


Joined: 09 Oct 2003
Posts: 34

PostPosted: Fri Oct 10, 2003 12:16 am    Post subject: Reply with quote

I have done some work recently with QueryString on local machines (from harddrive, not in Abyss). I found that IE does NOT like Querystring in URLs with location protocol file:// - at least IE5 and IE5.5 have this bug.

What I found was that if you load ANY web page locally (ie: using file protocol) and that URL has querystring on it, IE can't find the page ! You can demonstrate this by making a URL shortcut (on your desktop or elsewhere) to any existing local (save on your harddrive, not the server) html page. Then Rclick->Properties on the shortcut, edit it and add "?test=test" onto the end of the path. Then try using the shortcut.

What I was trying to do was use querystring to pass information TO the webpage - kinda like "parameters" (bit hard to explain why). Anyway, I ended up having to use a different method, since there was no way I could get it to work offline (and this was always to be an offline application, never to be upladed to a server)

If you were loading your frameset using file protocol URLs, it might be causing the problem. You can check pretty easily if this "bug" is causing the problem :

Load up your frameset and wait till you get the "file/page not found" error blanks. Then, Right-click on those error frames and choose Properties. Look at the Protocol and URL in the popup message. Youi should be able to "troubleshoot" what is happening from that...

Either IE is causing your problem (as I describe above) - or if the URL is using http: protocol, then whatever generated the frameset (either you using plain HTML or a CGI/Perl writing the <FRAME... tags) is creating a malformed url OR somehow setting a file: location for the frame. This MIGHT happen if you are testing locally, but using relative paths.

Hope that helps a bit - I dunno if this is what is causing it, and it's pretty hard to explain - if it makes no sense, carefully type out the URL from the Rclick > properties on each (failed) frame and post it up here.

JC
Back to top View user's profile Send private message
WriterSP
-


Joined: 15 Sep 2003
Posts: 3

PostPosted: Sat Oct 11, 2003 1:41 am    Post subject: Reply with quote

Thank you. I knew there had to be some quirk in the server or browser; I'll look into this further--per your information--and let you know what I turn up. Hopefully, once the problem is identified, I can offer a workable solution for anyone else who might be having this difficulty.
Again, thanks.

Yours truly,
Steve Pool
Back to top View user's profile Send private message Send e-mail
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Oct 12, 2003 4:54 pm    Post subject: Reply with quote

WriterSP;

We don't really understand how you're accessing your files locally. If you use file:// URLs, this won't invoke the web server. It will instruct IE to get the files directly from the hard disk.

To invoke the web server locally, browse http://127.0.0.1/ . By the way, check also if your frames doesn't have absolute URLs that work on your other site but fail locally.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
WriterSP
-


Joined: 15 Sep 2003
Posts: 3

PostPosted: Mon Oct 13, 2003 5:10 am    Post subject: Reply with quote

First, I'm running Abyss on my standalone PC; this was to utilize the script-handling capability to work on my scripts offline.

The routine starts with an htm page in the "public" directory, 'htp://127.0.0.1/Login.html', which redirects via javascript to 'cgi-bin/Login.pl'.

(from hereon, all the files involved are in the cgi-bin subdirectory)

If login is successful, it passes the querystring user info to 'Main.pl' which generates the html frameset instructions:

print "
<FRAMESET FRAMEBORDER=0 BORDER=0 FRAMESPACING=0 ROWS='15%,*'>
<FRAME SRC='Header.pl?$UserName' NAME='Header' SCROLLING=NO>
<FRAMESET FRAMEBORDER=0 BORDER=0 FRAMESPACING=0 ROWS='93%,*'>
<FRAME SRC='Main.pl?$UserName' NAME='Sign-Out'>
<FRAME SRC='Menu.pl?$UserName' NAME='Menu' SCROLLING=NO>
<NOFRAMES>
<BODY>
</BODY>
</html>";

Only the last frame, 'Menu', loads successfully; the 'Header' and 'Main' frames just give the white Windows' "can't open page" error screens. In checking the properties of those two error frames, I see the correct page+querystring address tagged at the end of the error address.

Does this help?
Back to top View user's profile Send private message Send e-mail
JohnC
-


Joined: 09 Oct 2003
Posts: 34

PostPosted: Tue Oct 14, 2003 1:15 am    Post subject: Reply with quote

The information I posted before is wrong, if you are calling the main page via http:\\ protocol rather than file:\\ protocol - the "bug" in IE only affects the file:// protocol

However, I can see a VERY glaring mistake in your code however... you need to fix that before you go any further !

In 'Main.pl' :
Code:
print "
<FRAMESET FRAMEBORDER=0 BORDER=0 FRAMESPACING=0 ROWS='15%,*'>
<FRAME SRC='Header.pl?$UserName' NAME='Header' SCROLLING=NO>
<FRAMESET FRAMEBORDER=0 BORDER=0 FRAMESPACING=0 ROWS='93%,*'>
<FRAME SRC='Main.pl?$UserName' NAME='Sign-Out'>
<FRAME SRC='Menu.pl?$UserName' NAME='Menu' SCROLLING=NO>
<NOFRAMES>
<BODY>
</BODY>
</html>";


You open 2 x FRAMESET tags, and a NOFRAMES tag - but they are never closed ! This is invalid HTML, and it is unlikely that the browser will render it properly ! Close those tags and see if it fixes it !

Also, I can see no need to have a nested frameset either - you are displaying all 3 frames in ROWS - you only need to use nested framesets if you are using a combination of rows and columns (eg: 1 row right across the top, then 2 columns underneath).

You should be able to get same results using something like :
Code:

<FRAMESET FRAMEBORDER=0 BORDER=0 FRAMESPACING=0 ROWS='15%,79%,*'>
<FRAME SRC='Header.pl?$UserName' NAME='Header' SCROLLING=NO>
<FRAME SRC='Main.pl?$UserName' NAME='Sign-Out'>
<FRAME SRC='Menu.pl?$UserName' NAME='Menu' SCROLLING=NO>
</FRAMESET>
<NOFRAMES><H3>You need a frames compatible browser!</NOFRAMES>


I made the 2nd frame 79% because you have it set for 93% of (100-15)=85% - which is about 79%. Also see how I added some NOFRAMES text (only about 0.0001% of users can't do frames, but if you are including the tag, you might as well put something inside it)

Also, the use of ' around HTML attributes usually works but it is more correcter to use " (double quotes). Change your print " and use print qq~ and close it with ~; instead of "; - then you can use double quotes inside there for the HTML tags.

For layout purposes, I suggest that you do NOT use % for the frame sizes, coz it will only look nice on browsers with same screen resolution as you are testing on. Use Absolute values, eg: ROWS='60,*,20'

Hope that helps, JC
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group