<!-- Begin
function Login(){
var done=0;
var username=docume nt.login.userna me.value;
username=userna me.toLowerCase( );
var password=docume nt.login.passwo rd.value;
password=passwo rd.toLowerCase( );
if (username=="mem ber1" && password=="pass word1") {
window.location ="page1.html "; done=1; }
if (username=="mem ber2" && password=="pass word2") {
window.location ="page2.html "; done=1; }
if (username=="mem ber3" && password=="pass word3") {
window.location ="page3.html "; done=1; }
if (done==0) { alert("Invalid login!"); }
}
// End -->
In the above script, is there a way that I can direct a person to a
specific worksheet of an excel workbook saved as an XML spreadsheet
instead of another web page? If so, can someone please reply with the
correct syntax. Thanks. 3 1402
Anthony wrote on 30 dec 2006 in comp.lang.javas cript:
<!-- Begin
function Login(){
var done=0;
var username=docume nt.login.userna me.value;
username=userna me.toLowerCase( );
var password=docume nt.login.passwo rd.value;
password=passwo rd.toLowerCase( );
if (username=="mem ber1" && password=="pass word1") {
window.location ="page1.html "; done=1; }
if (username=="mem ber2" && password=="pass word2") {
window.location ="page2.html "; done=1; }
if (username=="mem ber3" && password=="pass word3") {
window.location ="page3.html "; done=1; }
if (done==0) { alert("Invalid login!"); } }
// End -->
Sending the usernames and passwords to anyone on the web
is not realy a secure constraint.
I think it is more dangerous thad having no login at all,
because it gives false security to the user [and webmaster!]
Prossessing an xml file for display is another ball game,
where others might help you better.
In the above script, is there a way that I can direct a person to a
specific worksheet of an excel workbook saved as an XML spreadsheet
instead of another web page?
If the requested file is saved on a server, you could just put in the URL
and have the user download the file.
If it is saved on the client's pc, there is no access without
compromizing the security settings of the individual browser.
If so, can someone please reply with the
correct syntax. Thanks.
But again, please do not use the above fake security
of using clientside password checking!!!
That being said,
the above code is a bit strange,
as if the programmer did not know the "else" clause.
Where more users should be added a loop and array is more versatile,
only safe to use in a protected intra(!)net surrounding:
=============== test.html =============== ===
<script type='text/javascript'>
function Login(f){
var username = f.elements['username'].value.toLowerC ase();
var password = f.elements['password'].value.toLowerC ase();
var arr = [
['member1','pass word1','http://x.yz/page1.html'],
['member2','pass word2','http://x.yz/page2.html'],
['member3','pass word3','http://x.yz/page3.html']
];
for (n=0;n<arr.leng th;n++)
if (username == arr[n][0] && password == arr[n][1]) {
window.location .href = arr[n][2];
return false;
};
alert('Invalid login!');
return false;
};
</script>
<form name='login' onsubmit='retur n Login(this)'>
<input name='username' username<br>
<input name='password' password<br>
<input type='submit' value='go'>
</form>
=============== =============== ============
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Thanks, for the help. The script I listed earlier is to be used for a
team website on a company intranet. You stated that it is not very
good code or even very secure for that matter. Is the code that you
wrote in your e-mail better? I expect that it probably is. Finally,
can I use this code on my site to do what I want? Thanks, again.
Evertjan. wrote:
Anthony wrote on 30 dec 2006 in comp.lang.javas cript:
<!-- Begin
function Login(){
var done=0;
var username=docume nt.login.userna me.value;
username=userna me.toLowerCase( );
var password=docume nt.login.passwo rd.value;
password=passwo rd.toLowerCase( );
if (username=="mem ber1" && password=="pass word1") {
window.location ="page1.html "; done=1; }
if (username=="mem ber2" && password=="pass word2") {
window.location ="page2.html "; done=1; }
if (username=="mem ber3" && password=="pass word3") {
window.location ="page3.html "; done=1; }
if (done==0) { alert("Invalid login!"); }
}
// End -->
Sending the usernames and passwords to anyone on the web
is not realy a secure constraint.
I think it is more dangerous thad having no login at all,
because it gives false security to the user [and webmaster!]
Prossessing an xml file for display is another ball game,
where others might help you better.
In the above script, is there a way that I can direct a person to a
specific worksheet of an excel workbook saved as an XML spreadsheet
instead of another web page?
If the requested file is saved on a server, you could just put in the URL
and have the user download the file.
If it is saved on the client's pc, there is no access without
compromizing the security settings of the individual browser.
If so, can someone please reply with the
correct syntax. Thanks.
But again, please do not use the above fake security
of using clientside password checking!!!
That being said,
the above code is a bit strange,
as if the programmer did not know the "else" clause.
Where more users should be added a loop and array is more versatile,
only safe to use in a protected intra(!)net surrounding:
=============== test.html =============== ===
<script type='text/javascript'>
function Login(f){
var username = f.elements['username'].value.toLowerC ase();
var password = f.elements['password'].value.toLowerC ase();
var arr = [
['member1','pass word1','http://x.yz/page1.html'],
['member2','pass word2','http://x.yz/page2.html'],
['member3','pass word3','http://x.yz/page3.html']
];
for (n=0;n<arr.leng th;n++)
if (username == arr[n][0] && password == arr[n][1]) {
window.location .href = arr[n][2];
return false;
};
alert('Invalid login!');
return false;
};
</script>
<form name='login' onsubmit='retur n Login(this)'>
<input name='username' username<br>
<input name='password' password<br>
<input type='submit' value='go'>
</form>
=============== =============== ============
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Anthony wrote on 30 dec 2006 in comp.lang.javas cript:
Evertjan. wrote:
>> Sending the usernames and passwords to anyone on the web is not realy a secure constraint. I think it is more dangerous thad having no login at all, because it gives false security to the user [and webmaster!]
>> That being said, the above code is a bit strange, as if the programmer did not know the "else" clause.
Where more users should be added a loop and array is more versatile, only safe to use in a protected intra(!)net surrounding:
============== = test.html =============== === <script type='text/javascript'> function Login(f){
var username = f.elements['username'].value.toLowerC ase(); var password = f.elements['password'].value.toLowerC ase(); var arr = [ ['member1','pass word1','http://x.yz/page1.html'], ['member2','pass word2','http://x.yz/page2.html'], ['member3','pass word3','http://x.yz/page3.html'] ];
for (n=0;n<arr.leng th;n++) if (username == arr[n][0] && password == arr[n][1]) { window.location .href = arr[n][2]; return false; };
alert('Invalid login!'); return false;
}; </script>
<form name='login' onsubmit='retur n Login(this)'> <input name='username' username<br> <input name='password' password<br> <input type='submit' value='go'> </form> ============== =============== =============
[Please do not toppost on usenet]
Thanks, for the help. The script I listed earlier is to be used for a
team website on a company intranet. You stated that it is not very
good code or even very secure for that matter. Is the code that you
wrote in your e-mail better?
I never wrote you an email, this is an usenet posting.
No the code is not better security wize, and if you are not proficuient
enough to see the security flaw for yourself, PLEASE do not go this way.
Password security should be checked ON THE SERVER with serverside code.
I expect that it probably is.
No, see above. Even on an intranet, id you think security is important,
do not use clientside coded checking, becauseanyone can look at the
source and print out all the username/password combinations EVEN BEFORE
being checked.
If you show us an URL with your code, most of us here can get in within
30 seconds.
My code is "better",
in the sense that you can add per single row users ad libitum
without changing the rest of the code:
> var arr = [ ['member1','pass word1','http://x.yz/page1.html'],
['blag','broum', 'http://www.cnn.com\'],
['bl222ag','br88 8oum','http://www.aol.com\'],
['bla444g','b666 roum','http://www.google.com\ '],
> ['member2','pass word2','http://x.yz/page2.html'], ['member3','pass word3','http://x.yz/page3.html'] ];
Finally,
can I use this code on my site to do what I want?
Certainly, if you are not troubled with the above.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Richard James |
last post by:
Are we looking at the scripting world through Python colored glasses?
Has Python development been sleeping while the world of scripting
languages has passed us Pythonista's by?
On Saturday Slashdot ran this article on the "best" scripting
languages.
http://developers.slashdot.org/developers/04/06/12/2125229.shtml?tid=126&tid=156
"Folks at the Scriptometer conducted a practical survey of which
scripting language is the best. While...
|
by: Quest Master |
last post by:
I am interested in developing an application where the user has an
ample amount of power to customize the application to their needs, and
I feel this would best be accomplished if a scripting language was
available. However, I want to code this application in Python, and I
have not yet heard of an implementation of another scripting language
into Python.
An example of what I mean is this (an implementation of Lua into Ruby
-- which I'd...
|
by: SW |
last post by:
I have a Web application that uses Remote Scripting to provide dynamic
data to a web page. I am testing the application in Internet Explorer
6 SP1 running on Windows XP Professional.
When I use the Microsoft JVM, the application works without any
problems. However, as a result of future withdrawal of support of the
Microsoft JVM as a result of the settlement with Sun, I need to ensure
that the application works okay with the Sun Java...
|
by: Vijai Kalyan |
last post by:
Hello All,
I have a few questions which you might seem irrelavant and/or foolish.
I am asking anyway so I can find out.
1. Is XSL as powerful as a programming language such as Java in its
abilities to transform XML? The W3C site has the following definition
on XSLT for example:
"XSLT is designed for use as part of XSL, which is a stylesheet
|
by: dito |
last post by:
I have a .asp page that contains an activex componet. When I launch
it in a browser, it returns an error that the viewer is unable to
create it's resource objects. "To rectify this problem, please
install IE4.0 or install DCOM for W95 and the latest MS Scripting
Engine. These files are available at MS's website"
I am running IE6.0. Where is the scripting engine on MS's site? Will
this have to be installed on every client wishing to...
| |
by: rmacias |
last post by:
I am maintaining an application that was writting in VB6 and has VBA 6.2
integrated into it. The VBA SDK allows the users of the application to
generate VBA projects and scripts to gain access to the application and
perform product specific functions. This provides maximum flexiability for
our users.
We are about to convert this application into .NET. In doing some proof of
concepts, we were able to integrate VBA 6.4 into a .NET...
|
by: Karl Irvin |
last post by:
To use the Textstream object, I had to set a Reference to the Microsoft
Scripting Runtime.
This works good with A2000
Is the Scripting Runtime included with A2002 and A2003 so the Reference
won't be broken when my app is opened with those versions.
Also is the Scripting Runtime included as part of the A2000 Runtime Engine
which some of my customers use.
|
by: Xavier MT |
last post by:
Hi, does anybody use remote scripting on your asp pages?
I want to upgrade to asp.net but I cannot include the remote scripting
because I'm already using VB as a server language.
Any ideas?
|
by: KZSteele |
last post by:
(repost/edit from html forum)
hello -
i am using VBA within a microsoft access project to automate internet explorer. what i am doing is reading data from various frames of my company's web site (non-intranet) and loading it into a table. however, this cross-frame scripting security with IE is getting in the way. i can't even use VB to navigate to frames located on a different domain. the website in question uses framesets, not iframes.
...
|
by: Gushe |
last post by:
Hello all,
I just joined here because I have a little question, and I might perhaps be able to help some of you later on..
But now I have a question;
I just started to learn this "Msn Plus! Live" Scripting, which looks alot like JavaScript, using XML interfaces.
but If I have questions about this sort of scripting; in which forum do I have to post this? because there isn't a forum for Msn Plus! Live scripting, and I wasn't really sure if I...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |