Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Languages, Compilers, Interpreters
Register

Reply
 
LinkBack Thread Tools
Old 27.07.2005, 09:32   #1
полюбому йес эм...
 
Mesrop's Avatar
 
Join Date: 02 2005
Location: near the computer
Age: 26
Posts: 3,243
Downloads: 3
Uploads: 0
Reputation: 129 | 3
Exclamation Проблема.. Java Alert

Yerb PAGE anunov input-um grum em 20, ban chi asum, isk mnacac depqerum ALERT a berum(esqan@ im uzacova).
indz petqa mi dzev, vor ayd 20-i tex@ linen shat tver, bayc chem uzum vor amen tvi hamar senc grem
if (openpap.page.value == XX) return true;
uzum em vor aseq, vonc karam asem, vor 20, 30, 40-@ irar havasar en.. vor hesht lini, vorovhetev mot 250 tiv petq e grem..
tekuz ayd tver@ grem mi faili mej, script@ FIND ta, u imana beri ALERT@ te voch..
harcs miqich xarn er, knereq..
Code:
<script language="JavaScript" type="text/javascript"> 

function checkscript() { 
if (openpap.page.value == 20)  return true; 

else
{ alert("не найдено"); return false; }
}  
</script>
Reply With Quote
Old 27.07.2005, 09:40   #2
ЙЦУКЕН
 
Join Date: 07 2002
Location: 0x68,0x69,0x72, 0x69,0x6e,0x67, 0x20,0x6e,0x6f, 0x77
Age: 47
Posts: 3,118
Downloads: 0
Uploads: 0
Reputation: 5 | 0
Default

ндя ... а array определить с числами и цикл написать не судьба?
Reply With Quote
Old 27.07.2005, 10:59   #3
*****
 
Michael's Avatar
 
Join Date: 03 2003
Location: Yerevan
Posts: 314
Downloads: 0
Uploads: 0
Reputation: 9 | 0
Default

ete Array ches uzum
switch ov ara (bajc Array-@ aveli lav e )
Reply With Quote
Old 27.07.2005, 11:02   #4
Silence
 
Moonlight's Avatar
 
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Downloads: 1
Uploads: 0
Blog Entries: 3
Reputation: 202 | 3
Default

a mojet s vector-om?
Reply With Quote
Old 27.07.2005, 11:08   #5
полюбому йес эм...
 
Mesrop's Avatar
 
Join Date: 02 2005
Location: near the computer
Age: 26
Posts: 3,243
Downloads: 3
Uploads: 0
Reputation: 129 | 3
Default

ok. yete ARRAY -@ aveli lava, xndrum em phoqr orinak bereq, dzev@ imanam..
Reply With Quote
Old 27.07.2005, 11:31   #6
ЙЦУКЕН
 
Join Date: 07 2002
Location: 0x68,0x69,0x72, 0x69,0x6e,0x67, 0x20,0x6e,0x6f, 0x77
Age: 47
Posts: 3,118
Downloads: 0
Uploads: 0
Reputation: 5 | 0
Default

ну все, держите меня трое
я предлагаю набрать в гугл -- javascript array
и почитать хотя бы первый линк. это несложно. нужно почитать и подумать, почитать и подумать, почитать и подумать
Reply With Quote
Old 27.07.2005, 12:01   #7
полюбому йес эм...
 
Mesrop's Avatar
 
Join Date: 02 2005
Location: near the computer
Age: 26
Posts: 3,243
Downloads: 3
Uploads: 0
Reputation: 129 | 3
Default

ha.. haskaca..
bayc array-i depqum ALERT-@ chi bacvum..
aysinqn amboxch script@ imast@ korcnuma..
http://www.w3schools.com/js/js_obj_array.asp
arajin 2 orinaknerovel phorceci.
Reply With Quote
Old 27.07.2005, 12:19   #8
ЙЦУКЕН
 
Join Date: 07 2002
Location: 0x68,0x69,0x72, 0x69,0x6e,0x67, 0x20,0x6e,0x6f, 0x77
Age: 47
Posts: 3,118
Downloads: 0
Uploads: 0
Reputation: 5 | 0
Default

а вот у меня в коде, на тртьей строке выдает ошибку - parse error, не подскажете, из-за чего?
Reply With Quote
Old 27.07.2005, 12:32   #9
полюбому йес эм...
 
Mesrop's Avatar
 
Join Date: 02 2005
Location: near the computer
Age: 26
Posts: 3,243
Downloads: 3
Uploads: 0
Reputation: 129 | 3
Default

nm jan yes chgitem Java.. et script@ prosto hishum ei, petq ekav, greci...
ches hushi inch anem?
Reply With Quote
Old 27.07.2005, 13:09   #10
*****
 
Michael's Avatar
 
Join Date: 03 2003
Location: Yerevan
Posts: 314
Downloads: 0
Uploads: 0
Reputation: 9 | 0
Default

