I have a site that I am creating pages that adapt to different screen sizes. I am using a script for the regular pages that works like this:
<script language="Javascript"><!--
if (screen.width < 1000) {
document.location = "showArticle2.asp";
}
//-->
</script>
Some of the pages have news stories that come from a database and typically the regular page would load something like this:
What I want to do since the main page uses the " is to call the alternate page as shown above but it will do me no good unless I can ArticleID 4162.
I tried this but it does not work:
<script language="Javascript">
if (screen.width < 400)
window.location.replace("showArticle2.asp" + window.location.search);}
//-->
</script>
Does anyone has any ideas how to make it work? Thanks in advance for any help.
<script language="Javascript"><!--
if (screen.width < 1000) {
document.location = "showArticle2.asp";
}
//-->
</script>
Some of the pages have news stories that come from a database and typically the regular page would load something like this:
What I want to do since the main page uses the " is to call the alternate page as shown above but it will do me no good unless I can ArticleID 4162.
I tried this but it does not work:
<script language="Javascript">
if (screen.width < 400)
window.location.replace("showArticle2.asp" + window.location.search);}
//-->
</script>
Does anyone has any ideas how to make it work? Thanks in advance for any help.