473,396 Members | 1,834 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,396 software developers and data experts.

Re Posted in this Forum!

2
Hi am wondering if u can give me a little help with some code. Im a little new to JS so please bare with me

Im creating a login code for our clients to visit a section on our website that is personnal to them. I wanted to stay away from the php side for this website.

The section does not need to be very secure, but the code i have at the moment allows the users to log in but it does not open a new browser window, it opens the page in the current browser window which obviously shows the URL in the search bar! I want to avoid showing anyone the URL. So i thought about the window.open command. Having a new window pop up will allow me to show the page with no Header search abr or anything i prosume? If so how do i implement this into my code?

I have attached the section of code im using as the login button.

if(imgSubmit == ""){
document.write('<input type="button" value="Logon" name="Logon" onclick="login(username.value,password.value, window.open)">');
} else {
document.write('<input type="image" src="'+imgSubmit+'" name="Logon" onclick="login(username.value,password.value)">');
}

This is my code for the login button used in JS. I just want to know where to put the window.open line of code. I think its within the onclick line but im not sure!

Any help would be much appreciated

Cheers.
Oct 6 '06 #1
2 1016
r035198x
13,262 8TB
Hi am wondering if u can give me a little help with some code. Im a little new to JS so please bare with me

Im creating a login code for our clients to visit a section on our website that is personnal to them. I wanted to stay away from the php side for this website.

The section does not need to be very secure, but the code i have at the moment allows the users to log in but it does not open a new browser window, it opens the page in the current browser window which obviously shows the URL in the search bar! I want to avoid showing anyone the URL. So i thought about the window.open command. Having a new window pop up will allow me to show the page with no Header search abr or anything i prosume? If so how do i implement this into my code?

I have attached the section of code im using as the login button.

if(imgSubmit == ""){
document.write('<input type="button" value="Logon" name="Logon" onclick="login(username.value,password.value, window.open)">');
} else {
document.write('<input type="image" src="'+imgSubmit+'" name="Logon" onclick="login(username.value,password.value)">');
}

This is my code for the login button used in JS. I just want to know where to put the window.open line of code. I think its within the onclick line but im not sure!

Any help would be much appreciated

Cheers.
Now that topic will catch quite a lot of eyes!
Oct 6 '06 #2
monamac
12
yeah... you could do this, but you will have to deal with popup blockers:

document.write('<input type="button" value="Logon" name="Logon" onclick="login(username.value,password.value);wind ow.open(\'Sample.htm\',null,\'[parameters]\');">');

hope this helps.
Oct 9 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Jan Roland Eriksson | last post by:
I'm posting a revised version of the meta FAQ for this NG. Beware that there are a few links in there that does not have a resource available for them yet but, over and all, this following document...
18
by: Choxio | last post by:
Using ASP you can access posted form elements. Is it possible to access them from JavaScript? myHTML.htm <form action=myASP.asp> <input type=hidden id=f1 value=val1> <input type=hidden...
2
by: akshayrao | last post by:
could someone point me in the right direction regarding this question?? http://groups.google.com/group/programpara/browse_thread/thread/75b58c897f890930 thanks.
2
by: siddu | last post by:
Hi , How to show only my posted Questions in this Forum under Asp.Net Category becoz i am posted so many Questions,but i couldn't see the answers for my posted Questions due to many questions. ...
0
by: BlipBlip | last post by:
Hi All, I was not sure which forum to post the message to since the problem related to ASP/AJAX, but decided to post it here. I have a simple routine which utilizes an Ajax to query database for...
1
by: Froefel | last post by:
This is really a test message. I've been trying to post messages to this forum the past severeal days, but even though I get a copy of the message in my email after it's been sent with Google...
1
by: plultyGuccilt | last post by:
http://geolivre.saude.rn.gov.br/forum/viewtopic.php?t=294 http://geolivre.saude.rn.gov.br/forum/viewtopic.php?t=295 http://geolivre.saude.rn.gov.br/forum/viewtopic.php?t=296...
1
jkmyoung
by: jkmyoung | last post by:
I was wondering how you edit an article you've posted. Was given a couple suggestions on the article after it was posted, and would like to incorporate these changes. ...
6
by: creamy | last post by:
Guys, how do i change the image in the login screen. without any software. I mean programatically. Is there any way i can tweak windows to display an image of my choice on login. Thanx. Even...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
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,...

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.