function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BrandiTBrandiT 

Using HTML Meta tags in Visualforce Page for Sites -- REFRESH

I built a web to lead and thank you form using Sites and CMS Force.  Both pages open up on their own perfectly.  When the "Web-to-Lead" page is open and the user hits Submit, they are taken to the "Thank You" page.

 

On the Thank You page, I want it to stay open for 3 seconds and automatically switch back to the Web-to-Lead form.  The reason is we want to use this at tradeshows to capture leads so when a person inputs information, it thanks them, then reverts back to the web to lead form for the next person.

 

I cannot get the Thank You page refresh to work however.  It works perfectly as HTML so I thought it would work in a Visualforce page.  Here is the code I'm using.  The questionable part is in red.  Does anyone have an idea on how to make this work?  Currently the "Thank You" page just loops back over to itself every 3 seconds. 

 

<apex:page showHeader="false">
<html>
<head>
<title>Idearc Media National Sales</title>

<META http-equiv="refresh" content="3"; URL="http://idearcmedia.force.com/w2l">

</head>
<body>

<table width="100%" cellspacing=20>
<tr>
<td align=center>
<br>
<br>
<br>
<FONT SIZE=6>
Thank you for entering.</font></td></tr>
<tr><td align=center>
<font size=5>You will be notified within 14 days if you are the WINNER!</FONT>
</td></tr>
<tr><td align=center>
<p>&nbsp<p>
</td></tr>
<tr><td align=center>
<c:contentblock name="Logo"></c:contentblock>
</td></tr>
</table>
</body>
</html>
</apex:page>

Best Answer chosen by Admin (Salesforce Developers) 
D YarhamD Yarham

Using this VF markup only gives me 1 HEAD element

 

<apex:page sidebar="false" showHeader="false" standardStylesheets="false" cache="false">
    <html>
        <head>
            <meta http-equiv="refresh" content="3;URL=http://www.google.com"/>
        </head>
        <body>
            <h1>Thanks</h1>
        </body>
    </html>
</apex:page>

All Answers

RyanGuestRyanGuest

 Looks like a simple typo. I changed this:

 

 

<META http-equiv="refresh" content="3"; URL="http://idearcmedia.force.com/w2l">

  to this:

 

<META http-equiv="refresh" content="3;URL=http://idearcmedia.force.com/w2l"/>

 

 

 

Here is the full markup of the page:

 

 

<apex:page showHeader="false"><html><head><title>Idearc Media National Sales</title><META http-equiv="refresh" content="3;URL=http://idearcmedia.force.com/w2l"/></head><body><table width="100%" cellspacing=20><tr><td align=center><br><br><br><FONT SIZE=6>Thank you for entering.</font></td></tr><tr><td align=center><font size=5>You will be notified within 14 days if you are the WINNER!</FONT></td></tr><tr><td align=center><p>&nbsp<p></td></tr><tr><td align=center><c:contentblock name="Logo"></c:contentblock></td></tr></table></body></html></apex:page>

 

 

stratus adminstratus admin

 

Using <apex:page showHeader="false"> will NOT override the <header> tag and allow you to enter META data. In the example above you will end up with 2 <header></header> tags generated - one by SFDC and the one manually entered with the META information. The showHeader specifically hides the Tabs in SFDC.

 

I have marked the above as not being solved.

D YarhamD Yarham

Using this VF markup only gives me 1 HEAD element

 

<apex:page sidebar="false" showHeader="false" standardStylesheets="false" cache="false">
    <html>
        <head>
            <meta http-equiv="refresh" content="3;URL=http://www.google.com"/>
        </head>
        <body>
            <h1>Thanks</h1>
        </body>
    </html>
</apex:page>

This was selected as the best answer
Rahul KotianRahul Kotian
You can use 'applyHtmlTag="false" '
<apex:page showHeader="false" sidebar="false" standardStylesheets="false"
02    applyHtmlTag="false" applyBodyTag="false" docType="html-5.0"> to not have extra <header> tags