Print Page | Close Window

Name Redefined error ( I found it but..)

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=13134
Printed Date: 29 March 2026 at 2:47am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Name Redefined error ( I found it but..)
Posted By: FARSHAD
Subject: Name Redefined error ( I found it but..)
Date Posted: 28 December 2004 at 11:10pm
Hi all

I added this editor to my news application but I get this error
======
Microsoft VBScript compilation error '800a0411'

Name redefined

/SQL News/includes/add_new.asp, line 126

Const strPathToRTEFiles = "RTE/"           'This needs to hold the path to the RTE files

=========
why this happen its first time I run it but why it show me redefine error

there is just one line like this

Const strPathToRTEFiles = "RTE/"

in my Application
=============================================


-------------
http://www.persianforum.net - http://www.persianforum.net
http://news.persianforum.net - http://news.persianforum.net (English)
Try to be a Professional



Replies:
Posted By: WebWiz-Bruce
Date Posted: 29 December 2004 at 5:03am
It looks like the variable is declared twice, possibly in another of your included files.

Also you can't have multiple RTE's on the same page with the present version.

I'm trying to make it so that mutilple RTE's on one page can be used in version 3, but at the moment it looks like it may never be possible to do in a way that is simple and doesn't require editing all the files and having multiple copies of everything.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: FARSHAD
Date Posted: 29 December 2004 at 5:12am
I found the problem

I have a default.asp page in admin section of my news aplication all of the pages such as add new entry page is in this page with a Select case function
like this
================


If Session("admin_pu") = true Then       

%>


<% Select Case news_Include %>

           <% Case "add_news" %>
           <!--#include file="includes/add_news.asp" -->
           <% Case "news_edit" %>
           <!--#include file="includes/news_edit.asp" -->

<% end select %>



<% Else %>


           <% Select Case news_Include %>
           <% Case "add_news" %>
           <!--#include file="includes/add_news.asp" -->


<% end select

End If
%>


=======================


we have two group admin and user
in admin mode the first section will run but in user mode second section will run

when I run the page in Admin mode every thing is okay but when I use RTE it show me above error
RTE is in add_news.asp file, it think there is two
file and it show me this error
but its in Admin mode and just frist section will run why it think there is two file ( add_news.asp )

how can I solve this problem
?

Thanks



-------------
http://www.persianforum.net - http://www.persianforum.net
http://news.persianforum.net - http://news.persianforum.net (English)
Try to be a Professional


Posted By: dpyers
Date Posted: 30 December 2004 at 9:31pm
Include files are expanded before the code is run - you can't include just one or the other - all of them are expanded into your code. In the example you give, add_news is expanded in there twice. The user code will be the second rte on the page.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: FARSHAD
Date Posted: 31 December 2004 at 9:29am
is there any way to solve this problem?
I want use this editor


-------------
http://www.persianforum.net - http://www.persianforum.net
http://news.persianforum.net - http://news.persianforum.net (English)
Try to be a Professional


Posted By: WebWiz-Bruce
Date Posted: 31 December 2004 at 10:01am
If you are not passing variables between the main file and include file you could try using server.execute instead of the include method eg:-

Select Case news_Include

          Case "add_news"
                server.execute ("includes/add_news.asp")

end select


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: FARSHAD
Date Posted: 01 January 2005 at 12:39am
thanks borg
but what you mean by " passing variables between the main file "
??


-------------
http://www.persianforum.net - http://www.persianforum.net
http://news.persianforum.net - http://news.persianforum.net (English)
Try to be a Professional


Posted By: dj air
Date Posted: 01 January 2005 at 6:03am
sending values via a querystring or post form.

use ?Veriable name=Veriable value

in the URL of the file

thats the easiest way, if your not using a form.




Posted By: FARSHAD
Date Posted: 02 January 2005 at 7:08am
yeah
I am using these variables and querystring but
How can I solve this problem I want use this RTE


-------------
http://www.persianforum.net - http://www.persianforum.net
http://news.persianforum.net - http://news.persianforum.net (English)
Try to be a Professional


Posted By: WebWiz-Bruce
Date Posted: 02 January 2005 at 10:34am
Have you tried the server.execute instead of the include method, it should hopefully solve the problem as you can still get the querystring when using that method.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: FARSHAD
Date Posted: 03 January 2005 at 12:24am
yeah
I used it but I get conflict error
on this line

     Rs.ActiveConnection = strConn

this line is in my add_news.asp page



-------------
http://www.persianforum.net - http://www.persianforum.net
http://news.persianforum.net - http://news.persianforum.net (English)
Try to be a Professional



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net