Solved

Confirmation page loses relative links

Posted on 2004-04-06
6
289 Views
Last Modified: 2013-12-24
I am using FP 2003 with FP 2002 extensions.  When I publish a simple forms confirmation page, none of the relative links (including images and the style sheet) work when it is accessed via the web.  All other aspects of the form work fine, including the link to the confirmation page.  Any ideas on how to cure the problem without explicitly coding each link and character/paragraph format?  I don't want to change everything again after I move it off the test site.

Thanks!
0
Comment
Question by:mikenew
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 12

Expert Comment

by:rcmb
ID: 10773407
How are you publishing the website? When viewed from your local test server does everything work per design?

Note from KB Article 219913 -

SYMPTOMS
When you import a Web and specify a folder that is not the root of the Web, all relative links to pages above that folder are considered outside of the current Web and result in broken links.

NOTE: All relative links to the root Web (for example, "../") are broken.

If you want to import a Web site that was created by FrontPage and you have the necessary permissions, it is better to open that Web site with FrontPage and then publish it to the target location. Publish Web (on the File menu) can copy all of the FrontPage information associated with the site, such as theme information or navigation structure.

RCMB
0
 

Author Comment

by:mikenew
ID: 10775012
Thanks for the reply!  The pages were published through Frontpage, and all (relative) links work fine on all pages except the Confirmation page.  But unless I code explicit links on the confirmation page, the page will open with these broken links:
- logo image for banner
- banner links (Home, Products, etc.)
- style sheet link
- a button that goes back to where they were [onClick="history.go(-2)"]

The page does display a "Name" confrmation field, so I know FP extensions are working.

0
 

Author Comment

by:mikenew
ID: 10775406
Additional info...

I have a test site up and running at http:fp.canyonhydro.com.   It's still missing some graphics but the basics are working (or not, in the case of the Confirmation page).

You can view the Form at http://fp.canyonhydro.com/Contact/DataSheet.htm
The Confirmation page is at http://fp.canyonhydro.com/Contact/FormConfirmTest.htm

Note that the confirmation page works fine if you access it directly, but breaks when instantiated by the form.

Thanks for the help!
-Mike
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 12

Accepted Solution

by:
rcmb earned 125 total points
ID: 10778685
okay here is my cut on this:

1. The image on the datasheet is linked to:

file:///C:/Documents%20and%20Settings/Mike/My%20Documents/My%20Web%20Sites/Canyon%20Hydro%20Draft/images/Logo1.gif

This will not work. Point it to a file in the web.

2. I think the link to your img in the middle is incorrect - is button10.jpg in the same folder as the forms? I was not able to locate it.

<img border="0" id="img1" src="button10.jpg" height="24" width="181" alt="Return to Canyon Hydro"

3. I created a test.htm page that has a form that submits to the FormConfirmTest.htm page on my site. I downloaded your stylesheet and all loaded fine.

Look at http://68.209.129.5/carson/test1.htm and enter some data. The image mouse over is not working because I did not code it.

RCMB

Here is the script for the page I had working:

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Data Sheet Confirmation</title>

<!--Script for Back buton-->

<script language="JavaScript">
<!--
function FP_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}
// -->
</script>

<link rel="stylesheet" type="text/css" href="../CanyonStyle.css">
</head>


<!--Banner Links-->
<table border="0" cellpadding="0" cellspacing="0" height="30" width="100%">
      <tr>
            <td valign="top" bgcolor="#808080" height="30">
            
            <p align="right" style="margin-top: 8px"><b><font size="1" face="Verdana" color="#FFFFFF">
            <a href="../index.htm"><font color="#FFFFFF"><span style="text-decoration: none">
                  HOME</span></font></a>&nbsp;|&nbsp;
            <a href="../Products/Products.htm"><font color="#FFFFFF"><span style="text-decoration: none">
                  SYSTEMS</span></font></a>&nbsp;|&nbsp;
            <a href="../Projects/Projects.htm"><font color="#FFFFFF"><span style="text-decoration: none">
                  PROJECTS</span></font></a>&nbsp;|&nbsp;
            <a href="../Resources/Resources.htm"><font color="#FFFFFF"><span style="text-decoration: none">
                  RESOURCES</span></font></a>&nbsp;|&nbsp;
            <a href="Contacts.htm"><font color="#FFFFFF"><span style="text-decoration: none">
                  CONTACT US</span></font></a>&nbsp;&nbsp;&nbsp; &nbsp;</font></b></td>
      </tr>
</table-->

</table>


<body onload="FP_preloadImgs(/*url*/'button10.gif')">

<table border="0" cellpadding="0" cellspacing="0" height="80" width="100%">      
      <tr>
            <td valign="top" bgcolor="#CCFFFFF" width="200">
      <!-- CellType="Logo&Title" -->
            </td>
            
            <td valign="top" bgcolor="#CCFFFFF" height="80">
      <!-- CellType="Logo&Title" -->
            <p class="PageTitle">Data Sheet Receipt Confirmation</font></p>
            <p class="PageSubtitle">&nbsp;</p></td>
      </tr>

</table>

<table border="0" cellpadding="0" cellspacing="8" height="400" width="100%">
      <tr>
            <td valign="top" width="149">
            <!-- CellType="NavBody" -->
            <p class="NavTitle">Contact</font></p>
            </td>
            
            <!--Vertical line-->
            <td bgcolor=#006666 width="1">
            </td>

            <td valign="top" width="650">
            <!-- CellType="ContentBody" -->
            <h1>            <!--webbot bot="ConfirmationField" S-Field="Name" -->, thank you for your interest in Canyon Hydro.</font></h1>
            <p class="BasicText1">Your data sheet has been successfully submitted, and we will
            reply as soon as possible.</p>
            <p>&nbsp;</p>
            
            <!-- Return button-->
            <p align="center">
            <a onClick="history.go(-2)" href="#">
            <img border="0" id="img1" src="button10.gif" alt="Return to Canyon Hydro" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button11.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button10.jpg')" fp-style="fp-btn: Embossed Capsule 1; fp-font: Verdana; fp-font-color-hover: #800000; fp-img-press: 0; fp-proportional: 0" fp-title="Return to Canyon Hydro"></font></p>
            </a></p>
            </td>
      </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" height="30" width="100%">
      <tr>
            <td valign="top">
            <!-- CellType="Links%Legal" -->
            <p align=center><font size="1" face="Verdana">© Copyright 2004 Canyon Industries, Inc. All rights reserved.</font></p>
            </td>
      </tr>
</table>




</body>

</html>


3. I have recreated your forms and found everything else working fine. I downloaded your stylesheet, created the datasheet.htm and had it submit to the FormConfirmTest.htm and the style sheet loaded, images appeared (I had to change the names of the images to match mine) and links worked.
0
 

Author Comment

by:mikenew
ID: 10779416
RCMB,

Thanks for all your efforts on this.  I do appreciate your time.

But the problem persists.

1. Thanks for catching the broken image link.  Once in awhile Frontpage seems to forget to clean those up after I insert an image from a local file, but it's fixed.  I'll do more extensive online testing from another PC to catch those problems.

2. I'll worry about the button image later.  Easy to fix, I'm sure.

3. I tried your test link and it worked great.  Encouraged, I pasted your code directly into a fresh page and uploaded it for test.  No dice.  So I stripped all the "noise code" out of the Confirmation page so it's down to bare essentials.  No tables, almost no Javascript. (I left in the confirmation field so I know the form works.)  Just some links and text.  You can view it at http://fp.canyonhydro.com/Contact/FormConfirmTest.htm.  Notice how nicely the page displays and how the links work when you access it directly.

But it still crashes when instantiated by the form.  Not only that, none of the links work, even though the status line show them pointing to perfectly good URLs.  I click and get a 404.

Perhaps a server bug?  It's a hosted site, so I don't have control over that end.

Here is the current code for the Confirmation page (not much to go wrong):
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Data Sheet Confirmation</title>
<link rel="stylesheet" type="text/css" href="../CanyonStyle.css">
</head>

<body>
<!--Banner Links-->
            <p align="right"><b><font size="1" face="Verdana">
          <a href="../index.htm">HOME</a>&nbsp;|&nbsp;
          <a href="../Systems/Systems.htm">SYSTEMS</a>&nbsp;|&nbsp;
          <a href="../Projects/Projects.htm">PROJECTS</a>&nbsp;|&nbsp;
          <a href="../Resources/Resources.htm">RESOURCES</a>&nbsp;|&nbsp;
          <a href="../Contact/ContactUs.htm">CONTACT US</a>&nbsp;&nbsp;&nbsp; &nbsp;</font></td>
         
 <!--Page text-->
          <p class="PageTitle">Data Sheet Receipt Confirmation</font></p>
          <p class="PageSubtitle">TEST2</p></td>

<!--Confirmation field works fine-->
          <h1><!--webbot bot="ConfirmationField" S-Field="Name" startspan --><strong>Name</strong><!--webbot bot="ConfirmationField" i-checksum="50270" endspan -->, thank you for your interest in Canyon Hydro.</h1>
          <p class="BasicText1">Your data sheet has been successfully submitted, and we will
          reply as soon as possible.</p>
</body>
</html>

Baffling.
-Mike

0
 

Author Comment

by:mikenew
ID: 10788559
RCMB,

Problem resolved, after about 3 hours on the phone with Microsoft. Frontpage has a known bug that automatically assigns a "www" to auto-generated links.  This means instead of "fp.canyonhydro.com" it was setting a base address of "www.fp.canyonhydro.com".

The workaround was an "Insert HTML" command to set the base href to fp.canyon...  You can't just type in the HTML code, as Frontpage will overwrite it with what it wants.  The Insert HTML command "protects" the HTML code from Frontpage's shenanigans.

Of course, this means I'll have to change this line of code when I roll to the "www" site, but it's only one line instead of a bunch of absolute links.

Thanks again for all your effort!

Cheers - Mike
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Advice needed on CMS/coding platform 9 63
Extracting data from Salesforce visualforce page 1 250
bootstrap submit button 12 127
What xml editor to use. 8 108
When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question