Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help with back button

    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 -

    Code:
    <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 -

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

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    you use css. where do you want to put the button exactly?

  • #3
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    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/

  • #5
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    here, the code in blue is css. give this example a try and perhaps we cna figure it out from there.


    Code:
    <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>

  • #6
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #7
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    any ideas?

  • #8
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,133
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •