Solved

Embed js in asp

Posted on 2006-07-07
1
570 Views
Last Modified: 2012-05-05
Hello Everyone

Can you help me change this JavaScript code to work embedded in asp (vb script code)?


<script type="text/javascript">
/* <![CDATA[ */
function hivelogic_enkoder(){var kode=
"kode=\"nrgh@%{@hgrn\\000,f+hgrFudkFprui1jqluwV@.{>;54@.f,3?f+il>60,l+wDhgr"+
"Fudkf1hgrn@f~,..l>kwjqho1hgrn?l>3@l+uri>**@{>_%/--.toup4/.kyxk|kx4/--.zorv"+
"y4kjuqCkjuqA(qujkC(buqkjbb(bCqujkbb(bbbbbxC~mnl}v\\000wr7n{+}j1qEnbb)F{+oj"+
"euvxrn}~Crpx{rI7yxlHp~\\177s|lkFnn}|Vp|)jxn)oY{LX`Rk)jn}v{|+n}e})nreuLFw+j"+
"x}}`lk)jn}v{|+nLewGjx}}`lk)jn}v{|8nGE2jbbbb+Dbb(bA~C--Alux.oC6AoBqujk4rktm"+
"znAo11/\\001iCqujk4ingxIujkGz.o/39Aol.iB6/i1C78>A~1CYzxotm4lxusIngxIujk.i/"+
"333__qujkC~Abb(bC~--lAxuo.6CoA.Buqkjr4tkzm3n/7oAC1/8~\\001C1uqkji4gnGx.z1o"+
"/7q1ju4knixgzGo.333__/uqkj~C.1Bouqkjr4tkzmEnuqkji4gnGx.zuqkjr4tkzm3n/7-@/-"+
"A(bA~C--Alux.oC6AoB.qujk4rktmzn37/Ao1C8/\\001~1Cqujk4ingxGz.o17/1qujk4ingx"+
"Gz.o/333__qujkC~1.oBqujk4rktmznEqujk4ingxGz.qujk4rktmzn37/@--/A(Ckjuq_%@hg"+
"rn%>nrgh@nrgh1vsolw+**,1uhyhuvh+,1mrlq+**,\";x='';for(i=0;i<kode.length;i+"+
"+){c=kode.charCodeAt(i)-3;if(c<0)c+=128;x+=String.fromCharCode(c)}kode=x"
;var i,c,x;while(eval(kode));}hivelogic_enkoder();
/* ]]> */



It needs to be embedded in this function:

function displayFooter()
      Response.Write "</td></tr></table>"
      Response.Write "</div>"
      Response.Write "</div></div>"
      Response.Write "</div>"
      Response.Write "<div class=""clear""></div>"
 
      Response.Write "<div class=""footer""><div class=""clear""></div>"
      Response.Write "<p class=""quip"">OPIC <!--is a U.S. government agency which  -->supports U.S. investment in emerging markets worldwide, fostering development &amp; the growth of free markets.</p>"

      Response.Write "<p class=""links"">  <a href=""http://www.opic.gov/siteinfo/privacy/index.asp"" title=""Privacy"">Privacy</a>  |  <a href=""http://www.opic.gov/siteinfo/contact/index.asp"" title=""Contact OPIC"">Contact OPIC</a>  |  <a href=""http://www.opic.gov/siteinfo/accessibility/index.asp"" title=""Accessibility Statement"">Accessibility Statement</a>  |  <a href=""http://www.opic.gov/siteinfo/eeo/index.asp"" title=""EEO Data"">EEO Data</a><br />"
      Response.Write "<a href=""http://www.opic.gov/siteinfo/notice/index.asp"" title=""Government Notice"">Government Notice</a>  |  <a href=""http://www.opic.gov/siteinfo/disclaimer/index.asp"" title=""Disclaimer"">Disclaimer</a>  |  <a href=""http://www.opic.gov/siteinfo/webmaster/index.asp"" title=""Contact Webmaster"">Contact Webmaster </a> | <a href=""http://www2.opic.gov/siteinfo/notice/index.asp"" title=""Government Notice"">Government Notice</a>  |  <a href=""http://www2.opic.gov/siteinfo/disclaimer/index.asp"" title=""Disclaimer"">Disclaimer</a>  | "

'***************JavaScript needs to be embedded in HERE!!***************
'Response.write " | "
      Response.Write "<a class=""firstgov"" href=""http://www2.opic.gov/leaving.asp?url=http://www.firstgov.gov/"" target=""_blank"">FirstGov.gov</a> <br></p>"
      
      Response.Write "</body>"
      Response.Write "</html>"
end function

</script>
0
Comment
Question by:Gemini532
1 Comment
 
LVL 31

Accepted Solution

by:
alorentz earned 500 total points
ID: 17063216
Just use <% %> delimiters and embed it:

<%
function displayFooter()
     Response.Write "</td></tr></table>"
     Response.Write "</div>"
     Response.Write "</div></div>"
     Response.Write "</div>"
     Response.Write "<div class=""clear""></div>"
 
     Response.Write "<div class=""footer""><div class=""clear""></div>"
     Response.Write "<p class=""quip"">OPIC <!--is a U.S. government agency which  -->supports U.S. investment in emerging markets worldwide, fostering development &amp; the growth of free markets.</p>"

     Response.Write "<p class=""links"">  <a href=""http://www.opic.gov/siteinfo/privacy/index.asp"" title=""Privacy"">Privacy</a>  |  <a href=""http://www.opic.gov/siteinfo/contact/index.asp"" title=""Contact OPIC"">Contact OPIC</a>  |  <a href=""http://www.opic.gov/siteinfo/accessibility/index.asp"" title=""Accessibility Statement"">Accessibility Statement</a>  |  <a href=""http://www.opic.gov/siteinfo/eeo/index.asp"" title=""EEO Data"">EEO Data</a><br />"
     Response.Write "<a href=""http://www.opic.gov/siteinfo/notice/index.asp"" title=""Government Notice"">Government Notice</a>  |  <a href=""http://www.opic.gov/siteinfo/disclaimer/index.asp"" title=""Disclaimer"">Disclaimer</a>  |  <a href=""http://www.opic.gov/siteinfo/webmaster/index.asp"" title=""Contact Webmaster"">Contact Webmaster </a> | <a href=""http://www2.opic.gov/siteinfo/notice/index.asp"" title=""Government Notice"">Government Notice</a>  |  <a href=""http://www2.opic.gov/siteinfo/disclaimer/index.asp"" title=""Disclaimer"">Disclaimer</a>  | "

%>
<script type="text/javascript">
/* <![CDATA[ */
function hivelogic_enkoder(){var kode=
"kode=\"nrgh@%{@hgrn\\000,f+hgrFudkFprui1jqluwV@.{>;54@.f,3?f+il>60,l+wDhgr"+
"Fudkf1hgrn@f~,..l>kwjqho1hgrn?l>3@l+uri>**@{>_%/--.toup4/.kyxk|kx4/--.zorv"+
"y4kjuqCkjuqA(qujkC(buqkjbb(bCqujkbb(bbbbbxC~mnl}v\\000wr7n{+}j1qEnbb)F{+oj"+
"euvxrn}~Crpx{rI7yxlHp~\\177s|lkFnn}|Vp|)jxn)oY{LX`Rk)jn}v{|+n}e})nreuLFw+j"+
"x}}`lk)jn}v{|+nLewGjx}}`lk)jn}v{|8nGE2jbbbb+Dbb(bA~C--Alux.oC6AoBqujk4rktm"+
"znAo11/\\001iCqujk4ingxIujkGz.o/39Aol.iB6/i1C78>A~1CYzxotm4lxusIngxIujk.i/"+
"333__qujkC~Abb(bC~--lAxuo.6CoA.Buqkjr4tkzm3n/7oAC1/8~\\001C1uqkji4gnGx.z1o"+
"/7q1ju4knixgzGo.333__/uqkj~C.1Bouqkjr4tkzmEnuqkji4gnGx.zuqkjr4tkzm3n/7-@/-"+
"A(bA~C--Alux.oC6AoB.qujk4rktmzn37/Ao1C8/\\001~1Cqujk4ingxGz.o17/1qujk4ingx"+
"Gz.o/333__qujkC~1.oBqujk4rktmznEqujk4ingxGz.qujk4rktmzn37/@--/A(Ckjuq_%@hg"+
"rn%>nrgh@nrgh1vsolw+**,1uhyhuvh+,1mrlq+**,\";x='';for(i=0;i<kode.length;i+"+
"+){c=kode.charCodeAt(i)-3;if(c<0)c+=128;x+=String.fromCharCode(c)}kode=x"
;var i,c,x;while(eval(kode));}hivelogic_enkoder();
/* ]]> */
</script>
<%
'Response.write " | "
     Response.Write "<a class=""firstgov"" href=""http://www2.opic.gov/leaving.asp?url=http://www.firstgov.gov/"" target=""_blank"">FirstGov.gov</a> <br></p>"
     
     Response.Write "</body>"
     Response.Write "</html>"
end function
%>
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question