forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Font Color Red on April 09, 2006, 02:59:33 pm

Title: Can't edit files
Post by: Font Color Red on April 09, 2006, 02:59:33 pm
When I go into edit a file, in the description text box I get a Runtime error on Line 163, Error: object expected. This happens when I hit any key on my keyboard.
Title: Re: Can't edit files
Post by: Nibbler on April 09, 2006, 03:16:34 pm
Temporarily disable javascript.
Title: Re: Can't edit files
Post by: Sami on April 09, 2006, 03:28:11 pm
when you hit a key this page going to execute "textCounter" function (javascript),your problem is javascript or mey be you change the editpics.php manualy
do as nibbler said and check for error(it will gone) but you should also check your editpics.php file for any change
Title: Re: Can't edit files
Post by: Font Color Red on April 10, 2006, 12:05:44 am
Temporarily disable javascript.

How do I do this?

Isn't there a way to fix the code? There is an error in the coding somewhere that is causing this.
Title: Re: Can't edit files
Post by: Font Color Red on April 10, 2006, 12:06:42 am
when you hit a key this page going to execute "textCounter" function (javascript),your problem is javascript or mey be you change the editpics.php manualy
do as nibbler said and check for error(it will gone) but you should also check your editpics.php file for any change

What do I edit in editpics.php?
Title: Re: Can't edit files
Post by: Sami on April 10, 2006, 12:36:55 am
1.do you have these lines on editpics.php (lines:517~520)
Code: [Select]
function textCounter(field, maxlimit) {
        if (field.value.length > maxlimit) // if too long...trim it!
        field.value = field.value.substring(0, maxlimit);
}
if no , you should add those
2.you can temporary disable javascript on that file by change line 356
Code: [Select]
<textarea name="$name" rows="5" cols="40" class="textinput" style="width: 100%;" onkeydown="textCounter(this, $max_length);" onkeyup="textCounter(this, $max_length);">$value</textarea>
to
Code: [Select]
<textarea name="$name" rows="5" cols="40" class="textinput" style="width: 100%;">$value</textarea>
Title: Re: Can't edit files
Post by: Font Color Red on April 10, 2006, 02:04:48 am
1.do you have these lines on editpics.php (lines:517~520)
Code: [Select]
function textCounter(field, maxlimit) {
        if (field.value.length > maxlimit) // if too long...trim it!
        field.value = field.value.substring(0, maxlimit);
}
if no , you should add those
2.you can temporary disable javascript on that file by change line 356
Code: [Select]
<textarea name="$name" rows="5" cols="40" class="textinput" style="width: 100%;" onkeydown="textCounter(this, $max_length);" onkeyup="textCounter(this, $max_length);">$value</textarea>
to
Code: [Select]
<textarea name="$name" rows="5" cols="40" class="textinput" style="width: 100%;">$value</textarea>

The first code is already there.

The second code to disable javascript didn't work, I still got the same Runtime error.

Any other options to get around this error?
Title: Re: Can't edit files
Post by: Joachim Müller on April 10, 2006, 10:40:34 am
temporarily disable JavaScript in your browser
Title: Re: Can't edit files
Post by: Sami on April 10, 2006, 11:12:51 am
If you are using IE you can disable Javascript by :

1. Click Start, point to Settings, click Control Panel, and then double-click Internet Options.

If you are using Internet Explorer 4.x, double-click Internet in Control Panel.
2. Click the Security tab.
3. Click the Internet zone, and then click Custom Level.

If you are using Internet Explorer 4.x, click Internet Zone.
4. In the Settings box, locate the Scripting section, and then click Disable under Active Scripting.
5. Click OK.
6. Click OK.
Title: Re: Can't edit files
Post by: Font Color Red on April 12, 2006, 12:43:08 am
If you are using IE you can disable Javascript by :

1. Click Start, point to Settings, click Control Panel, and then double-click Internet Options.

If you are using Internet Explorer 4.x, double-click Internet in Control Panel.
2. Click the Security tab.
3. Click the Internet zone, and then click Custom Level.

If you are using Internet Explorer 4.x, click Internet Zone.
4. In the Settings box, locate the Scripting section, and then click Disable under Active Scripting.
5. Click OK.
6. Click OK.


That sure seems like a hassle to temporarily disable javascript everytime I need to edit a description of a file. Isn't there a way to fix this error in the coding??
Title: Re: Can't edit files
Post by: Nibbler on April 12, 2006, 12:50:36 am
Maybe allowing us to test this on your gallery would be helpful.