This should be simple but Simple left the building.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ft310

    #1

    This should be simple but Simple left the building.

    Te whole point is to provide the User a disclaimer and it they except
    to continue on with the original (?) format.

    The 'calling' web page generates something like "http://rhodeisland-
    aa.org/tester/meetings/disclaima.htm?m tgnum=35" This indicates the
    test system is being used 'tester' and the individual meeting is #35.
    The output generated by this web page is the User clicks "Continue" is
    "http://rhodeisland-aa.org/tester/meetings/geo_md.htm?mtgn um=35" This
    output is not happening -- in fact in most cases the 404 error page is
    called.

    The script follows
    Code:
    <body onload="onopen ;">
    <table class="inwin">
    <tr>
    <td colspan="2" width="240px">
    TESTING<br>
    <b>You are leaving an area over which RhodeIsland-AA.org has
    total content control and entering
    a web page which may have content over which we have limited
    control.</b>
    TESTING<br>
    </td>
    </tr>
    <tr>
    <td class="inwinopt" width="120px" align="center">
    
    <form method='POST' action='' name='gonogo'>
    <input type='submit' value='Continue' name='Continue'
    style='width: 90; height: 50; FONT-FAMILY: Arial; color : blue ; FONT-
    SIZE: 12pt; FONT-WEIGHT: bold'>
    <input type='hidden' name='mtgnum' size="4" value='0'>
    </form>
    </td>
    <td class='inwinopt' width='120px' align='center'>
    <a id='CanAnchor' href='#' onClick='retreat() ;'>Cancel</a>
    </td>
    </tr>
    </table>
    
    <script type="text/javascript">
    function onopen()
    {
    var forwardpath = self.location.href ;
    document.gonogo.action = forwardpath.substring(0,
    forwardpath.indexOf('disclaima.htm')) + 			'geo_md.htm' +
    forwardpath.substring(forwardpath.indexOf('?'))  ;
    alert (forwardpath.substring(0,
    forwardpath.indexOf('disclaima.htm')) + 'geo_md.htm' +
    forwardpath.substring(forwardpath.indexOf('?'))) ;
    document.gonogo.mtgnum.value =
    forwardpath.substring(forwardpath.indexOf('=') + 1) ;
    alert (document.gonogo.action + ' ' +
    document.gonogo.mtgnum.value) ;
    return true ;
    }
    </script>
    
    
    </body>
    
    </html>
    I am out of ideas and will appreciate some. In the meantime, thanks
    for your time.
  • Evertjan.

    #2
    Re: This should be simple but Simple left the building.

    ft310 wrote on 29 jun 2008 in comp.lang.javas cript:
    Te whole point is to provide the User a disclaimer and it they except
    to continue on with the original (?) format.
    ['format'?]

    Better do this with serverside scripting,
    but if you do this clientside,
    no need to call a seperate page.

    Code:
    <head>
    <script type='text/javascript'>
    function ok(d){
    d.parentNode.style.display='none';
    document.getElementById('m').style.display='block';
    };
    </script>
    </head>
    
    <body>
    <div id='disclaimer'>
    DISCLAIMER<br><br>
    Blah<br><br>
    <button onclick='ok(this)'>Click me if you agree</button>
    </div>
    <div id ='m' style='display:none;'>
    Main page<br><br>
    Main page<br><br>
    Main page<br><br>
    Main page<br><br>
    Main page<br><br>
    </div>
    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • SAM

      #3
      Re: This should be simple but Simple left the building.

      ft310 a écrit :
      Te whole point is to provide the User a disclaimer and it they except
      to continue on with the original (?) format.
      >
      The 'calling' web page generates something like "http://rhodeisland-
      aa.org/tester/meetings/disclaima.htm?m tgnum=35" This indicates the
      test system is being used 'tester' and the individual meeting is #35.
      The output generated by this web page is the User clicks "Continue" is
      "http://rhodeisland-aa.org/tester/meetings/geo_md.htm?mtgn um=35" This
      output is not happening -- in fact in most cases the 404 error page is
      called.

      Code:
      <html>
      <body onload="onopen();">
      <table class="inwin">
      <tr>
      <td colspan="2" width="240px">
      TESTING<br>
      <b>You are leaving an area over which RhodeIsland-AA.org has
      total content control and entering a web page which may
      have content over which we have limited control.</b>
      TESTING<br>
      </td>
      </tr>
      <tr>
      <td class="inwinopt" width="120px" align="center">
      
      <form method='POST' action='' name='gonogo'>
      <input type='submit' value='Continue' name='Continue'
      style='width: 90px; height: 50px;
      font: Arial 12px bold; color: blue'>
      <input type='hidden' name='mtgnum' value='0'>
      </form>
      </td>
      <td class='inwinopt' width='120px' align='center'>
      <a id='CanAnchor' href='#' onclick='retreat() ;'>Cancel</a>
      </td>
      </tr>
      </table>
      
      <script type="text/javascript">
      function onopen()
      {
      var forwardurl =  self.location.toString(),
      forwardpath = forwardurl.substring(0,
      forwardurl.lastIndexOf('/')+1),
      forwardfollow = forwardurl.split('=')[1];
      document.gonogo.mtgnum.value = forwardfollow;
      document.gonogo.action = forwardpath + 'geo_md.htm';
      
      alert ('action = ' +document.gonogo.action +
      '\ntgnum = ' + document.gonogo.mtgnum.value) ;
      }
      
      /********** variante **********/
      function onOpen() {
      var forwardurl =  self.location.toString(),
      forwardfile = forwardurl.split('?')[0],
      forwardfollow = forwardurl.split('=')[1];
      forwardfile = forwardfile.replace('disclaima','geo_md');
      document.gonogo.mtgnum.value = forwardfollow;
      document.gonogo.action = forwardfile;
      
      alert ('action = ' +document.gonogo.action +
      '\ntgnum = ' + document.gonogo.mtgnum.value) ;
      }
      </script>
      </body>
      </html>
      --
      sm

      Comment

      Working...