Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help!!! URL Ref in CGI

Status
Not open for further replies.

Kijori

Technical User
Jan 22, 2002
67
SG
hi again. i need to know what to put in the frame src of a html page generated by CGI.

here is my code for frameset creation...

sub printFrame {

print $q->header();

print <<End;

<html><head><title>Test Frames</title></head>

<frameset cols=&quot;40%,*&quot;>

<frame src=&quot;???&quot; name=&quot;navi&quot;>

<frame src=&quot;???&quot; name=&quot;target&quot;>

</frameset>

</html>
End

exit(0);
}

i want to display &quot;contents.htm&quot; in the navi frame and &quot;main.htm&quot; in the target frame. the files are located at a different folder from the &quot;frames.cgi&quot; script. for example...

C:\Apache\cgi-bin\Test\frames.cgi
C:\Apache\htmldocs\Test\contents.htm
C:\Apache\htmldocs\Test\main.htm

do you put the full path in the src value like (htmldocs is set to be the web page server folder in Apache) or just ../Test/contents.htm ???

i tried both ways... and it's a no-go. help!!!
 
src=&quot;/cgi-bin/Test/...&quot;
src=&quot;/Test/main.html&quot;

 
Either way should work using the or the /Test/main.html.

The difference is that one is relative to the rooturl and the other is an absolute url. Using relative paths makes the code more portable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top