Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JavaScript in Netscape

Status
Not open for further replies.

MiBJ

Programmer
Joined
Oct 22, 2000
Messages
7
Location
RU
I have a problem.

In my index.html I wrote:
Code:
<SCRIPT language=javascript>
<!--
  function doSend() {
    document.login.name.value = &quot;My Name&quot;;
    document.login.pass.value = &quot;My Password&quot;;
    document.login.submit();
  }
// -->
</SCRIPT>
<HTML><BODY>
<FORM NAME=login METHOD=post ACTION=login.php3>
  Name: <INPUT TYPE=text NAME=name SIZE=60> <BR>
  Password: <INPUT TYPE=password NAME=pass SIZE=60> <BR>
  <INPUT onClick=&quot;doSend();return false;&quot; VALUE=Submit TYPE=submit>
</FORM>
</BODY></HTML>
and in my login.php3 I wrote
Code:
<?
  print (&quot;Name=$name, Password=$pass&quot;);
?>
When I fill this form in Netscape with name BombJack and password Mighty and click Submit button I see the line:
Code:
Name=My Name, Password=Mighty
Why so? MiBJ,
mighty_bombjack@mail.ru
 
try:
<?php
echo (&quot;Name=&quot;.$name, &quot;Password=&quot;.$pass);
?>

echo, print and printf work the same, i prefer echo.

GL

MiQ
mcvdmvs@mcvdmvs.net
Yeah, well, erhm, ok... I'm busy trying to teach myself JavaScript, C++, Java and other webrelated stuff.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top