sniper
11-14-2005, 09:18 AM
Hi guys. I appear to have a problem. I've been given the task of converting javascript into asp. I went to test the page and got the object expected error, not sure why. I will now show the before(javascript) and after(asp) code below.
[javascript]
<script SRC="BoutiqueIncludes/js/Boutiques.js"></script>
<script language="javascript" type="text/javascript">
<!--
function RedirectURL(strURL)
{
document.frmMain.action = strURL;
document.frmMain.submit();
}
function ChangeLang(CurrentLang)
{
if (CurrentLang == 'EN')
document.frmMain.hidLang.value = 'FR';
else
document.frmMain.hidLang.value = 'EN';
RedirectURL('#');
}
function popUpEbay(strEbaySite)
{
var PathForEbay = strEbaySite + '?hidLang=<%= strLang%>&hidLoginGUID=<%= strUniqueId%>&hidProgramSource=<%= Application("strProgramSource")%>&hidEbayUserID=<%= Application("strEbayUserID"+strLang)%>';
WinOpen(PathForEbay,650,650,'Ebay');
}
//-->
</script>
[asp]
<!-- #include file="BoutiqueIncludes\asp\Boutiques.asp" -->
<%
sub ChangeLang(CurrentLang)
if CurrentLang = "EN" then
request.Form("hidLang") = "FR"
else
request.Form("hidLang") = "EN"
end if
location.href= "#"
end sub
sub popUpEbay(strEbaySite)
dim PathForEbay:PathForEbay = strEbaySite + "?hidLang=" + strLang + "&hidLoginGUID=" + strUniqueId + "&hidProgramSource=" + Application("strProgramSource") + "&hidEbayUserID=" + Application("strEbayUserID"+strLang)
location.href= PathForEbay
end sub
%>
Thank you for any help.
[javascript]
<script SRC="BoutiqueIncludes/js/Boutiques.js"></script>
<script language="javascript" type="text/javascript">
<!--
function RedirectURL(strURL)
{
document.frmMain.action = strURL;
document.frmMain.submit();
}
function ChangeLang(CurrentLang)
{
if (CurrentLang == 'EN')
document.frmMain.hidLang.value = 'FR';
else
document.frmMain.hidLang.value = 'EN';
RedirectURL('#');
}
function popUpEbay(strEbaySite)
{
var PathForEbay = strEbaySite + '?hidLang=<%= strLang%>&hidLoginGUID=<%= strUniqueId%>&hidProgramSource=<%= Application("strProgramSource")%>&hidEbayUserID=<%= Application("strEbayUserID"+strLang)%>';
WinOpen(PathForEbay,650,650,'Ebay');
}
//-->
</script>
[asp]
<!-- #include file="BoutiqueIncludes\asp\Boutiques.asp" -->
<%
sub ChangeLang(CurrentLang)
if CurrentLang = "EN" then
request.Form("hidLang") = "FR"
else
request.Form("hidLang") = "EN"
end if
location.href= "#"
end sub
sub popUpEbay(strEbaySite)
dim PathForEbay:PathForEbay = strEbaySite + "?hidLang=" + strLang + "&hidLoginGUID=" + strUniqueId + "&hidProgramSource=" + Application("strProgramSource") + "&hidEbayUserID=" + Application("strEbayUserID"+strLang)
location.href= PathForEbay
end sub
%>
Thank you for any help.