rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: vbn on July 13, 2010, 07:32:08 AM

Title: File rename
Post by: vbn on July 13, 2010, 07:32:08 AM
I am able to get the html button and part of the Rename dialog under Actions but how to get the last selected filename into the "Old File" input ... it doesnt change as selection changes...

Anybody with a small example of how to go about renaming files via macros ?
Title: Re: File rename
Post by: rejetto on July 13, 2010, 11:03:07 AM
was you trying the latest default template?
it was buggy, please redownload hfs #262 and ensure there's no "customized template" message in the status bar.
Title: Re: File rename
Post by: vbn on July 14, 2010, 03:26:57 AM
OK...just upgraded the beta and copied following portions from default template over to my customized one :

(1) Rename form button
(2) ajax alias for rename
(3) ajax.rename section

Ajax window opens when I click rename...but on Ok javascript error comes up

Any other portions also to be copied over ?
Title: Re: File rename
Post by: rejetto on July 14, 2010, 08:33:59 AM
you should report the error message or attach your template.
Title: Re: File rename
Post by: vbn on July 14, 2010, 10:03:55 AM
This is from the javascript error.

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; VisaSOE; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; VisaSOE)
Timestamp: Wed, 14 Jul 2010 10:01:07 UTC

Message: Object expected
Line: 441
Char: 5
Code: 0
URI: http://www.vbnfiles.com/[%20Protected%20]/vbn/Private/Temp/
Title: Re: File rename
Post by: vbn on July 14, 2010, 10:08:22 AM
Sent you the template link via PM
Title: Re: File rename
Post by: rejetto on July 15, 2010, 11:44:33 AM
The message you posted is useless, but it's not your fault.
Internet Explorer messages are terrible, even in "debug mode".
If you like making web things like this, my suggestion is to use firefox with firebug (a plugin), which would had you provided this message:
getItemName is not defined

so you now know what's missing. ;)
Title: Re: File rename
Post by: vbn on July 17, 2010, 02:44:16 AM
Yeah stupid me  ::)

Anyways got through with that but now on all the files i only get a popup "Error" ... how can we get more debug info ?

The file is not in use
Title: Re: File rename
Post by: rejetto on July 17, 2010, 11:15:24 AM
how can we get more debug info ?

already said, use firefox with firebug
Title: Re: File rename
Post by: Roessi on July 17, 2010, 12:33:46 PM
attach your template then someone could take a look at