|
Oh, client-side, I see..
Hmm, isn't perl a server-side scripting language? Sorry for maybe stupid question, just have no idea in perl
Philip Patrick
Web-site: www.saintopatrick.com
"Two beer or not two beer?" Shakesbeer
Need ASP hosting? Check out 123HostNow.com
|
|
|
|
|
It's what I use Perl for, websites only, but it's a full blown language i think. Server or client you just need the interpreter installed.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I am trying to use the file system object to delete a batch of files, based on the name of the file. E.g. I have files in the format:
file17_68.asp
The first number signifies a category, the second is an individual ID.
What I want to be able to do is delete files that belong to the one category. What I've tried is:
*start code snippet*
set fso = Server.Createobject("Scripting.FileSystemObject")
fname = "\files\file" & EditCatID & "*.asp"
fso.DeleteFile(Server.MapPath(fname))
set fso = nothing
**end code snippet**
I thought the wildcard (*) would mean that all files beginning file17
would then be successfully deleted.
This fails to work - so does anyone have any brilliant and cunning ideas? or suggestions why this doesn't work?
|
|
|
|
|
It works fine, but MapPath cannot map file names with wildcards. You need to map the directory first and then add a file name, like this:
set fso = Server.Createobject("Scripting.FileSystemObject")
fso.DeleteFile Server.MapPath("\files\") & "\file" & EditCatID & "*.asp"
set fso = nothing
Philip Patrick
Web-site: www.saintopatrick.com
"Two beer or not two beer?" Shakesbeer
Need ASP hosting? Check out 123HostNow.com
|
|
|
|
|
I can programatically add webform server controls say to a cell in a table. But I cant use their event procedures. In following example I create a button dynamically but I can't use the onClick event to call a sub. eg
objButton = New Button
objButton.ID = "btn" & intRowCount
objButton.text = objButton.id
objButton.OnClick = "printMessage"
.
.
.
Sub printMessage(sender As Object, e As EventArgs)
Message.Text = "button is clicked "
End Sub
The error I get is: Compiler Error Message: BC30390: 'System.Web.UI.WebControls.Button.Protected Overridable Overloads Sub OnClick(e As System.EventArgs)' is not accessible in this context because it is 'Protected'.
If I create the control statically then it is straight forward (this example uses a checkbox)
<asp:checkbox id="checkbox1" runat="server" autopostback="True" text="Include Tax" textalign="Right" oncheckedchanged="printMessage">
Any ideas? I am tearing my hair out!
|
|
|
|
|
I had an ASP.NET app running with the .NET release runtime on a win2000 server machine. I just installed active directory and it no longer works. I get a message saying "Server Application Unavailable" and the event log says that "aspnet_wp.exe could not be launched because the username and/or password supplied in the processModel section of the config file are invalid. ". Any ideas?
Sonork ID: 100.9944
ICQ: 519642
Hotmail: JoshuaJGuy@hotmail.com
|
|
|
|
|
Here is some info I found:
"Using ASP.NET on a Primary or Backup Domain Controller
Running ASP.NET on a primary or backup domain controller with the ASPNET account is not supported. To enable this scenario, you must configure the worker process to run as System, as described at the beginning of this article."
jig: Joshua
Sonork ID: 100.9944
ICQ: 519642
Hotmail: JoshuaJGuy@hotmail.com
|
|
|
|
|
Glad I haven't purchased it yet! My Win2K PDC is my only working PC at the moment, and that's the first place I'd install anything new.
|
|
|
|
|
Off the top of my head, open the file:
C:\WINDOWS\Microsoft.NET\Framework\v1.0.3328\CONFIG\machine.config
Shoot down the file and find the <processmodel> element of the file. Under that, one of the attributes should say something like 'username' just set its value to "SYSTEM" and check the 'password' attribute is set to "", reset the IIS service and it should all start working.
|
|
|
|
|
hi. i want to use javascript:document.form.submit() with width and height parameters to open a window as a popup. can anyone tell me how to do it? thanx.
|
|
|
|
|
Your function will look like this one:
var SubmitWnd;
function submitPost(){
var oForm = document.getElementById("form1");
if(oForm != null){
SubmitWnd= window.open("", "submit", "toolbar=no,resizable=yes,scrollbars=yes,menubar=no,width=400,height=300");
oForm.action = "submit.asp";
oForm.target = "submit";
return true;
}
return false;
}
Call it from your submit button onclick event
First it creates an empty window with name "submit" then submits the form to it
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
I am developing a Web based Image Viewer, using InterDev with JavaScript.
I am initialising a listbox (dropdown) with the names/locations of the batches of images and prompt the User to select one. I am not using a Form, but have a script that, on the press of a "Show Images" button, gets the value from the listbox and then uses "window.open()". No problem there.
But, how can I pass the name of the batch to the new window so that it can display its images?
If I am reading it write, "window.open()" takes:
1. the window to open e.g. MyImageWindow.asp
2. the name of the window e.g."My Window" and
3. it's attributes (size, position, resizable etc)
I tried passing it in as the name, then dereferrencing that, but it will only accept a string literal.
I think I'm probably missing something really obvious here, you know how it is!
Really grateful for any help...thanks.
code dope.
|
|
|
|
|
Try something like this:
window.open('MyImageWindow.asp?MyBatch=' + varMyBatch, .......)
|
|
|
|
|
Yes, thanks Konstantin...it opens the Window OK now, but how do I get at the value that I've passed in?
I really appreciate your help..I'm very new to InterDev and ASP, as you can probably tell!
code dope.
|
|
|
|
|
In your ASP page (server side) you can "catch" your parameters like this:
<%
myBatch = Request.QueryString("MyBatch")
%>
|
|
|
|
|
Thanks a lot for your kind help Konstantin.
It works fine now. I think that before I go any further with this project I need to spend some time studying ASP a bit more. My inexperience is causing me problems that shows my lack of basic understanding.
Hopefully I shouldn't have to ask too many more questions now!
Thanks again.
code dope.
|
|
|
|
|
code dope wrote:
Thanks a lot for your kind help
No problem. It's all a part of our "lure C++ people into web development" program.
|
|
|
|
|
Hi,
Please help me out in using the TabStrip Control in .NET Beta 2.
The Application should have a CodeBehind.
With Warm Regards,
Prabhu Kumar.M
__//\\__
|
|
|
|
|
As the documenation states when you use the innerHTML property of an element any HTML tags within are parsed and formatted.
However IE does a very poor job of parsing and formatting the tags (rips of quotes, turns XHTML into bog-standard HTML etc. etc.) and I would like to know if anyone knows either how to stop IE from parsing and formatting when I use the innerHTML property, or is there another way to get the contents of a DIV?
thanks.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
|
|
|
|
|
Did you try to just use innerText instead of innerHTML property?
|
|
|
|
|
Konstantin Vasserman wrote:
Did you try to just use innerText instead of innerHTML property?
I am using both. innerText works fine, but innerHTML parses and re-formats any HTML tags in the data.
Basically I have a DIV and a TEXTAREA. The page first loads with the CONTENTEDITABLE attribute set to true on the DIV and the page content displayed. The user may then edit the content.
They can also click a button which hides the DIV and makes the TEXTAREA visible. The TEXTAREA is then filled with the innerHTML value of the DIV. This way the person can edit the actual HTML of the DIV.
But unfortuanatley as soon as I pull the innerHTML property any HTML tags in it get formatted and parsed. I need to stop that.
(I think we need a "Paul Watson's Crazy Questions" corner, and you can be the star Answer Giver )
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
|
|
|
|
|
Is this what you are doing: test page?
Sorry, I am kind of slow these days...
Paul Watson wrote:
I think we need a "Paul Watson's Crazy Questions" corner
There you go - new forum idea for Chris...
Paul Watson wrote:
you can be the star Answer Giver
I usually have more questions about your questions then real answers, so I'll be the star "confuser of issues even more" kind of guy.
|
|
|
|
|
Did you ever figure this one out?
|
|
|
|
|
Konstantin Vasserman wrote:
Did you ever figure this one out?
Not yet Konstantin, and it is really annoying*
However I am giving MS a support call tomorrow on the subject, will report back on the results.
* Not only does it trash well formed XHTML, it also turns virtual links into physical ones (e.g. "/resources/resource.asp" becomes "http://www.blah.com/resources/resource.asp") which is really bad news when a site is on a test server and not on the official URL yet!
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
|
|
|
|
|
Oh shite are you serious...?
IE does that...?
A while back I read an article on xhtml (yours i think) and decided to re-write all my old pages and code in xhtml.
There is lots of dynamic DHTML floaties the whole bunch, but I wasn't aware of this IE problem...
Be sure to let me know if you find the answer.
Thanx
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|