473,320 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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
Jul 23 '05 #1
7 1150
Tom Szabo wrote:
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


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('yourLogin.html', 'login',
'width=300,height=200');">
<p>Use the
<a href="#" onclick="if (w && w.focus) w.focus();return 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 <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #2
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

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('yourLogin.html', 'login',
'width=300,height=200');">
<p>Use the
<a href="#" onclick="if (w && w.focus) w.focus();return 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 <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #3
Tom Szabo wrote:
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.
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).
I could not be bothered with any other, so as long as it works with these
two I am happy :-)


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 <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #4
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
Jul 23 '05 #5
Tom Szabo wrote:
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....:-)
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.
.Net is also way out of the question, I am actually going the other way! :-)
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".
Now the next question:
Can I overcome the JS blocking problem with using a certificate?


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">User:</label></td>
<td><input type="text" id="userId" name="user" value=""></td>
</tr>
<tr>
<td><label for="pwId">Password:</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 <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #6
Hi Grant,

"> 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
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...:-)
system, you are doing your clients a disservice. Windows XP is hardly a beta product but I'm sure you will never believe that.
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.
.Net is also way out of the question, I am actually going the other way!
:-)

..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 :-))) )
Again, to discount .Net without evaluating whether it will meet your clients' needs is doing a disservice.
..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.
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.
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 ...)
Quite frankly I don't understand what is wrong with:...


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

Jul 23 '05 #7
On Wed, 01 Dec 2004 16:26:13 GMT, Grant Wagner
<gw*****@agricoreunited.com> wrote:

[snip]
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.


<URL:http://www.mlwinter.pwp.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.
Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ivo Woltring | last post by:
Hi Pythoneers, I am trying to make my own gui for mencoder.exe (windows port of the terrific linux mencoder/mplayer) to convert divx to Pocket_PC size. My current app creates a batch script to...
10
by: Kenneth Keeley | last post by:
Hi, I have been having problems with Gecko based browsers not redirecting properly. This is the line of code that does the redirecting: Response.Redirect ("Validation.asp?BookingNo=1234567") ...
0
by: Christophe HELFER | last post by:
hi, I have some problem with redirecting input and output from a process. I can only use VB language (sorry...) Situation: I have to use the Cisco Network Registrar (DNS And DHCP server) ...
3
by: lozd | last post by:
Would appreciate any solutions people could offer for this. Basically I wan't to use a frameset with an aspx page as the contents rather than a htm page and I'd like to be able to redirect the...
0
by: Sune Hansen | last post by:
Hi guys, I really hope someone can help me with my problem. Here is the scenario: I have a development environment on my locale machine. Once in a while when everything has been tested I...
1
by: Bilbo | last post by:
Hello, How do I programatically redirect a page in "another frame" using C# in ASP.NET? Server.Transfer redirects the current page...not a different frame. Thanks.
3
by: tony | last post by:
I've been searching through the threads to find a solution for 401.3 error triggered by windows authentication not being able to redirect to a custom error page to no avail. It seems that ASP.NET...
4
by: Greg Smalter | last post by:
Redirecting from page to page within a web project is pretty easy. However, all Redirect methods take strings as arguments, as if you mistype the string, you don't find out until run time that you...
8
by: Morpheus | last post by:
I am trying to test a function that outputs text to the standard output, presumably using a cout call. I do not have access to the source, but need to test the output. Is this possible? I can...
17
by: mansb2002 | last post by:
Hi, We recently moved our webserver from Win2K to Win2003. The application works fine. Only problem is that when user views a report as a PDF, IE does not show it. The following code is used to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.