Web Analytics Made Easy -
StatCounter help with back button - CodingForum

Announcement

Collapse
No announcement yet.

help with back button

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    you use css. where do you want to put the button exactly?
    - Firebug is a web developers best friend! - Learn it, Love it, use it!
    - Validate your code! - JQ/JS troubleshooting
    - Using jQuery with Other Libraries - Jslint for Jquery/other JS library users

    Comment


    • #3
      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

      Comment


      • #4
        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/
        - Firebug is a web developers best friend! - Learn it, Love it, use it!
        - Validate your code! - JQ/JS troubleshooting
        - Using jQuery with Other Libraries - Jslint for Jquery/other JS library users

        Comment


        • #5
          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>
          - Firebug is a web developers best friend! - Learn it, Love it, use it!
          - Validate your code! - JQ/JS troubleshooting
          - Using jQuery with Other Libraries - Jslint for Jquery/other JS library users

          Comment


          • #6
            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

            Comment


            • #7
              any ideas?

              Comment


              • #8
                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.
                Be yourself. No one else is as qualified.

                Comment

                Working...
                X