Change the property of child window (Form1) as..
Form1.BorderStyle = 1
Form1.Moveable = False
Change the property of child window (Form1) as..
Form1.BorderStyle = 1
Form1.Moveable = False
Change the line no. 6 as
Do While Not rcdset.EOF = True
JX_man, thanks for your example sir.
I have done with my previous example. Its working nicely.
Module1
Type UDT
a As Integer
b As Integer
c As Integer
End Type
Public Function ReturnPrevCurNxt(x As Integer) As UDT
ReturnPrevCurNxt.a = x - 1
ReturnPrevCurNxt.b = x
ReturnPrevCurNxt.c = x + 1
End Function
form1
Private Sub Command1_Click()
Text2.Text = ReturnPrevCurNxt(Val(Text1.Text)).a
Text3.Text = ReturnPrevCurNxt(Val(Text1.Text)).b
Text4.Text = ReturnPrevCurNxt(Val(Text1.Text)).c
End Sub
So, I am going to closed this thread as it has solved.
Thank you all
@jhai salvador
Thanks for replying, Yes, it can be done using array. I have tried like this
Form1
Private Sub Command1_Click()
Text2.Text = ReturnPrevCurNxt(Val(Text1.Text))(0)
Text3.Text = ReturnPrevCurNxt(Val(Text1.Text))(1)
Text4.Text = ReturnPrevCurNxt(Val(Text1.Text))(2)
End Sub
Module1
Function ReturnPrevCurNxt(x As Integer)
Dim arr(0 To 2) As Double
arr(0) = x - 1
arr(1) = x
arr(2) = x + 1
ReturnPrevCurNxt = arr
End Function
But, I have not tried using user define type or classes yet.
How to return multiple value from a function in VB 6.0
Any suggestion sir/madam?
Probably, you have done spelling mistake somewhere or something else. Without observing your codes, we can't help you. So, its better to post your save button's codes and table's field name.
I have found the syntex/reason, why the JavaScript was not working in the FireFox after putting the doctype declaration in the ASP file. It was only because of not using the getElementById
Earlier, I had used like this....
if(num=='1')
{
if (n2.value=='')
{
n2.value=n1.value;
n1.value='';
Payer.value=Prom;
}
else if (n4.value=='')
{
n4.value=n1.value;
n1.value='';
}
}
Now, I have used like this.....
if(num=='1')
{
if (document.getElementById('n2').value=='')
{
document.getElementById('n2').value=document.getElementById('n1').value;
document.getElementById('n1').value='';
}
else if (document.getElementById('n4').value=='')
{
document.getElementById('n4').value=document.getElementById('n1').value;
document.getElementById('n1').value='';
}
}
Now the JavaScript is working in FireFox also. So, I am closing this thread, though there is a layout problem in IE6.Thank you all for replying to this thread with valuable information.
Dear DrJohn,
Thanks for replying sir, as you mentioned that Doctype declaration is not there in html. So, I have tried putting Doctype declaration above in my asp file. And I have tried using both html 4.01 Strick and transitional one by one and have got the result as follows ...
Firefox 11 - Layout is good as per my requirement but JavaScript is not working. Please, let me know what i have to do for that.
IE 6 - Layout is not good but JavaScript is working properly.
IE 8 and Google Chrome - Everything is ok. Here layout and JavaScript are working properly.
Note : I have written all codes using windows Notepad.
Dear Sir/Madam,
I am waiting for your advice on my CSS codes.
Thank you madam, now its showing.....
Dear Madam/Sir,
There is only one Category (Popsting Games) showing in my profile. Whereas, I have posted nearly 10 Categories. Please check it, where is the problem.
Thanks.
Hacker -> Dangerous
Dear Dilse4SK,
As you mentioned that you have product information table where product ID, product name, unit price of that product etc. are there. And I am thinking that some records are already there.
First of all, put a Combobox or listbox (for product name) and two label or textbox (one for unit price another for total price (after multiplication)).
Load the product name into the combo box or list box from your product information table by using form load event.
On selection of combobox or list box, product unit price should be displayed from your table in the textbox or label (write codes in the combox or list box select event or other)
For multiplication unit price by order qty. and dispaying it in the textbox (already mentioned the textbox), write codes on the lost focus event of order quentity textbox (where user will put order qty.)
I have just given you the idea how to do that, you need to write the codes. Hope the idea will work for you.
Thank you Madam (cscgal),
Now my codes are looking good.
Dear Sir/Madam,
I have pasted some codes in my recent thread but some lines of codes are not showing after posting. When I have tried to edit that post, I have seen codes are there.
Sorry sir, I am unable to put the ASP/HTML file's codes here. only few lines of that file are listed above. But when i tried to edit above post, codes are there. I don't know what to do there. Yesterday also i was unable to login for second time. I have no idea what is happening here. Probably, new design of Daniweb is not working properly.
I have checked my codes as you advised but result is not good. I am stuck with these codes. Is there any other way for good result? I have experiment a lot but not getting the right way. Please guide me sir again. I am putting here the codes for your ready reference.
CSS codes
body{background:red;}
input{font-size:1.3em;color:white;background:green;}
#leftcol{
color:white;
background:green;
position:absolute;
top:12%;
left:2%;
width:22%;
height:80%;
}
#content{
text-align:center;
color:white;
background:green;
position:absolute;
top:12%;
left:22%;
width:76%;
height:80%;
}
#header{
text-align:center;
color:red;
background:#0f0;
position:absolute;
top:2%;
left:2%;
width:96%;
height:10%;
font-size:250%;
}
#footer{
color:black;
background:#0f0;
position:absolute;
top:92%;
left:2%;
width:96%;
height:6%;
font-size:100%;
}
ASP file
<html>
<head>
<title>Puzzle Number</title>
<link rel="stylesheet" type="text/css" href="StylePuzzle.css" />
<script type="text/javascript" src="JSPuzzle.js"></script>
</head>
<body onload="Ask()">
<div id="header">
Welcome to the Puzzle Number
</div>
<div id="content">
<h1>Arrange these numbers in ascending/descending order</h1>
<input type="button" style="height:15%;width:10%;" Id=n1 value="2" OnClick="checknumber('1')">
<input type="button" style="height:15%;width:10%;;" Id=n2 value="4" OnClick="checknumber('2')">
<input type="button" style="height:15%;width:10%;" Id=n3 value="8" OnClick="checknumber('3')">
<br>
<input type="button" style="height:15%;width:10%;" Id=n4 value="1" OnClick="checknumber('4')">
<input type="button" style="height:15%;width:10%;" Id=n5 value="5" OnClick="checknumber('5')">
<input type="button" style="height:15%;width:10%;" Id=n6 value="7" OnClick="checknumber('6')">
<br>
<input type="button" style="height:15%;width:10%;" Id=n7 value="" OnClick="checknumber('7')">
<input type="button" style="height:15%;width:10%;" Id=n8 value="6" OnClick="checknumber('8')">
<input type="button" style="height:15%;width:10%;" Id=n9 value="3" OnClick="checknumber('9')">
<br/>
<input type="button" style="height:8%;width:31%;" Id=CTN value="Clicked = 0">
</div>
<div id="leftcol">
<center>
<h2>Hello,</h2>
<input type="button" style="height:8%;width:70%;" Id=Player value="Player Name">
<Br>
<h2>Best Score</h2>
<input type='button' style='height:8%;width:70%;' Id=BtnName value="P. Name">
<Br>
<input type='button' style='height:8%;width:70%;' Id=BestScrore value="Clicked=">
<Br>
<h2>Next Puzzle</h2>
<input type='button' style='height:8%;width:70%;' Id=NxtPzzle value="More Puzzle">
</center>
</div>
<div id="footer"><center>Developed by Mr. Pankaj Mani Das</center></div>
</body>
</html>
Dear Sir/Madam,
I have written some CSS codes for designing web pages. The codes have produced well design in FireFox browser, but not in InternetExplorer and GoogleChrome as I have tested. It may not be worked in other browser also.
But my question is that, how can I produced well design web pages by these CSS codes for nearly all browser.
Please guide me Sir/Madam,
My codes are....
body{background:white;}
h1{text-align:center;}
input{font-size:40px; color:white;background:green;}
#leftcol{
color:white;
background:green;
position:absolute;
border:2px solid gray;
top:120px;
left:30px;
width:148px;
height:416px;
padding: 10px; padding-top: 20px;
}
#content{
font-size:20px;
text-align:center;
color:white;
background:green;
position:absolute;
border:2px solid gray;
top:120px;
left:200px;
width:766px;
height:416px;
padding: 10px; padding-top: 20px;
}
#header{
font-size:50px;
text-align:center;
color:red;
background:#0f0;
position:absolute;
border:2px solid gray;
top:30px;
left:30px;
width:936px;
height:68px;
padding:10px;
}
#footer{
color:black;
background:#0f0;
position:absolute;
border:2px solid gray;
top:568px;
left:30px;
width:936px;
height:16px;
padding:10px;
}
Dear VSMASS,
Thanks for your reply with explanation.
As you have suggested with the file name TestServer.asp, this codes are not working (but as I have mentioned earlier that this file's codes as I have written was working for me) showing error like this...
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'jsproc'
/ew-ii-as-8/TestServerVSMASS.asp, line 6
And suggested with the file name TestServerWithEJSF.asp and EJSF.js, these codes are also not working showing error like this...
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'jsproc'
/ew-ii-as-8/TestServerWithEJSFVSMASS.asp, line 7
But, when I have tested my original codes of "TestServerWithEJSF.asp" file with little modification as below, it is working well in both server and client machine. Only your two suggestion have work for me, one is "semicolon" (this was my mistake) and other is "language specification". But not other suggestions.
<html>
<head>
<script type="text/javascript" [B]language="javascript"[/B] runat="server" src="EJSF.js"></script>
<%
sub vbproc(num1,num2)
Response.Write(num1*num2)
call jsproc(5,20)
end sub
%>
</head>
<body>
<p>Result: <%call vbproc(3,4)%></p>
</body>
</html>
Javascript file EJSF.js
function jsproc(num1,num2)
{
Response.Write("<br>Result :");
Response.Write(num1*num2);
}
Thanks again, and here I am closing this thread as it has solved my problem.
Dear Abiba,
The thread had been marked as SOLVED on 21st March 2011 by me as i had got the answer. So, there is not need to reply on this thread.
Probably, you have posted without observing that. Anyway, welcome to Daniweb and waiting for more reply from your side on unsolved thread.
Thanks
I am trying to run an asp page with an external JavaScript file but it is showing error like this....
Error Type:
Active Server Pages, ASP 0124 (0x80004005)
The required Language attribute of the Script tag is missing.
/ew-ii-as-8/testserverwithEJSF.asp, line 3
My both files are...
TestServerWithEJSF.asp
<html>
<head>
<script type="text/javascript" runat="server" src="EJSF.js"></script>
<%
sub vbproc(num1,num2)
Response.Write(num1*num2);
call jsproc(5,20);
end sub
%>
</head>
<body>
<p>Result: <%call vbproc(3,4)%></p>
</body>
</html>
function jsproc(num1,num2)
{
Response.Write("<br>Result :");
Response.Write(num1*num2);
}
But, when I run the asp page puting JavaScript codes into the asp page then it is running well in my server as well as clint machine. The codes of the asp page are..
TestServer.asp
<html>
<head>
<%
sub vbproc(num1,num2)
Response.Write(num1*num2)
call jsproc(5,20)
end sub
%>
<script language="javascript" runat="server">
function jsproc(num1,num2)
{
Response.Write("<br>Result :");
Response.Write(num1*num2);
}
</script>
</head>
<body>
<p>Result: <%call vbproc(3,4)%></p>
</body>
</html>
I am unable to understand how to run the asp page with an external JavaScript file which is running at asp server. Please guide me Sir/Madam.
Here is your needed codes. Enjoy coding and mark the thread close.
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<style>
</style>
</head>
<body>
<h1><font color="blue">Maths Game</h1></font>
<script type="text/javascript">
var score = 0;
var ua = new Array();
var ca = new Array();
var xa = new Array();
var ya = new Array();
var opa = new Array();
var dispa = new Array();
//================
var AllCombine = new Array();
var MyString;
//================
var ops = ["+","-","*"];
function showResult()
{
var cnt = dispa.length;
for(var i=0;i<cnt;i++)
{
//document.write("<br />"+dispa[i]+ " = " + ua[i]);
MyString = dispa[i]+ " = " + ua[i]; //============================
if(ua[i]!=ca[i])
{
//document.write(" is incorrect - <span style='color:red'>The correct answer is " + ca[i] + "</span>");
MyString += " is incorrect - <span style='color:red'>The correct answer is " + ca[i] + "</span>";//======
}
else
{
//document.write(" <span style='color:green'>The answer is correct</span>");
MyString += " <span style='color:green'>The answer is correct</span>"; //=================
score += 2;
}
AllCombine.push(MyString);//=================================
}
ua = new Array();
ca = new Array();
xa = new Array();
ya = new Array();
opa = new Array();
dispa = new Array();
}
for(var i=0;i<10;i++)
{
var x = Math.floor(Math.random()*101);
var y = Math.floor(Math.random()*101);
if(x<y)
{
var temp = x;
x = y;
y = temp;
}
xa.push(x);
ya.push(y);
op = ops[Math.floor(Math.random()*ops.length)];
var disp = x +" "+op+" "+y;
dispa.push(disp);
var v = prompt("How much is " + disp + " ?");
ua.push(v);
ca.push(Math.round(eval(disp)));
showResult();
}
//=============================================
for(var i=0;i<10;i++)
{
document.write("<br />" + AllCombine[i]);
}
//==============================================
document.write("<br />Your score: " + …
Dear Thepanther,
Ok, its not complicated. But, I have a question for you, have you written those codes or copied from somewhere? If you copied from somewhere and asking all help from other then you can't increase your knowledge. The better way is doing some parts yourself and ask help for some parts.
Anyway, I am telling you how to do that...
1. Declare 2 nos. of variables, one is String and other is Array.
2. Concatenate the display line into String variable like ("50*2=150" + "is incorrect - The Correct answer is 100") or ("63+11=74" + "The answer is correct").
3. After that you push the string variable's value into the Array variable.
4. In last display the Array variable's value using for loop.
Give a try to solve.....
Dear Thepanther,
I think you have not understood what i have said. Anyway, i am making for you little bit easier..
1. Replace this line "var score = 0;" from line no. 71 to 14 or 24 as per your first post
2. In the line no. 73 there is background colour as Red replace it with Yellow.
Sorry for late response. And thanks for your useful reply.
Dear thepanther, I have seen your codes, there is nothing wrong. Just place your score variable initialization before showresult function. And change the background colour to yellow.
Dear Sir/Madam,
I have created some ASP pages in my computer and stored those pages into the web site content directory (in my case C:\PanWeb) and IIS's Virtual Directory alias is "abcweb" created with the IIS V5.1
However, i can browse those pages in my computer by putting the 127.0.0.1/abcweb/ (only index page) or 127.0.0.1/abcweb/main.asp or localhost/abcweb/main.asp in the address bar of the web browser.
But, i can't browse those pages from other computer of my home/office network. Please guide me to access those ASP pages from other computer of my home/office network. However, i have tried like this..
<my computer IP Address>/abcweb/main.asp (always, I am putting my computer IP Address after observing) but, i have not succeed.
Note :
1. My computer IP address is a dynamic IP address.
2. I am using XP Prof SP-II in our home/office network
computers.
Dear Rubberman,
Thanks for replying sir, may be little bit dust there but CPU & SMPS fan is working properly. What should i do? Please guide me sir.
Dear Sir/Madam,
My computer is restarting sometimes automatically, when i double clicking on media file or run a program etc (But not every time). Earlier, i thought, it was because of some strong virus. So, i formatted the c drive and try to installed OS(XP Prof SP-II) on my PC. But it could not completed.
For the first time, when i try to install OS, it restart just before flashing the message like "your computer is going to restart" after loading the system files.
for the second and many times, it restart when the OS is on finalizing the installation. (Just before 6 to 9 minutes of completion of installation when OS is saving files)
For the last time, i have repartitioned all the Hard Disk and formatted C drive and try to installed the OS. But i have failed last times also. computer is restarting just before flashing the message like "your computer is going to restart" after loading the system files.
I am unable to understand what happen to my PC? Is it the problem of RAM, Processor, Mother Board or something else. Please guide me Sir/Madam.
Dear Vanzhyme,
Thanks for replying sir, It may be sir what you have said. Because both the mother board are different. And thank you all of sir.
Dear Sir/Madam,
Recently, i got a problem on loading OS XP professional SP-II. I have installed the OS bringing my Hard Disk into another computer where with my Hard Disk's OS is running smoothly. But when i installing the same Hard Disk into my computer it is not loading the OS. It is saying that run in safe mod, safe mode in command prompt, normal mode etc. I have run all that options. But result is same.
I am unable to understand what happen to my PC. Please guide me sir/madam.
Note :-
My Machine
P4 Processor 2.4 GHz, DVD Writter, CD writter, unplug Floppy Drive etc
Other Machine
P4 Processor 2.6 GHz, Floppy Drive, CD writter, Internal Modem etc
I am showing here the total no. of posts contributed by the members in the previous game. Where Team B has won with flying colours.
Team B
1. Debasisdas -------- 232 Nos
2. P.manidas---------- 162 Nos.
3. Jingda------------- 132 Nos.
4. Portgas D. Ace------- 7 Nos.
5. Xlphos--------------- 3 Nos.
Team A
1. Kraai--------------- 129 Nos.
2. Arbus--------------- 116 Nos.
3. Ayagi---------------- 20 Nos.
4. AbelLazm------------- 16 Nos.
5. Walf Shield----------- 3 Nos.
6. Speed Fanat1c--------- 1 No.
000000000
Hurray, we have won the game this time also. Congratulation Team B
Team A = 5 Times win
Team B = 2 Times win
20
This time it will be more fun, AbelLazm.
24
Come on Team B only 12 post is require
30
welcome debasisdas
38
Come on PortGas D. Ace
56
Kraai, you are watching us. Ok......
Jingda, Lets break his(Kraai) defending wall
56
Kraai was defending well. Good spirit