Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Javascript problems need help please

Namecheap AuctionsNamecheap Auctions
NamecheapNamecheap
SpaceshipSpaceship
Watch

Matrixs

Established Member
Impact
0
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>
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
There are several things wrong with your code. I won't go into detail, just replace the following:

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

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


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


If there are any more problems, just say so.
 
0
Close
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

B-)

<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>
 
0
Close
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?
 
0
Close
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.
 
0
Close
<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>
 
0
Close
Ok its there but whats happen to my login link and my pop window thats not there.
 
0
Close
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>
 
0
Close
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.
 
0
Close
<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.
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back