|
ummmmm is this javascript in the html page ur talking about?
if so try returning false
"there is no spoon" biz stuff about me
|
|
|
|
|
It is true that I am talking about javascript in the html page.
Perhaps you have noticed the system process the default implementation first and then returns control to your custom functions. Take this example
function OnDblClick()
{
alert("Hello");
return false;
}
Before displaying the Hello it already selected the text. So returning false or true has no effect. There must be another way. Still I do not know.
Thank you very much for your reply.
|
|
|
|
|
I am trying to get a reference to some textboxes in a document. The problem is that they are hosted in an .ascx file. I tried getElementById("TextboxName") but it errors with no object.
Any idea how I find an object in an .ascx file?
|
|
|
|
|
Remember that the output of aspx or ascx is just html on the client. getElementById is client side so it really has nothing to do with the ascx page, just the html ouput.
First thing is to view the source of the generated page and make sure the id you are looking for exists. It is probably not named what you think it should be.
|
|
|
|
|
Thanks Mark, can you remeber how to get the ID of the control so I can change the script in prerender?
|
|
|
|
|
This is the code so far Any ideas? I'm not getting an error which means either it's right but not working or the onTextChanged event is not firing?
'write script<br />
Dim script As String = "<script language=""javascript"">function add(id){a=document.getElementByID(id);ttl=document.getElementByID('[ClientID]_ttl');ttl.value = a.value;}</script>"<br />
'get control reference<br />
script = script.Replace("[ClientID]", Me.ClientID.ToString)<br />
Me.Page.RegisterClientScriptBlock("Add", script)<br />
txtStrength.Attributes.Add("OnTextChanged", "javascript:add('" & txtStrength.ClientID & "')")
|
|
|
|
|
Can anyone tell me how to call a stored procedure that returns a recordset through an ASP page?
Thanking you in advance.
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
I made this little function for that:
function execStoredProc(p_strName, p_arrParams)<br />
dim objCommand<br />
dim strConnect<br />
<br />
strConnect = getConnect("writer")<br />
set objCommand = Server.CreateObject("ADODB.Command")<br />
<br />
objCommand.ActiveConnection = strConnect<br />
objCommand.CommandText = p_strName <br />
set execStoredProc = objCommand.Execute(,p_arrParams,adCmdStoredProc)<br />
end function
getConnect retrieves the Connectstring from an XML-File. Simply replace with your connect-string.
Include ADO typelib in order to use constant "adCmdStoredProc":
<!--METADATA NAME="Microsoft ActiveX Data Objects 2.5 Library" <br />
TYPE="TypeLib" <br />
UUID="{00000205-0000-0010-8000-00AA006D2EA4}"<br />
-->
|
|
|
|
|
thanks...
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
Here is another example
<br />
Dim objAttachedSetupSheets<br />
Dim AttachedSetupSheetsRS<br />
Dim varRecordsEffected ' Number of Records effected by the procedure<br />
<br />
Set objAttachedSetupSheets = Server.CreateObject("ADODB.Command")<br />
objAttachedSetupSheets.ActiveConnection = objRoutingConn<br />
objAttachedSetupSheets.CommandText = "ENTER STORED PROCEDURE NAME HERE"<br />
objAttachedSetupSheets.CommandType = adCmdStoredProc<br />
<br />
SET AttachedSetupSheetsRS = objAttachedSetupSheets.Execute varRecordsEffected<br />
IF (NOT(AttachedSetupSheetsRS.EOF)) THEN<br />
Response.Write("The ID is " & AttachedSetupSheetsRS("SetupSheetID"))<br />
END IF<br />
<br />
hope this helps
|
|
|
|
|
Thanks...
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
hi
i want to get the html source code of google search page. i tried using xmlhttp....it works for all other site but does not for google..pl help me out
the code is as follows
<%@ language=VBScript%>
<title>HTML Source Code
Get Source of URL:
<%
dim objXMLHTTP
URL = Request.form("txtURL")
if ( URL = "" ) then
URL = "http://www.google.com"
end if
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", URL, false
objXMLHTTP.Send
Response.Write " "
Response.Write "HTML Code for "&URL&""
Response.Write ""
Response.Write objXMLHTTP.responseText
Response.Write ""
Set objXMLHTTP = Nothing
%>
kirtij
|
|
|
|
|
Hi:
Under Windows 2k, when using INPUT TYPE=”file” ..., is this possible to select more than one file at a time to upload their contents to the server? i.e. selecting files using using SHIFT-UP arrow or CTRL-click If yes, how could I do this?
Actually I can only select one file at a time.
Thanks for you attention and help.
|
|
|
|
|
ummmmm
just put multiple <input type='file'...> on the page
"there is no spoon" biz stuff about me
|
|
|
|
|
Using WEB forms I would like to introduce the control that generates the "INPUT TYPE=”file”...", wich let me to see a FileDialog to upload local data to the server. However I do not find this control in the HTML toolbox. Does it mean I should introduce this control manually? i.e. not using the design WEB Forms??
Best regards
|
|
|
|
|
Hi all...
I have an .html file that should run an .exe file
that is located where the .html file is located.
I tried in PerlScript like this:
<SCRIPT language="PerlScript" runat="server">
sub MyButton1_onClick
{
system("MyFile.exe arg1 arg2");
}
</SCRIPT
And my Internet Explorer gets stuck...
Please
ASAP
|
|
|
|
|
|
The .exe file is a cosole application that does nothing exept of a print screen...
but i tried to run "notepad.exe" and it works.
do you have any idea on how to run a console application ??
BTW:
I know 2 commands to run an .exe in perl:
system() and exec();
---
the system() returns the application exit code,
so it needs that the application will exit
[there for, the PerlScript waits for the system() tio finisih];
the other one (exec()),
it runs the application in another thread,
there for, do not return the exit code.
there for, the PErlScript continues.
*************
Still needs help
|
|
|
|
|
Well, i got a laptop that's decent.
It's my new home.
What do I do with my ole desktop?
It's a win2000 p3(maybe 2) 600MHz ish machine.
Well, i already know i want to use it as a webserver
for reporting.
What's your vote?
1) linux+apache route?
2) use iis?
I'm familiar with php, but wouldn't mind messing with asp.net
Is an older type box like this ok for asp.net?
Not interested in regular asp.
Haven't messed with installing linux, etc.
Can i find a free linux that lives on top of win2k?
Thanks for any pointers!
...Steve
|
|
|
|
|
|
I'd agree, the machine seems fine for experimental ASP.NET efforts.
|
|
|
|
|
Thanks!
i guess free is an important quality here...
i have vs.net cheap from a ms friend,
but it ain't goin on my ole work desktop.
Am i apache/php bound? Or can i get asp.net free somehow?
(legally of course.)
Thanks again!
...Steve
|
|
|
|
|
The framework is free for download. Your already running W2K so you have IIS.
|
|
|
|
|
Steve Hazel wrote:
Am i apache/php bound? Or can i get asp.net free somehow?
(legally of course.)
As mark has already said, you have no problems with the server software: IIS ships with Win2k, and the ASP.NET runtime installs with the .NET Framework. If you have VS.NET (or one of the free IDEs), then you're set
--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
|
|
|
|
|
Thanks again Ian n Mark.
So win2000's free IIS and the regular ole .net runtime will give me
the whole enchilada to serve asp.net pages, eh?
Suhhweet.
And so i don't even really NEED vs.net, right?
Just code up some html and aspx in a text editor and I'm good to go, right?
Thanks YET again
...Steve
|
|
|
|