T O P I C R E V I E W |
Webbo |
Posted - 04 July 2011 : 13:11:27 Help 
I need to put the following embedded code into an onload function within a forum page, and I am stuck
The embed code (edited for security reasons) is as follows:
Please could someone show me how? |
9 L A T E S T R E P L I E S (Newest First) |
Webbo |
Posted - 05 July 2011 : 17:27:49 As AnonJnr said it would be a problem keeping the includes updated - there are four different tv_channel pages in total, each rendering different video content and with their own embed codes so I would need four versions of the inc_header_tvchannel.asp, not unless I could use a series of 'if's which checks the page being rendered and then loads the correct code - but that's just getting too complicated
Huwr, the page is a custom file and not an original Snitz file, a text version is available Here |
Etymon |
Posted - 05 July 2011 : 12:58:53 This should work since you are just keeping up with the <body> tag for the onload function regarding edits. You could take your current inc_header.asp file (after editing and saving it) and then do a "Save As..." to save it as inc_header_tv_channel.asp (overwriting the old inc_header_tv_channel.asp file) as long as you remember to replace the needed onload function into the <body> tag once again after that save. |
AnonJr |
Posted - 05 July 2011 : 11:31:38 quote: Originally posted by leatherlips
Here is a thought. Since you made a special page maybe you could copy the inc_header.asp page and name it inc_header_tvchannel.asp. Add your code to it. Then in your tv_channel.asp page you could have it call inc_header_tvchannel.asp instead of the normal inc_header.asp page.
The only problem with that is keeping updates synchronized between the two. If there's something that needs changing on both includes, you'll have to remember to make two sets of changes.
Not bad when you only have two sets of changes, but that mindset only leads to madness later on. Take it from someone who's maintained someone else's code designed like that... |
leatherlips |
Posted - 05 July 2011 : 10:34:43 Here is a thought. Since you made a special page maybe you could copy the inc_header.asp page and name it inc_header_tvchannel.asp. Add your code to it. Then in your tv_channel.asp page you could have it call inc_header_tvchannel.asp instead of the normal inc_header.asp page. |
HuwR |
Posted - 05 July 2011 : 06:48:41 that is not a forum page, we don't have any pages called tv_channel. can you post a text version of that page so we can take a look |
Webbo |
Posted - 05 July 2011 : 02:38:05 The only problems I can see with that check is it will be made everytime a page is viewed that uses inc_header.asp and we get approx 11million page views a month, also I would not have any control where the resulting output is displayed
Here is a link to the page in question, the embedded code produces the video section, you can see the lag in the page rendering
http://www.maggotdrowning.com/forum/tv_channel.asp |
leatherlips |
Posted - 04 July 2011 : 21:09:45 I think you could add this to the inc_header.asp page and it would then only load for the page you wanted it on:
if request.servervariables("URL") = "/forum/yourpagehere.asp" then
%>
Content in here
<%
end if Change the parts in red for your own page and code. |
Webbo |
Posted - 04 July 2011 : 17:18:31 The embed code is specific to one page Davio, hence the need to include it within that page's code |
Davio |
Posted - 04 July 2011 : 17:07:15 Why not put it in the header or footer of the forum? If you put it in the footer, the javascript will execute after the page is loaded. |