[advanced search]
Results from the most recent live auction are here.
20 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 12-16-2003, 06:26 AM   · #1
Matrixs
New Member
 
Trader Rating: (0)
Join Date: Nov 2003
Posts: 14
NP$: 24.00 (Donate)
Matrixs is an unknown quantity at this point
Javascript problems need help please

Good evening all

due to this javascript book things are not working going by the book and it's not happing, when you go to click on the link a new window come in bit like a popup but in a small window i go to click on the link it dont come up in my browser whats happing here can some help fix the problem for us.

<HTML>
<HEAD>
<FORM>
<A HREF="http://WWW.coolconnections.com.au/cgi-bin/">Login<A/>
<SCRIPT LANGUAGE="jAVAscript" Type"text"/javascript">
<!--function Submitpassword(frm)
{
//
// Get the value entered into the text box
//
var password = frm.pw.value
// Con it to lowercase
//
//
password = password.tolowercase()
//
// Add the.htm extension
//
var loc = password + ".htm
//
// Make sure ther user entered something
//
if (password != "")
{
// If so, send the Browser there
//
opener.location.href = loc
}
//
// close this window
//
window.close()
}
//-->
<SCRIPT>
<TITLE>Username & Password is Required</TITLE>


Please register or log-in into NamePros to hide ads
__________________
Follow the white rabbit the Matrixs has you
Matrixs is offline   Reply With Quote
Old 12-16-2003, 03:06 PM   · #2
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
There are several things wrong with your code. I won't go into detail, just replace the following:

Quote:
<SCRIPT LANGUAGE="jAVAscript" Type"text"/javascript">

This should be:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">

Quote:
<!--function Submitpassword(frm)

This should be two lines:
<!--
function submitpassword(frm)


Quote:
window.close()
}
//-->
<SCRIPT>

This should be:
window.close()
}
//-->
</SCRIPT>


If there are any more problems, just say so.
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Old 12-16-2003, 06:34 PM   · #3
Matrixs
New Member
 
Trader Rating: (0)
Join Date: Nov 2003
Posts: 14
NP$: 24.00 (Donate)
Matrixs is an unknown quantity at this point
I fix it up but still not working in my defult browser, the link is there but peeks going to another page when i don't want it too. i want it to put up like a small window. I would like to thank you for helping out



<HTML>
<HEAD>
<FORM>
<A HREF="http://WWW.coolconnections.com.au/cgi-bin/">Login<A/>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function submitpassword(frm)
{
//
// Get the value entered into the text box
//
var password = frm.pw.value
// Con it to lowercase
//
//
password = password.tolowercase()
//
// Add the.htm extension
//
var loc = password + ".htm
//
// Make sure ther user entered something
//
if (password != "")
{
// If so, send the Browser there
//
opener.location.href = loc
}
//
// close this window
//
window.close()
}
//-->
</SCRIPT>
<TITLE>Username & Password is Required</TITLE>
<BODY>

</BODY>

</HTML>
__________________
Follow the white rabbit the Matrixs has you
Matrixs is offline   Reply With Quote
Old 12-16-2003, 06:45 PM   · #4
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
It seems to me like your <BODY> tags are empty. Can you give me a link to the site with this page so I can check it out?
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Old 12-16-2003, 08:11 PM   · #5
Matrixs
New Member
 
Trader Rating: (0)
Join Date: Nov 2003
Posts: 14
NP$: 24.00 (Donate)
Matrixs is an unknown quantity at this point
it's not on the web yet still doing drawings for my site (ill11) atm i'm just using notepad and using my defult page 2 veiw the work i have done. for the javascripr dose it need to be on the web site to make it work cant i just browse it before i upload it.
__________________
Follow the white rabbit the Matrixs has you
Matrixs is offline   Reply With Quote
Old 12-17-2003, 05:41 AM   · #6
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
Quote:
<HTML>
<HEAD>
<FORM>
<A HREF="http://WWW.coolconnections.com.au/cgi-bin/">Login<A/>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function submitpassword(frm)
{
//
// Get the value entered into the text box
//
var password = frm.pw.value
// Con it to lowercase
//
//
password = password.tolowercase()
//
// Add the.htm extension
//
var loc = password + ".htm
//
// Make sure ther user entered something
//
if (password != "")
{
// If so, send the Browser there
//
opener.location.href = loc
}
//
// close this window
//
window.close()
}
//-->
</SCRIPT>
<TITLE>Username & Password is Required</TITLE>
<BODY>

</BODY>

</HTML>



Try this:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function submitpassword()
{
var password = ussub.pw.value;
password = password.tolowercase()
var loc = password + ".htm";
if (password != "")
{
opener.location.replace(loc);
}
window.close();
}
//-->
</SCRIPT>
<TITLE>Username & Password is Required</TITLE>
</HEAD>
<BODY>
<P ALIGN="center"><FORM NAME="ussub" ACTION="javascript:submitpassword();" METHOD="POST"><B>Username:</B> <INPUT TYPE="password" NAME="pw"> <INPUT TYPE="submit" VALUE="Login"></FORM>
</P>
</BODY>

</HTML>
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Old 12-17-2003, 11:16 PM   · #7
Matrixs
New Member
 
Trader Rating: (0)
Join Date: Nov 2003
Posts: 14
NP$: 24.00 (Donate)
Matrixs is an unknown quantity at this point
Ok its there but whats happen to my login link and my pop window thats not there.
__________________
Follow the white rabbit the Matrixs has you
Matrixs is offline   Reply With Quote
Old 12-18-2003, 04:23 AM   · #8
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
That code I gave you is for the popup window. You should save that code as "passpop.htm". The code for the normal window would be something like:

<HTML>
<HEAD>
<TITLE>Username & Password Required</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
window.open("passpop.htm","mywindow","resizable");
//-->
</SCRIPT>
The username and password window has been opened. If you cannot see it, you will need to update your web browser.
</BODY>
</HTML>
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Old 12-18-2003, 04:50 PM   · #9
Matrixs
New Member
 
Trader Rating: (0)
Join Date: Nov 2003
Posts: 14
NP$: 24.00 (Donate)
Matrixs is an unknown quantity at this point
How do i update my browser the popup works but way to big is there anyway i can make it smaller. thanks for helping out.
__________________
Follow the white rabbit the Matrixs has you
Matrixs is offline   Reply With Quote
Old 12-19-2003, 04:14 AM   · #10
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
<HTML>
<HEAD>
<TITLE>Username & Password Required</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
window.open("passpop.htm","mywindow","resizable,width=200,height=250");
//-->
</SCRIPT>
The username and password window has been opened. If you cannot see it, you will need to update your web browser.
</BODY>
</HTML>


You can change the width= and height= to your liking. It measures in pixels.
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
Website Header Design EscrowDNS RealTechNetwork
Advertise your business at NamePros
All times are GMT -7. The time now is 09:16 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0