...

View Full Version : help with back button



phillcooper
08-19-2011, 01:55 PM
i have the following code which i am trying to insert a 'back button' into to go back to the previous page. i can only seem to get the button to appear either at the very top or very bottom of the page, does anyone know how i can specify the location?

this script is generated from easypano tourweaver -


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Virtual Tour Created By CAPITA SYMONDS</title>
</head>
<body leftMargin="0" topMargin="0" rightMargin="0" bottomMargin="0">
<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">
To view virtual tour properly, Flash Player 9.0.28 or later version is needed.
Please download the latest version of <a href="http://www.adobe.com/go/getflashplayer" target="_blank">Flash Player</a> and install it on your computer.
</div>

<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("twviewer.swf", "sotester", "1024", "768", "9.0.0", "#FFFFFF");
so.addParam("allowNetworking", "all");
so.addParam("allowScriptAccess", "always");
so.addParam("allowFullScreen", "true");
so.addParam("scale", "noscale");
//<!-%% Share Mode %%->
so.addVariable("lwImg", "resources/2_area_multipix_preloading image file.jpg");
so.addVariable("lwBgColor", "255,255,255,255");
so.addVariable("lwBarBgColor", "255,186,186,186");
so.addVariable("lwBarColor", "255,153,0,0");
so.addVariable("lwBarBounds", "-512,-384,1024,768");
so.addVariable("lwlocation", "4");
so.addVariable("lwShowLoadingPercent", "false");
so.addVariable("lwTextColor", "255,0,0,0");
so.addVariable("iniFile", "config_2_Area_Multipix.bin");
so.addVariable("progressType", "1");
so.addVariable("swfFile", "resources/2_area_multipix_1_animation for tourweaver.swf");
so.addVariable("href", location.href);
so.write("flashcontent");
// ]]>
</script>
</body>
</html>

here is the button code -


<span onclick="javascript:history.back()" style="text-decoration:underline; color:blue; cursor:hand">Back</span>

DanInMa
08-19-2011, 02:21 PM
you use css. where do you want to put the button exactly?

phillcooper
08-19-2011, 02:25 PM
hi,

im very new to coding, what is 'CSS'?

i am wanting the button in the top left of the screen just under the logo.

thanks

DanInMa
08-19-2011, 02:41 PM
Cascading stylesheets are how you can style all of the elements on your page. it's an essential skill to learn, here are several great tutorials to look through:

http://www.htmldog.com/guides/cssbeginner/
http://www.csstutorial.net/

DanInMa
08-19-2011, 02:47 PM
here, the code in blue is css. give this example a try and perhaps we cna figure it out from there.




<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Virtual Tour Created By CAPITA SYMONDS</title>
<style type="text/css">
<!--
body {
margin:0;
outline:0 none;
padding:0;
vertical-align:baseline;
}
#flashcontent{

}
#go_back{
text-decoration:underline;
color:blue;
cursor:hand;
width:200px;
}

-->
</style>
</head>
<body>
<script type="text/javascript" src="swfobject.js"></script>
<div onclick="javascript:history.back()" id ="go_back">Back</div>
<div id="flashcontent">
To view virtual tour properly, Flash Player 9.0.28 or later version is needed.
Please download the latest version of <a href="http://www.adobe.com/go/getflashplayer" rel="nofollow" target="_blank">Flash Player</a> and install it on your computer.
</div>

<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("twviewer.swf", "sotester", "1024", "768", "9.0.0", "#FFFFFF");
so.addParam("allowNetworking", "all");
so.addParam("allowScriptAccess", "always");
so.addParam("allowFullScreen", "true");
so.addParam("scale", "noscale");
//<!-%% Share Mode %%->
so.addVariable("lwImg", "resources/2_area_multipix_preloading image file.jpg");
so.addVariable("lwBgColor", "255,255,255,255");
so.addVariable("lwBarBgColor", "255,186,186,186");
so.addVariable("lwBarColor", "255,153,0,0");
so.addVariable("lwBarBounds", "-512,-384,1024,768");
so.addVariable("lwlocation", "4");
so.addVariable("lwShowLoadingPercent", "false");
so.addVariable("lwTextColor", "255,0,0,0");
so.addVariable("iniFile", "config_2_Area_Multipix.bin");
so.addVariable("progressType", "1");
so.addVariable("swfFile", "resources/2_area_multipix_1_animation for tourweaver.swf");
so.addVariable("href", location.href);
so.write("flashcontent");
// ]]>
</script>
</body>
</html>

phillcooper
08-30-2011, 08:47 AM
hi,
sorry i didnt reply sooner, I didnt get an email notification of your message.

Ive tried inserting the code you stated, but it doesnt seem to do anything, no 'back' button appears, which I think is what it is trying to do.

any ideas?

thanks

phillcooper
09-30-2011, 08:21 AM
any ideas?

Old Pedant
09-30-2011, 08:44 AM
Ummm...if the code you showed in your first post is the ENTIRE CODE on that page (other than the back button), then indeed you *CAN* only put the button at the top or bottom of the page.

That's because ALL THE REST of your page is written in FLASH.

And you can't insert HTML elements into the middle of flash content.

You will have to edit the FLASH source code if you want to modify what it shows.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum