Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Site Poll Mod: Problems Including in another page
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 08 January 2003 :  16:55:52  Show Profile  Visit MarkJH's Homepage
I can't for the life of me work out how to include the site_poll.asp in another ASP page. Using <!--#include file="site_poll.asp"--> I get the following error:

Microsoft VBScript compilation error '800a0411'

Name redefined

/forum_folder/inc_adovbs.asp, line 14

Const adOpenForwardOnly = 0
------^

What am I doing wrong?

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 08 January 2003 :  17:00:42  Show Profile
you're other page is probably already defining adOpenForwardOnly, either in the file itself, or in a different include.
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 08 January 2003 :  17:15:31  Show Profile  Visit MarkJH's Homepage
The other page does use the Content Display MOD as well and contains these includes:

<!--#INCLUDE VIRTUAL="forum_folder/config.asp"-->
<!--#INCLUDE VIRTUAL="forum_folder/inc_func_secure.asp" -->
<!--#INCLUDE VIRTUAL="forum_folder/inc_sha256.asp"-->
<!--#INCLUDE VIRTUAL="forum_folder/inc_header_indexpage.asp" -->
<!--#INCLUDE VIRTUAL="forum_folder/content.asp" -->
<!--#INCLUDE VIRTUAL="forum_folder/inc_contentdisplay.asp" -->

The site_poll.asp page uses these includes:

<!--#include virtual="forum_folder/config.asp"-->
<!--#include virtual="forum_folder/inc_func_common.asp"-->
<!--#include virtual="forum_folder/inc_func_secure.asp"-->

I took out the <!--#include virtual="forum_folder/config.asp"--> from the other page and it seems to work fine. The other page still includes inc_func_secure.asp (therefore it's being included twice) but it doesn't seem to cause any problems so maybe i'll leave that there.

Thanks Richard.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 08 January 2003 :  19:44:02  Show Profile
You can take out inc_func_secure.asp from the site_poll.asp page since you already have it included on your page. You can also move the includes out of the site_poll.asp file to where you have all your includes defined on your page.

Support Snitz Forums
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 08 January 2003 :  19:51:01  Show Profile  Visit MarkJH's Homepage
Good idea. It's working a treat now but I think i'll do that anyway. Of course, it means that loading site_poll.asp directly from the browser won't work anymore, but that matters not!

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 08 January 2003 :  20:11:33  Show Profile
Well, loading it directly from the browser was to configure it before implementing it on your site. After that, you hack the file to fit your site.

Support Snitz Forums
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 09 January 2003 :  13:24:34  Show Profile  Visit MarkJH's Homepage
Davio, I have a <base target="_blank"> in the page which the Site poll resides, which is necessary and cannot be removed.

How would I change this code:

if strGfxButtons <> "0" then
'# Vote now and View Results Buttons code when graphics are on
Response.Write "<input type=""image"" src=""" & strPollURL & strImageURL & "vote_now.gif"" alt=""Vote in today's Featured Poll"" name=""vote"" hspace=""0"" width=""72"" height=""16"" onClick=""submitPoll(this)"">" & vbNewline & _
"  <input type=""image"" src=""" & strPollURL & strImageURL & "view_results.gif"" alt=""View Results of today's Featured Poll"" name=""results"" hspace=""0"" width=""95"" height=""16"" onClick=""submitPoll(this)"">" & vbNewline
else
'# Vote now and View Results Buttons code when graphics are off
Response.Write "<input type=""button"" value=""Vote Now!"" name=""vote"" onClick=""submitPoll(this)"">" & vbNewline & _
"  <input type=""button"" value=""Poll Results"" name=""results"" onClick=""submitPoll(this)"">" & vbNewline
end if

To open the poll in the same window as opposed to a new window which the <base target="_blank"> is forcing it to do?

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 09 January 2003 :  13:27:29  Show Profile  Visit MarkJH's Homepage
I've put target=""_top"" on every other href in site_poll.asp which has cured the problem for those but I can't work out how to do it for the Vote Now and View Results buttons.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 09 January 2003 :  14:27:46  Show Profile
Trying putting the target=""_top"" in the <form> tags.

Support Snitz Forums
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 09 January 2003 :  16:42:50  Show Profile  Visit MarkJH's Homepage
Bingo!

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07