Redirecting?

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

    #1

    Redirecting?


    Hi All,

    What I want to achieve is to display a login screen in a certain size and
    appearance window with no toolbars etc.

    To achieve this I think I need to use redirection, but I am not sure how or
    what is the best way?

    The problem I am facing, that the user may get to the login page from
    different pages, or simply from typing in the address of the login page.

    In order to make the window appear as I like I need to pen a new one...?

    TIA,

    Tom


  • Grant Wagner

    #2
    Re: Redirecting?

    Tom Szabo wrote:
    [color=blue]
    > Hi All,
    >
    > What I want to achieve is to display a login screen in a certain size and
    > appearance window with no toolbars etc.
    >
    > To achieve this I think I need to use redirection, but I am not sure how or
    > what is the best way?
    >
    > The problem I am facing, that the user may get to the login page from
    > different pages, or simply from typing in the address of the login page.
    >
    > In order to make the window appear as I like I need to pen a new one...?
    >
    > TIA,
    >
    > Tom[/color]

    You can't possibly guarantee the order of events you are attempting to enforce.
    On many browsers, a new window will simply not open, or may open in a new tab,
    or may open in the same window. That said, you could try:

    <body onload="var w = window.open('yo urLogin.html', 'login',
    'width=300,heig ht=200');">
    <p>Use the
    <a href="#" onclick="if (w && w.focus) w.focus();retur n false;">login
    window</a>
    to continue</p>
    </body>

    Of course for those browsers that prevent unsolicited windows from appearing
    you'll have a page that serves no function and offers no alternative means of
    access.

    --
    Grant Wagner <gwagner@agrico reunited.com>
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    • Tom Szabo

      #3
      Re: Redirecting?

      Thanks for that,

      I am aiming to build an application that will run on most of our client's
      workstations. They use netscape and IE. That is all I care.

      I could not be bothered with any other, so as long as it works with these
      two I am happy :-)

      Thanks again,

      Tom
      [color=blue]
      >
      > You can't possibly guarantee the order of events you are attempting to[/color]
      enforce.[color=blue]
      > On many browsers, a new window will simply not open, or may open in a new[/color]
      tab,[color=blue]
      > or may open in the same window. That said, you could try:
      >
      > <body onload="var w = window.open('yo urLogin.html', 'login',
      > 'width=300,heig ht=200');">
      > <p>Use the
      > <a href="#" onclick="if (w && w.focus) w.focus();retur n false;">login
      > window</a>
      > to continue</p>
      > </body>
      >
      > Of course for those browsers that prevent unsolicited windows from[/color]
      appearing[color=blue]
      > you'll have a page that serves no function and offers no alternative means[/color]
      of[color=blue]
      > access.
      >
      > --
      > Grant Wagner <gwagner@agrico reunited.com>
      > comp.lang.javas cript FAQ - http://jibbering.com/faq
      >[/color]


      Comment

      • Grant Wagner

        #4
        Re: Redirecting?

        Tom Szabo wrote:
        [color=blue]
        > Thanks for that,
        >
        > I am aiming to build an application that will run on most of our client's
        > workstations. They use netscape and IE. That is all I care.[/color]

        Netscape (based on Mozilla) has a popup blocker that blocks unsolicited popups.

        IE in Windows XP Service Pack 2 has a popup blocker that blocks unsolicited
        popups.

        IE (other than Windows XP Service Pack 2) also has many add-ons (Google toolbar,
        Yahoo! toolbar, Norton Internet Security, etc) that block unsolicited popups.

        Asking your clients to suppress this protection (even for your single site) is a
        rude thing to do.

        If you are going to use a Web browser as the UI for an application, you should
        modify your assumptions about the level of control you have over that UI. If you
        don't like the lack of control you have over your UI, you should write the
        application using some other technology (Java or .Net).
        [color=blue]
        > I could not be bothered with any other, so as long as it works with these
        > two I am happy :-)[/color]

        Windows XP Service Pack 2 will prevent _any_ client-side JavaScript from
        executing in a file loaded from the local disk unless you give the document the
        "Mark of the Web", so that's something you should be aware of if you plan on
        loading any portion of your application from the local disk.

        --
        Grant Wagner <gwagner@agrico reunited.com>
        comp.lang.javas cript FAQ - http://jibbering.com/faq

        Comment

        • Tom Szabo

          #5
          Re: Redirecting?

          Hi Grant,

          XP at the moment doesn't bother me as I am, together with my clients, trying
          to avoid it for the very reasons like Spk 2.

          I think MS knows very vell how to manipulate the customers and sell their
          stuff but on the other hand has no idea or for some other reason doesn't
          want to deliver the right stuff in the right format for the businesses.
          (businesses in 95% of the cases don't need fancy crap, just a stable
          product, and MS operating systems seem to became stable by the time thay are
          taking it off the market...like win2k)

          XP in my opinion is an unfinished product as it is still changing and the
          changes are set to be default. This means to me it is still in a testing
          phase and my clients are not Beta testers, neither am I....:-)

          ..Net is also way out of the question, I am actually going the other way! :-)

          Now the next question:
          Can I overcome the JS blocking problem with using a certificate?

          TIA,

          Tom


          Comment

          • Grant Wagner

            #6
            Re: Redirecting?

            Tom Szabo wrote:
            [color=blue]
            > XP in my opinion is an unfinished product as it is still changing and the
            > changes are set to be default. This means to me it is still in a testing
            > phase and my clients are not Beta testers, neither am I....:-)[/color]

            The changes were in response to security issues. If your clients are using
            Microsoft operating systems and you are not recommending that your clients use
            the most up-to-date, stable, secure and fully-featured Microsoft operating
            system, you are doing your clients a disservice. Windows XP is hardly a beta
            product but I'm sure you will never believe that.
            [color=blue]
            > .Net is also way out of the question, I am actually going the other way! :-)[/color]

            Again, to discount .Net without evaluating whether it will meet your clients'
            needs is doing a disservice. It would be like being a mechanic and thhinking
            "this job looks like it requires a screwdriver, but I don't know how to use a
            screwdriver, and I have a wrench, so I'll just use that".
            [color=blue]
            > Now the next question:
            > Can I overcome the JS blocking problem with using a certificate?[/color]

            You can't overcome any popup blocker that I know of even with a certificate.
            Popup blockers block popups, that's what they do. New windows in a Web browser
            UI are a bad idea. Your question indicates you still do not understand the
            concept of a Web browser UI application, where you completely lack almost all
            control over the UI.

            Quite frankly I don't understand what is wrong with:

            <style type="text/css">
            body {
            margin: 0;
            }
            div {
            position: relative;
            top: 25%;
            }
            @media screen {
            div {
            position: absolute;
            top: 40%;
            width: 90%;
            }
            }
            </style>
            <div>
            <form>
            <table align="center">
            <tr>
            <td><label for="userId">Us er:</label></td>
            <td><input type="text" id="userId" name="user" value=""></td>
            </tr>
            <tr>
            <td><label for="pwId">Pass word:</label></td>
            <td><input type="password" id="pwId" name="pw" value=""></td>
            </tr>
            <tr>
            <td colspan="2" style="text-align:right;">< input type="submit" name="btnSubmit "
            value="Login"></td>
            </tr>
            </table>
            </form>
            </div>

            Yes, yes, don't use <table> for layout. Yes, yes, don't use align="center",
            except that CSS2 does not _provide_ horizontal-align, and text-align just
            doesn't cut it for horizontal alignment in a cross-browser way.

            The above generates pretty much the same login screen in IE 6, Netscape 4.78,
            Mozilla 1.0.2 and 1.7.3, Firefox 1.0, Opera 6.05 and 7.54. I'm sure there are
            user agents it will not render it properly, if you need to support those user
            agents, redesign or simplify the layout.

            If someone can duplicate the same look on the same browsers without a <table>,
            please E-mail me with the solution, I'd be interested to see how you did it.

            --
            Grant Wagner <gwagner@agrico reunited.com>
            comp.lang.javas cript FAQ - http://jibbering.com/faq

            Comment

            • Tom Szabo

              #7
              Re: Redirecting?

              Hi Grant,

              "> The changes were in response to security issues. If your clients are
              using[color=blue]
              > Microsoft operating systems and you are not recommending that your clients[/color]
              use[color=blue]
              > the most up-to-date, stable, secure and fully-featured Microsoft operating[/color]

              This is your opinion. What does my client benefit from XP opposed to
              Win2000???

              As I see XP is a glorified Win2000 (except HT and a few minor changes that
              my clients don't benefit from anyway!).

              If Win2000 is a guy in workboots and jeans, XP is a girl in mini skirts and
              highhill shoes. I f I want to have fun, sure the girl, but if I have a task,
              I think I take the other...:-)
              [color=blue]
              > system, you are doing your clients a disservice. Windows XP is hardly a[/color]
              beta[color=blue]
              > product but I'm sure you will never believe that.[/color]

              It depends what you classify as Beta. In my classification is something that
              still under development or has major change in default functionality.. .

              Actually you sound a little like a support guy I had to liase with a few
              weeks ago and we had the same disagreement. He was saying that winXP is
              better than Win2K and I was told I should use winXP, it is way better and
              more stable.

              My question was: in what?
              He said that it had HT for exanple.
              Me: So does your software utilises it...
              Him: No
              Me: :-)))

              Than I mentioned a few problems we or actually the 10-20% of our clients had
              with XPPro.
              Him: Ahhh...we turn those features off.
              Me: So what is left from XP? :-))))

              As a matter of fact, our 10-20% (or something like that ) clients those have
              XP seem to have more than the fair share of the trouble with the OS and
              software.
              [color=blue]
              >[color=green]
              > > .Net is also way out of the question, I am actually going the other way![/color][/color]
              :-)

              ..Net is MS/Windows platform. I am not interested locking myself in. FULL
              STOP.

              I have been doing things in and for windows and I can see the horizon
              broadening in the next few years, (as well as MS can too :-))) )
              [color=blue]
              > Again, to discount .Net without evaluating whether it will meet your[/color]
              clients'[color=blue]
              > needs is doing a disservice.[/color]

              ..Net doesn't meet any clients needs. It is the software written in/for it
              that will. But if half of my clients are, actually 2/3 of them having Linux
              servers, I think you can figure out the answer.
              [color=blue]
              > You can't overcome any popup blocker that I know of even with a[/color]
              certificate.[color=blue]
              > Popup blockers block popups, that's what they do. New windows in a Web[/color]
              browser[color=blue]
              > UI are a bad idea. Your question indicates you still do not understand the
              > concept of a Web browser UI application, where you completely lack almost[/color]
              all[color=blue]
              > control over the UI.[/color]

              I think you will like to see the app when finished, and may change your mind
              a little! ( it is not for pretty, it is for functionality ...)
              [color=blue]
              > Quite frankly I don't understand what is wrong with:...[/color]

              Simply, I want to implement an application in HTML/PHP/JavaScript. I am
              almost there, just have a few little hickups.

              One of them is the transition from the browser to the Windows look. Ideally
              it happens when the user logs in, but yet I have not got it right...

              I need to have a little say 400x400 window to come up with username and
              password, no toolbar, menu etc. I can do this, but I have to use a link with
              a JS, that is no problem. But sometime the user will type it in
              himself....then it would be different, unless I redirect the user...

              I am not sure if I am making sense?

              Thanks anyway,

              Tom



              Comment

              • Michael Winter

                #8
                Re: Redirecting?

                On Wed, 01 Dec 2004 16:26:13 GMT, Grant Wagner
                <gwagner@agrico reunited.com> wrote:

                [snip]
                [color=blue]
                > If someone can duplicate the same look on the same browsers without a
                > <table>, please E-mail me with the solution, I'd be interested to see
                > how you did it.[/color]

                <URL:http://www.mlwinter.pw p.blueyonder.co .uk/clj/wagner/no-table.html>

                duplicates the layout, but not on all the browsers. IE 6, Opera 7.54,
                Mozilla 1.1->1.8a5, and Netscape 7.2 produce exactly the same result, and
                grows well. I'd imagine that IE 5 would handle it properly, but I can't
                check myself, nor can I check with earlier Opera versions.

                It does break in IE if you lower the text size: IE shrinks the DIV, but
                not the INPUT elements so they overlap with the LABELs. The same is true
                for Mozilla at 75% or lower. However, it's more important that layouts
                stay readable when expanded, not shrunk.

                Rendering is sensible in NN 4.77, but obviously not the same.

                I tested with one other browser - Mozilla 1.0 - and that was the only one
                where the layout broke entirely. The CSS implementation is too buggy for
                this particular approach.

                I expect someone over at alt.html, ciwas or ciwah could come up with
                something better. I just though I'd take a quick shot at it. :)

                Mike


                P.S. I posted that, rather than e-mailing it, in case anyone had comments
                to make.

                --
                Michael Winter
                Replace ".invalid" with ".uk" to reply by e-mail.

                Comment

                Working...