|
|
i want to develope code for like tree structure implementation using perl,cgi,javascript.any one can give me some idea?
Tanmoy Panja
Software Developer
mob:-9831970348
Intrasoft Technologies Pvt. Ltd.
5,Lake Temple road.
Kolkata-29.
|
|
|
|
|
Hey all..
Does anyone know how a I might go about calling a function in a windows service from a web application? I want to be able to call a specific function in the windows service. I am using .NET 2.0 for both the windows service and the web app, however any .net solution would be appreciated. I don't have the slightest clue how to do this or if it is even possible.
Thanks in advance...
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
Hi there,
IMO, you might consider using the .Net remoting in this case. The windows service can host an object that the client can access to call a specific function defined in the service. For more information, you can see the documentation:
.NET Framework Remoting Overview[^]
|
|
|
|
|
i'm uploading files on my website..coding is done in asp...files get uploaded 2 desired destination...but info is not entered in the relevant database....no error is displayed..seems the connection object is in read mode...even though i try 2 chng the mode...it still remains in read...hence select query works whr as insert/delete dont..how do i insert values??
AditiM
|
|
|
|
|
If you were trying to update the database but were not allowed, you would get an error message.
Probably there is some error in your code, for an example you might not run the insert query at all.
---
b { font-weight: normal; }
|
|
|
|
|
Well you may be trying to change the mode while the connection is open. You have to be sure to close the connection before changing the mode. Either that or make another connection that is read/write.
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
how Create a Rich Text File RTF in a ASP Page with header & footer
in this header how to include an image
N.Rajakumar B.E.,
Application Developer,
|
|
|
|
|
depending on which value is selected in a dropdown list for suppose a campus central,i have t run a query against database and should get those values into a text box.flow is like this.
sub showform
//java script funtion
function OOchange()
{
Campus=document.f1.Campus.options[document.f1.Campus.selectedIndex].value;
}
<% Do While NOT MyRS1.EOF %>
"><%= MyRs1("CampusName")%>
<% MyRS1.MoveNext
loop %>
//several fields like text boxes and all are present here....in of the textbox i shud display the recordset which we get bu querying database with that value in the Campus variable
<%
MYSQL2="Select distinct substring(collector_name,13,5) AS Code from svr_compare where substring(collector_name,1,4)= (select Collector_Code from CampCollCode where Division='?????????')"
Set MyRs2=MyConn.Execute(MySQL2)
Dim str
str=MyRS2("Code")
MyRS2.MoveNext
Do While NOT MyRS2.EOF
str=str & "," & MyRS2("Code")
MyRS2.MoveNext
loop
'end if
%>
<\form>
<\html>
}
end sub
the variable Campus which is the javascript function is a global asp variable.how to get that value to query it in the where condition of that sql query.I don't understand how to do that.Request.Form()to get the value selected in the drop down box.don't even know how to retreive the variable Campus which is in Java script function.plzzz help
Thanks in advance,
vani
|
|
|
|
|
bhavani_ge wrote: the variable Campus which is the javascript function is a global asp variable.
No, it's not. They are two completely separate variables. They don't exist in the same computer, and they don't exist at the same time.
To use the value in the asp code, you have to send the value from the page to the server, either as form data or in a querystring.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks a lot for quick reply.Can you please give me the syntax of that.(form data or query string).I didn't understand how to use that.now i have that variable in javascript function how can i use that in the query which is the subroutine.
format is:
sub showform
java scriptfunction
{
Campus=some code;
<%
query-----where i want to use Campus
%>
here in this text box i shud get the result of that query
}
end sub
Thanks a lot in advance
|
|
|
|
|
Just put the value in the querystring when you reload the page:
window.location = 'ThePage.asp?campus=' + Campus;
Then you retrieve the value in the asp code:
strCampus = Request.QueryString("campus")
---
b { font-weight: normal; }
|
|
|
|
|
Thanks a Bunch!!! it worked....but.....after i select something in dropdownlist, the java script function is getting executed where i included
the following stattement........
if(document.f1.Campus.options[document.f1.Campus.selectedIndex].value)
{
Campus=document.f1.Campus.options[document.f1.Campus.selectedIndex].value;
alert(Campus);
window.location = 'svr_temp.asp?Campus=' + Campus;
//document.writeln('');
flag="true";
//alert(flag);
hidden_Team_Auto.style.display='block';
}Later on while running query i did this.........
<%
if request.querystring("Campus") <> "" then
MYSQL2="Select distinct substring(collector_name,13,5) AS Code from svr_compare where substring(collector_name,1,4)= (select Collector_Code from CampCollCode where Division='"& request.QueryString("Campus")& "')"
Set MyRs2=MyConn.Execute(MySQL2)
Dim str
str=MyRS2("Code")
MyRS2.MoveNext
Do While NOT MyRS2.EOF
str=str & "," & MyRS2("Code")
MyRS2.MoveNext
loop
end if
%>
As i kept alert statement in the javascript function once i click that alert box...data fields are getting displayed in the textbox.But immediately the page is refreshing and is giving error.if i remove that alert box...i am not getting data in the textbox...and again the web page is refreshing itself.....plzzz help me in this.
|
|
|
|
|
You have to display the field after the page reloads, not before.
What is the error you get?
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
What actually is happening is when i select something in the dropdown list,it should catch that value and should run a query against the database and should fill those recrds in a textbox and then that textbox should become visible.
Now what's happening is as soon as i select something in the dropdown box there comes an alert box...when i click that alert box...only then the data is being populated in the textbox...then again the web page is getting refreshed because of which undesired outputs are coming.
I want data to be displayed in the textbox with out alert box....and also after displaying the data in the textbox i don't the web page to be refreshed automatically..............
here is the code for that..........Please help me in this
Thanks,
vani.
<%@ LANGUAGE="VBSCRIPT" %>
<%
If Request.Form("Submit") = "" Then
SetReportLog
ShowForm
Else
ShowCrystalReport
End IF
Dim Campus
Dim flag
flag = "false"
Sub ShowForm
%>
<%
'''MySQL = "select distinct convert(varchar(10),Course_Off_Start_Date,101) as StartDate from SVR where datename(dw, course_off_start_date) in ('Thursday','Tuesday') order by StartDate"
MySQL = "select distinct convert(varchar(10),Course_Off_Start_Date,101) as StartDate from SVR order by StartDate"
Set MyRs=MyConn.Execute(MySQL)
%>
<%
MySQL1 = "Select CampusName from onlinecampus order by CampusName"
Set MyRs1=MyConn.Execute(MySQL1)
%>
@import "../inc/uopstu.css";
<title>SVR StartDate Selection
Select a Campus Name
<% Do While NOT MyRS1.EOF %>
"><%= MyRs1("CampusName")%>
<% MyRS1.MoveNext
loop %>
<%
if request.querystring("Campus") <> "" then
'response.Write("hi")
'response.End
MYSQL2="Select distinct substring(collector_name,13,5) AS Code from svr_compare where substring(collector_name,1,4)= (select Collector_Code from CampCollCode where Division='"& request.QueryString("Campus")& "')"
Set MyRs2=MyConn.Execute(MySQL2)
Dim str
str=MyRS2("Code")
MyRS2.MoveNext
Do While NOT MyRS2.EOF
str=str & "," & MyRS2("Code")
MyRS2.MoveNext
loop
end if
%>
<%
End Sub
Sub ShowCrystalReport
some code..............
<% End Sub %>
|
|
|
|
|
If you don't want the alert box, then just remove the code that shows the alert box.
and also after displaying the data in the textbox i don't the web page to be refreshed automatically
Are you saying that the page is reloaded twice?
---
b { font-weight: normal; }
|
|
|
|
|
If i remove the alert box the data is not getting into the textbox.Only after i click the alert box the page is getting refreshed and data is getting into the textbox i guess.......if i remove that alert nothing is happening in the page....that is one issue.
Now when i click the alert box the records are getting into the textbox but immediately the page is getting refreshed or loaded again and all the data is disappearing.
What am i supposed to do in this.Please help me in this.
-- modified at 15:16 Tuesday 13th December, 2005
|
|
|
|
|
bhavani_ge wrote: If i remove the alert box the data is not getting into the textbox.
Yes, it is, but you don't show the textbox, so you don't see it.
bhavani_ge wrote: if i remove that alert nothing is happening in the page
Yes it is. The page is reloaded and the textbox is populated with the correct data.
bhavani_ge wrote: Now when i click the alert box the records are getting into the textbox
No, you show the textbox, but it doesn't contain the correct data. Only after the page has reloaded the textbox is populated with the correct data.
bhavani_ge wrote: the page is getting refreshed or loaded again and all the data is disappearing.
Yes, that is what I'm saying. You have to show the textbox after the page has reloaded, not before.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks a lot.........
I tried to display the textbox after the page reloads...but i couldn't .It might be an easy thing to do...but i am new to asp and don't know how to do that.....can you please tell me how to do that
here is my present code.....
<%@ LANGUAGE="VBSCRIPT" %>
If Request.Form("Submit") = "" Then
SetReportLog
ShowForm
Else
ShowCrystalReport
End IF
Sub ShowForm
@import "../inc/uopstu.css";
<title>SVR StartDate Selection
Select a Campus Name
<% Do While NOT MyRS1.EOF %>
"><%= MyRs1("CampusName")%>
<% MyRS1.MoveNext
loop %>
<%
if request.querystring("Campus") <> "" then
'response.Write("hi")
'response.End
MYSQL2="Select distinct substring(collector_name,13,5) AS Code from svr_compare where substring(collector_name,1,4)= (select Collector_Code from CampCollCode where Division='"& request.QueryString("Campus")& "')"
Set MyRs2=MyConn.Execute(MySQL2)
Dim str
str=MyRS2("Code")
MyRS2.MoveNext
Do While NOT MyRS2.EOF
str=str & "," & MyRS2("Code")
MyRS2.MoveNext
loop
end if
%>
<%
'Close the connection
'MyRs.Close
'Set MyRs = Nothing
'Set MyConn = Nothing
End Sub
Sub ShowCrystalReport
End Sub
-- modified at 12:23 Wednesday 14th December, 2005eNext
Do While NOT MyRS2.EOF
str=str & "," & MyRS2("Code")
MyRS2.MoveNext
loop
end if
%>
<%
'Close the connection
'MyRs.Close
'Set MyRs = Nothing
'Set MyConn = Nothing
End Sub
Sub ShowCrystalReport
End Sub
|
|
|
|
|
.........
I tried to display the textbox after the page reloads...but i couldn't .It might be an easy thing to do...but i am new to asp and don't know how to do that.....can you please tell me how to do that
here is my present code.....
<%@ LANGUAGE="VBSCRIPT" %>
If Request.Form("Submit") = "" Then
SetReportLog
ShowForm
Else
ShowCrystalReport
End IF
Sub ShowForm
@import "../inc/uopstu.css";
<script language="JavaScript" type="text/javascript">
</script>
</head>
<body >
<form method=post name=f1 ID="Form1" action="svr_temp.asp">
<tr id="hidden_Division" style="display:none;"><td align=right width=50% height="22">Select a Campus Name</td><td align=left height="48"><select Name="Campus" Size="1" onChange="OOchange()" ID="Select2">
<% Do While NOT MyRS1.EOF %>
<option Value="<%= MyRS1("CampusName") %>"><%= MyRs1("CampusName")%></option>
<% MyRS1.MoveNext
loop %>
</select>
</td></tr><%
if request.querystring("Campus") <> "" then
'response.Write("hi")
'response.End
MYSQL2="Select distinct substring(collector_name,13,5) AS Code from svr_compare where substring(collector_name,1,4)= (select Collector_Code from CampCollCode where Division='"& request.QueryString("Campus")& "')"
Set MyRs2=MyConn.Execute(MySQL2)
Dim str
str=MyRS2("Code")
MyRS2.MoveNext
Do While NOT MyRS2.EOF
str=str & "," & MyRS2("Code")
MyRS2.MoveNext
loop
end if
%>
<tr id="hidden_Team_Auto" style="display:none;"><td align=left height="48"><input type=text name=TeamNumAuto maxlength=25 size=15 value= "<% =str %>" ID="Text1">
</td></tr></form>
</body>
<%
'Close the connection
'MyRs.Close
'Set MyRs = Nothing
'Set MyConn = Nothing
End Sub
Sub ShowCrystalReport
End Sub
-- modified at 12:23 Wednesday 14th December, 2005eNext
Do While NOT MyRS2.EOF
str=str & "," & MyRS2("Code")
MyRS2.MoveNext
loop
end if
%>
<tr id="hidden_Team_Auto" style="display:none;"><td align=left height="48"><input type=text name=TeamNumAuto maxlength=25 size=15 value= "<% =str %>" ID="Text1">
</td></tr></form>
</body>
<%
'Close the connection
'MyRs.Close
'Set MyRs = Nothing
'Set MyConn = Nothing
End Sub
Sub ShowCrystalReport
End Sub
|
|
|
|
|
bhavani_ge wrote: I tried to display the textbox after the page reloads
I don't see anything in the code that suggests that you have tried that?
---
b { font-weight: normal; }
|
|
|
|
|
i didn't paste as something which i tried didn't work at all....and i am like didn't know how to go about it.....can you please tell me what i am supposed to do to display the textbox after the page loads.....
Thanks a lot,
Vani.
-- modified at 13:49 Monday 19th December, 2005
|
|
|
|
|
Just don't hide it.
---
b { font-weight: normal; }
|
|
|
|
|
But, i have to hide that textbox initially.when i select an item in the dropdown box a textbox will become visible and will be filled with data from the database depending on the item selected in the dropdown box.to retain a java variable value to be used in the query which is in vbscrip i used request.form() and posted the asp page back to the same page.Every thing is fine but, once the data is populated in the textbox immediately the page is posting back and all of them...textbox and dropdown box are all again disappeared after the page is loaded.....please tell me how to retain them even after the page is loaded......
|
|
|
|
|
You still obviusly don't know what happens when the page is reloaded.
The page is not posting back after the textbox is populated, but before.
---
b { font-weight: normal; }
|
|
|
|