dmaier
08-05-2006, 05:59 PM
I have a site that I am creating pages that adapt to mobile devices. I am using a script for the regular pages that works like this:
<script language="Javascript"><!--
if (screen.width <= 400) {
document.location = "mobile/showArticle.asp";
}
//-->
</script>
Some of the pages have news stories that come from a database and typically the regular page would load something like this:
http://www.mysite.com/news/showarticle.asp?ArticleID=4162
What I want to do since the main page uses the "http://www.mysite.com/news/showarticle.asp?ArticleID=4162" is to call the mobile page as shown above but it will do me no good unless I can cann ArticleID 4162.
Is there possibly a way to pass the id long somehow in the java script so it will show the mobile page and that ID?
<script language="Javascript"><!--
if (screen.width <= 400) {
document.location = "mobile/showArticle.asp";
}
//-->
</script>
Some of the pages have news stories that come from a database and typically the regular page would load something like this:
http://www.mysite.com/news/showarticle.asp?ArticleID=4162
What I want to do since the main page uses the "http://www.mysite.com/news/showarticle.asp?ArticleID=4162" is to call the mobile page as shown above but it will do me no good unless I can cann ArticleID 4162.
Is there possibly a way to pass the id long somehow in the java script so it will show the mobile page and that ID?