<html>
<head>
<title>Untitled Document</title>
<script language="JavaScript" type="text/javascript">
var openpap = 23;
function checkscript() {
var array = [ 1, 2, 3, 5, 6, 7, 8];
for( var i = 0; i< array.length ; i++ ) {
if (openpap == array[i] )
return true;

}
alert("не найдено");
return false;

}

</script>
</head>
<body>
<input type="button" onClick="checkscript();" value="GO">

</body>
</html>
Reply With Quote
Old 27.07.2005, 13:14   #11
полюбому йес эм...
 
Mesrop's Avatar
 
Join Date: 02 2005
Location: near the computer
Age: 26
Posts: 3,243
Downloads: 3
Uploads: 0
Reputation: 129 | 3
Default

Ay mersi Michael jan!!!!!
shat goh em..
Reply With Quote
Old 27.07.2005, 13:19   #12
*****
 
Michael's Avatar
 
Join Date: 03 2003
Location: Yerevan
Posts: 314
Downloads: 0
Uploads: 0
Reputation: 9 | 0
Default

Quote:
Originally Posted by mesrop
Ay mersi Michael jan!!!!!
shat goh em..
Welcome
Reply With Quote
Old 27.07.2005, 13:39   #13
полюбому йес эм...
 
Mesrop's Avatar
 
Join Date: 02 2005
Location: near the computer
Age: 26
Posts: 3,243
Downloads: 3
Uploads: 0
Reputation: 129 | 3
Default

chgidem inch anem..
Michaeli grac@ shat lavner, bayc chashxatec scriptis vra..
hesa nayeq @ndhanur kod@.
Code:
<table cellSpacing="0" width="300" border="0" style="border-collapse:collapse" fpstyle="1,011111100" bordercolor="#FFFFFF">
  <tr> 
    <td valign="middle" bordercolor="#FFFFFF" style="border-style:solid; border-width:1; "> 
<script language="JavaScript" type="text/javascript"> 
var openpap = 23;
function checkscript() { 
var array = [ 1, 2, 3, 5, 6, 7, 8];
for( var i = 0; i< array.length ; i++ ) {
if (openpap.page.value == array[i] ) 
return true; 

}
alert("íå íàéäåíî"); 
return false; 

} 

</script>
      <form name="openpap"  method="get"  onSubmit="checkscript()">
        <table width="100%" cellspacing="0" cellpadding="0">
          <tr> 
            <td width="65%"><strong><font color="#FFFFFF" size="2" face="Verdana">Open 
              the newspaper</font></strong></td>
          </tr>
          <tr> 
            <td><font color="#FFFFFF" size="2pt">type newspaper's ID for opening</font></td>
            <td><input type=text name="page" maxlength="4" size="4"></td>
            <td><input name="submit" type="submit"   value="GO">
			</td>
          </tr>
		            <tr> 
            <td><font color="#FFFFFF" size="2pt">download newspaper's list</font></td>
     
          </tr>
        </table>
      </form></td>
  </tr>
</table>
Plz ogneq.. im mot senc chashxatec.. yerevi bana petq phoxel ha??
Reply With Quote
Old 27.07.2005, 14:06   #14
*****
 
Michael's Avatar
 
Join Date: 03 2003
Location: Yerevan
Posts: 314
Downloads: 0
Uploads: 0
Reputation: 9 | 0
Default

<table cellSpacing="0" width="300" border="0" style="border-collapse:collapse" fpstyle="1,011111100" bordercolor="#FFFFFF">
<tr>
<td valign="middle" bordercolor="#FFFFFF" style="border-style:solid; border-width:1; ">
<script language="JavaScript" type="text/javascript">

function checkscript() {

var array = [ 1, 2, 3, 5, 6, 7, 8];
for( var i = 0; i< array.length ; i++ ) {
if (parseInt(document.openpap.page.value) == parseInt(array[i]) )
return true;

}
alert("íå íàéäåíî");
return false;

}

</script>
<form name="openpap" method="get" onSubmit="checkscript()">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="65%"><strong><font color="#FFFFFF" size="2" face="Verdana">Open
the newspaper</font></strong></td>
</tr>
<tr>
<td><font color="#FFFFFF" size="2pt">type newspaper's ID for opening</font></td>
<td><input type=text name="page" maxlength="4" size="4"></td>
<td><input name="submit" type="submit" value="GO" >
</td>
</tr>
<tr>
<td><font color="#FFFFFF" size="2pt">download newspaper's list</font></td>

</tr>
</table>
</form></td>
</tr>
</table>
__________________
Men's eyes were made to look, and let them gaze.
Reply With Quote
Old 28.07.2005, 08:39   #15
полюбому йес эм...
 
Mesrop's Avatar
 
Join Date: 02 2005
Location: near the computer
Age: 26
Posts: 3,243
Downloads: 3
Uploads: 0
Reputation: 129 | 3
Default

Shat mersi Michael jan!
miqich shtkum kar, petqa liner
Code:
 <form name="openpap" method="get" onSubmit="return checkscript()">
Return - bar@ avelacreci, normal ashxatuma.. mersi!
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 09:17.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.