Solved

Is any another way to redirect the page over then this one?

Posted on 2003-11-05
30
235 Views
Last Modified: 2010-04-09
Is any another way to redirect the page over then this one?
Macintosh does not like this one very much I do not know way yet.
I might missing somthing in this code.
Any opinions will very much appreciated.

<html>
<head>
      <meta http-equiv="Refresh" content="5; URL=<cfoutput>#PageDestination#</cfoutput>">
<head>

<body>
      
      <h4>You are leaving our Intranet.<br><br>
            Your page will be redirected to ...text<br><br>

</body>
</html>
0
Comment
Question by:Volka
  • 12
  • 10
  • 7
  • +1
30 Comments
 
LVL 4

Expert Comment

by:bschwarz6
ID: 9689121
this should be MAC friendly ... its very close to your code, but not exactly ...

<META HTTP-EQUIV=Refresh CONTENT="5; URL=home.html">

i dont think that you need the <cfoutput></cfoutput> tags.

i know that this works for me.

Hope it helped


b
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9689232
How about:

<cfset PageDestination = "http://www.somepage.com">
<html>
<head>
<title>Refresh Test</title>
<cfoutput><meta http-equiv="refresh" CONTENT="5; url=#PageDestination#"></cfoutput>
</head>
<body>

</body>
</html>
0
 

Author Comment

by:Volka
ID: 9689477
That is my code:

<meta http-equiv="Refresh" content="5; URL=<cfoutput>#PageDestination#</cfoutput>">

Do you think error might be because my cfoutput Inside html tag?
Is any another way to redirect the page over then <meta> tag?

0
 

Author Comment

by:Volka
ID: 9689485
It works perfect on all windows browsers ...
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9689534
>> Do you think error might be because my cfoutput Inside html tag?

It's very possible. Can you try it as per the example just so we can rule that out?

>>Is any another way to redirect the page over then <meta> tag?
Can you describe why you're doing the redirecting, and why the page destination is through CF?
0
 

Author Comment

by:Volka
ID: 9689598
I have intranet application. Some link is for outside for example yahoo.com
User would like to have page in between that will say:
“You are leaving our Intranet.
Your page will be redirected to #PageDestination#
If you are not redirected in 5 seconds, you can go directly to the page by clicking here.”
0
 

Author Comment

by:Volka
ID: 9689818
Does not matter where cfoutput is, reaction is still the same.

Mac Explore images disappear from the page, some of them, have to restart some time just the browser
Some time computer to make it work.

Mac Safari – nothing happened with the images but link on middle page (“If you are not redirected in 5 seconds, you can go directly to the page by clicking here”) disabled.
0
 
LVL 15

Expert Comment

by:VincentPuglia
ID: 9689943
how about with javascript?

<script type='text/javascript'>
document.write("you are being relocated to: somepage.html")
this.location = 'somepage.html'
</script>

Vinny
0
 

Author Comment

by:Volka
ID: 9690129
ok but haw I can keep this page in front user easy for 5 sec?
0
 

Author Comment

by:Volka
ID: 9690147
ok but how I can keep this page in front user eyes for 5 sec? sorry...
0
 
LVL 31

Accepted Solution

by:
seanpowell earned 50 total points
ID: 9690169
<script type='text/javascript'>
<!--
document.write("you will be redirected to <a href='somepage.html'>somepage.html</a> in 5 seconds")
setTimeout("location.href='somepage.html'",5000);
//-->
</script>
0
 
LVL 15

Assisted Solution

by:VincentPuglia
VincentPuglia earned 50 total points
ID: 9690182
Hi Volka,

  Guess george just showed you how :D

Vinny
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9690200
All points to Vinny for the JS solution - if you're happy with it. I just expanded on it...
0
 

Author Comment

by:Volka
ID: 9690218
let me test it hope it will work.
Thank you to both of you.
Could you tell me how I can 50 points to both of you befor I accept the answer?
0
 
LVL 15

Expert Comment

by:VincentPuglia
ID: 9690226
nay george; let him split -- i was just amused at how fast you responded -- excellent hand/eye/ear coordination  :)

Vinny
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 15

Expert Comment

by:VincentPuglia
ID: 9690238
I think you can split the points -- assisted answers
but don't really know -- (and I'd really rather have mine in espresso beans :)

Vinny
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9690244
If you must - there's a "Split Points" link above the comment box. It's a little confusing, so rest assured it's not you!
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9690248
>>and I'd really rather have mine in espresso beans :)

I'll second that - I'm going to make myself one right now.
0
 
LVL 15

Expert Comment

by:VincentPuglia
ID: 9690261
George, to like minds:  :mug: :D

Vinny
0
 

Author Comment

by:Volka
ID: 9690296
Is it possible to put count down on screen like 5..4...3..2..1
0
 
LVL 15

Expert Comment

by:VincentPuglia
ID: 9690415
Hi Volka,

And yet another version:

<html><head>
<script type='text/javascript'>
<!--
var secs= 5;
function doit()
{
  document.getElementById('sec').innerHTML = ' ' + secs + ' ';
  secs--
  setTimeout("doit()",1000);

}
//-->
</script>
</head>
<body onload='location.href="http://members.aol.com/grassblad";doit()'>
you will be redirected to <a href='somepage.html'>somepage.html</a> in <span id="sec"></span> seconds.
</body>
</html>

Vinny
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9690420
Yes:

<script type='text/javascript'>
<!--
document.write("you will be redirected to <a href='somepage.html'>somepage.html</a> in <img src='countdown.gif'>")
setTimeout("location.href='somepage.html'",5000);
//-->
</script>

countdown.gif is a simple animated gif that runs from 5 - 0.

1. Keep the gif small in file size, becasue the js timeout starts when the page loads. The animation starts when it's finished loading. And don't loop it :-)

2. You may want to increase the actual timeout to 6 or 7 to make sure the anmation has time to play out.

I'm sure there's a much more elegant js solution...
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9690428
Told you so - Nice one Vinny! Very Nice.
0
 
LVL 15

Expert Comment

by:VincentPuglia
ID: 9690434
Thank you George; half mug of cold espresso does it every time :D

Vinny
0
 

Author Comment

by:Volka
ID: 9694383
Thank you again it was a pleasure to meet you both.
0
 

Author Comment

by:Volka
ID: 9703231
Thank you again my question was answered and I lerned a lot but unfortunately it did not solve my problem. Img still disappearing and that happened only when I am using pop up window for redirection. What make me absolutely confused that pop up window without redirection working perfect and redirection without pop up window working perfect. So I can live with that but still interesting why it happens.
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9703302
I'm confused by what you mean here, and which image you're referring to - can you try and be more specific?
0
 

Author Comment

by:Volka
ID: 9703343
For example:
Page 1 contained some img like every page.
Also page 1 contained link for outside for exmpl: yahoo.com
I am using redirection as we discussed. When I get back to Page1
One of 10 img not there looks like deleted from server but its not.
Only on Mac Explore and only if redirection page pop up window.
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9703390
Is this online by any chance, or do you have an example of how you're calling the image?
0
 

Author Comment

by:Volka
ID: 9703472
It is not on line but I do have example exactly the same as I am using on all my pages. Please copy into any editor to view. Sorry for bad english.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
      <title></title>
      <script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}
//-->
</script>
      <script language="JavaScript" type="text/JavaScript">
<!--
// ******* Function For Opening New Window
function newWin(inUrlAddress, inWindowName, inHeight, inWidth, inMenubar, inToolbar){
      Window1=window.open(inUrlAddress,inWindowName,"height="+inHeight+",width="+inWidth+",left=200,top=130,directories=no,menubar="+inMenubar+",toolbar="+inToolbar+",status=no,location=no,scrollbars=yes,resizable=yes");
      Window1.focus();
}
//-->
</script>
      <LINK href="../styles/styles.css" type="text/css" rel="stylesheet">
</head>
<body bgcolor="#ffffff" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">


<!--- One of them gone after redirection --->

<table  width="750"  border="0" cellpadding="0" cellspacing="0">
        <tr>                   
          <td><a href="../about/About.cfm" target="_top" onMouseOver="MM_nbGroup('over','about_out','../images/navigator/about_over.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="../images/navigator/about_out.gif" name="about_out" border="0"></a></td>
          <td><a href="../administ/administ.cfm" target="_top" onMouseOver="MM_nbGroup('over','admin_out','../images/navigator/admin_over.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="admin_out" src="../images/navigator/admin_out.gif" border="0"></a></td>
          <td><a href="../resources/corelab.cfm" target="_top" onMouseOver="MM_nbGroup('over','resources_out','../images/navigator/resources_over.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="resources_out" src="../images/navigator/resources_out.gif" border="0"></a></td>
          <td><img name="application_over" src="../images/navigator/application_over.gif" border="0"></td>
          <td><a href="../research/research.cfm" target="_top" onMouseOver="MM_nbGroup('over','protocols_out','../images/navigator/protocols_over.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="protocols_out" src="../images/navigator/protocols_out.gif" border="0"></a></td>
          <td><a href="../contact/contact.cfm" target="_top" onMouseOver="MM_nbGroup('over','contact_out','../images/navigator/contact_over.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="contact_out" src="../images/navigator/contact_out.gif" border="0"></a></td>
                    
            <td><a href="../login/logout.cfm" target="_top" onMouseOver="MM_nbGroup('over','userlogout_out','../images/navigator/userlogout_over.gif','',1)" onMouseOut="MM_nbGroup('out')"><img name="userlogout_out" src="../images/navigator/userlogout_out.gif" border="0"></a></td>
              
      </tr>
</table>




</body>
</html>
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now