Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Name Redefined error ( I found it but..)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedName Redefined error ( I found it but..)

 Post Reply Post Reply Page  12>
Author
FARSHAD View Drop Down
Groupie
Groupie


Joined: 21 September 2003
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote FARSHAD Quote  Post ReplyReply Direct Link To This Post Topic: Name Redefined error ( I found it but..)
    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
=============================================


Edited by FARSHAD - 29 December 2004 at 5:17am
http://www.persianforum.net
http://news.persianforum.net (English)
Try to be a Professional
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
FARSHAD View Drop Down
Groupie
Groupie


Joined: 21 September 2003
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote FARSHAD Quote  Post ReplyReply Direct Link To This Post 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://news.persianforum.net (English)
Try to be a Professional
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
FARSHAD View Drop Down
Groupie
Groupie


Joined: 21 September 2003
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote FARSHAD Quote  Post ReplyReply Direct Link To This Post 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://news.persianforum.net (English)
Try to be a Professional
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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


Edited by -boRg- - 31 December 2004 at 10:02am
Back to Top
FARSHAD View Drop Down
Groupie
Groupie


Joined: 21 September 2003
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote FARSHAD Quote  Post ReplyReply Direct Link To This Post 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://news.persianforum.net (English)
Try to be a Professional
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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.


Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.