Forum Moderators: open
long story short... i have some html pages that link to a ecommerce system which sits in a sub directory.
we have updated the ecommerce system now, but due to the way the old system worked we had to use a js link to the product pages from the html pages.
the link is <a href="javascript:storeLink(2769);">link</a>
this then uses this function in the head of the page
<script>
function storeLink(pageNo){
if(window.name=='e_page'){
parent.parent.show(pageNo,0,0)
}else{
if(window.name=='caddy'){
parent.parent.parent.show(pageNo,0,0)
}else{
window.location.href='/estoretest/erol.html?'+pageNo+'x0'
}
}
}
</script>
now as we have upgrade the ecommerce store we want to use redirect 301 to the new pages, which have replaced the old pages.
but this is proving very difficult due to the way the "old" pages were created when the link was clicked.
so plan b - can anyone help in editing this function so that when the link is clicked it links to the StoreLink number (in this case 2769) but in this format /folder/xSTORELINK.html - so /store/x2769.html
i hope that all makes sense, thanks for any help on this as JS is not my strong point ;0)