473,652 Members | 2,935 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Button - help

Hi.

I have problem with Button and I don't know what is wrong. Could somebody
help me??
Thanks ;)

html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=IS O-8859-2">
<title>Formular z</title>
<script language="JavaS cript"><!-- HIDE FROM OTHER BROWSERS

function fncOblicz()
{
with (Math)
{
var DD=document.Two j.Dzien.value;
var MM=document.Two j.Miesiac.value ;
if ((DD>=1) && (MM=8) || (DD<=21) && (MM=8))
{HH=10}
else
if ((DD>=22) && (MM=8) || (DD<=31) && (MM=8))
{HH=11}
else
HH=false
}
}
// STOP HIDING FROM OTHER BROWSERS -->
</script>
</head>
<body>
<div align="Center">
<h1><i>Twój Horoskop</i></h1>
<hr width="40%">
<form name="Twoj">
<b>Dzień</b>
<input type="TEXT" name="Dzien" value="" size=3 maxlength=6 >
<br>
<br><b>Miesia c</b>
<input type="TEXT" name="Miesiac" value="" size=3 maxlength=6>
<br>
<form>
<INPUT TYPE="button" VALUE="Oblicz" onClick="fncObl icz();" ><br>
</form>
<b>Horoskop</b>
<input type="TEXT" name="Horoskop" value="" size=3 maxlength=6>
</form>
</div><b>
</body>
</html>

Jan 3 '07 #1
8 1117
Marzena wrote on 03 jan 2007 in comp.lang.javas cript:
Hi.

I have problem with Button and I don't know what is wrong. Could
somebody help me??
Thanks ;)

html>
<head>
<meta http-equiv="Content-type"
content="text/html;charset=IS O-8859-2"<title>Formul arz</title>
<script language="JavaS cript">
use instead:

<script type='text/javascript'>
<!-- HIDE FROM OTHER BROWSERS
do not use that line above,
it only is necessary for browsers more than 10 yars old.

function fncOblicz()
see below
{
with (Math)
Where do you use Marth in the below code?

Nowhere, so leave it out

{
var DD=document.Two j.Dzien.value;
var MM=document.Two j.Miesiac.value ;
if ((DD>=1) && (MM=8) || (DD<=21) && (MM=8))
{HH=10}
else
if ((DD>=22) && (MM=8) || (DD<=31) && (MM=8))
{HH=11}
else
HH=false
It is unclear what you want to do with the value of HH.
So what is your problem?

}
}
// STOP HIDING FROM OTHER BROWSERS -->
Do not use this line above
</script>
</head>
<body>
<div align="Center">
<h1><i>Twój Horoskop</i></h1>
<hr width="40%">
<form name="Twoj">
<b>Dzień</b>
<input type="TEXT" name="Dzien" value="" size=3 maxlength=6 >
<br>
<br><b>Miesia c</b>
<input type="TEXT" name="Miesiac" value="" size=3 maxlength=6>
<br>
<form>
You cannot use <forminside a <form>,
and expect the two to work as one <form>
Leave this <formout.
<INPUT TYPE="button" VALUE="Oblicz" onClick="fncObl icz();"
Better use:

<INPUT TYPE="submit" VALUE="Oblicz">

and in the top of the form

<form onsubmit="fncOb licz(this);retu rn false;">

and in the function:

function fncOblicz(f) {
var DD = f.elements['Dzien'].value;
.....
><br>
</form>
Leave this </formout
<b>Horoskop</b>
<input type="TEXT" name="Horoskop" value="" size=3 maxlength=6>
</form>
</div><b>
<b>? why?
</body>
</html>



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 3 '07 #2
Hi!!

Thanks for all. I want here that if someone write in
Dzien=3 and Miesiac=8 then click "Oblicz" and in Horoskop=10
or Dzien=25 and Miesiac=8 then click "Oblicz" and in Horoskop=11

I hope you understand what I want to say
Marzena
Jan 3 '07 #3
Marzena wrote on 03 jan 2007 in comp.lang.javas cript:
Thanks for all. I want here that if someone write in
Dzien=3 and Miesiac=8 then click "Oblicz" and in Horoskop=10
or Dzien=25 and Miesiac=8 then click "Oblicz" and in Horoskop=11

I hope you understand what I want to say
No I don't really understand.

I guess you mean this, try it:

============ test.html =========

<script type='text/javascript'>

function fncOblicz(f) {
var DD = +f.elements['Dzien'].value;
var MM = +f.elements['Miesiac'].value;
var HH = f.elements['Horoskop'];
if ( ((DD>=1) || (DD<=21)) && (MM==8) ) {
HH.value = '10';
} else if ( ((DD>=22) || (DD<=31)) && (MM==8) ) {
HH.value = '11';
} else {
HH.value = '';
};
return false;
};

</script>

<form onsubmit='retur n fncOblicz(this) ;'>
<b>Dzień:</b>
<input type='TEXT' name='Dzien'>
<br><br>
<b>Miesiac:</b>
<input type='TEXT' name='Miesiac'>
<br><br>
<input type='submit' value='Oblicz'>
<br><br>
<b>Horoskop:</b>
<input type='TEXT' name='Horoskop' readonly>
</form>

=============== =============== ==

compare is not MM=8 but MM==8

+f.elements['Dzien'].value

the + is necessary if you wanrt to compase numbers,
not strings like '08'=='8'

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 3 '07 #4
Hi!!

Yes, that's exactly what I want. Thank you very much for your help. You are
really nice ;)

Marzena
Jan 3 '07 #5
Marzena wrote on 03 jan 2007 in comp.lang.javas cript:
Yes, that's exactly what I want. Thank you very much for your help.
You are really nice ;)
Eh???

Please, this is not email.

Othere and I are wondering where you are responding on.

On usenet following netiquestte, you should always quote what you are
responding on.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 3 '07 #6

"Evertjan." wrote on 03 jan 2007 in comp.lang.javas critp:
Eh???

Please, this is not email.
Sorry
Othere and I are wondering where you are responding on.
Do you mind, where I live??
On usenet following netiquestte, you should always quote what you are
responding on.
Sorry, I'll remember ;)

Marzena
Jan 3 '07 #7
Marzena wrote on 03 jan 2007 in comp.lang.javas cript:
>Othere and I are wondering where you are responding on.

Do you mind, where I live??
That is "responding from".

"responding on" points to the [hidden] subject of your response.

;-}

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 3 '07 #8

Evertjan wrote on 03 jan 2007 in comp.lang.javas cript:
>>Othere and I are wondering where you are responding on.

Do you mind, where I live??

That is "responding from".

"responding on" points to the [hidden] subject of your response.
Ok thanks ;)

Marzena
Jan 4 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2276
by: TrvlOrm | last post by:
Can any one please help me...I am new to JavaScript and I have been struggling with this code for days now and can't figure it out. I would like to get the Buttons to correspond with the action to either a) generate numbers b) Prompts a user to locate a web page c) go to previous page in history list d) Loads next page in history list e) Promps the user for a URL and loads the web page in a new window f) and Re-Sizes the window. ...
6
12814
by: Sujan | last post by:
Hello all, Help me! -------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <script language="JavaScript"> <!--
7
2573
by: MgGuigg | last post by:
Hello all, This is my first time posting a question to this forum, so here is hoping I am following protocol. I am scraping the rust off my old Basic programming skills, and have just recently upgraded to VB.NET, and I have a lot of catching up to do. That being said, I have come a long way in a short while, however, I am stumped at the moment. I have read through days of posts, but have not been able to address my specific question, so...
3
13738
by: NateDawg | last post by:
I'm reposting this. I'm kinda in a bind untill i get this figured out, so if anyone has some input it would sure help me out. Ok, I’ve noticed a few gridview problems floating around the forum. Everyone wants to do a java confirmation box when a user clicks the delete button. Fair enough, basic user design rules state that you should always confirm a delete action. There is also a consensus that the best way to do this is a template...
0
1874
by: David | last post by:
Hello all. I am trying to implement my first server control and have run into two problems that I cannot solve. I need the assistance of someone with more experience. My goal was to create an input button that would allow for both text and an image on it. I am attempting to accomplish this by basing off of the asp:button control. I added a property for the image url and one to determine if the image is displayed on the left or right...
3
1990
by: Kannan | last post by:
Hi, I am trying to created Outloook Add-in Com in outlook using C#. I have seen this URL for developing this sample http://support.microsoft.com/?kbid=302901 When I executed this program it created new custom button called "My Custom Button" in the Outlook menu bar. But when I tried to create one more button called "Forward Mail" (code is
8
2029
by: Richard Maher | last post by:
Hi, I am in a mouseup event for button A and I'd like to disable=false button B before starting some work. Is there anyway that an event for button B can then fire before my event processing for button A's mouseup has completed? I beleive event processing to be single-threaded for good reason but I need a "stop" button and it's no good if it doesn't do anything until the other processing has finished :-)
4
3669
by: glbdev | last post by:
Hi, I posted this question yesterday but didn't get the answer I needed. I am DESPERATE to get this working so I'm re-posting it because I don't think I worded it correctly. I have a GridView which is databound to a table. All the data is being pulled correctly so there is no problem there. On each row I have an image button which is attached to a
3
1807
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hi all, i betcha here's a question never asked before ;) i have a simple web form with a gridview and a button. the button doesn't do anything but a postback. i load up the gridview from the database, hit the button, then hit the refresh button and here's where my question occurs. I get a message saying that "it needs to resubmit/resend the data?" what is happening here and how do I resolve this undesired message?
23
19102
by: shashi shekhar singh | last post by:
Dear sir, I have a word document file contains text and images, now i have saved it as a web page and wants to display it on browser , using , string str=directory.getfiles(""); response.contentType="text/html"; response .writefile(""); it displayed in different format and images not shown blank spaces shown as ?????????? and image as X.
0
8283
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8811
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8704
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8470
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8590
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2707
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1591
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.