Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 17th, 2011, 12:17 PM
Authorized User
 
Join Date: Jun 2007
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default @include js variable

I have a jsp page that includes a file.

<%@ include file="/site/login.html"%>

I need to mix this with javascript in order to do the following

Code:
if (screen is certain size)
{
    <%@ include file="/site/mobile_login.html"%>
}
else
{ 
  <%@ include file="/site/login.html"%>
}
and I am having trouble with the syntax of either setting a js variable to the @include and doing a document.write, or setting a jsp variable to the file.html and placing it in the @include

any help will be most welcome





Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass a Variable from VBS to JS kriemer Javascript 7 March 8th, 2009 04:09 PM
how to include .js file in .aspx page shanwaj ASP.NET 2.0 Basics 13 March 11th, 2008 07:36 AM
To include a js file into another js file jdang67 Javascript 4 February 28th, 2008 03:32 AM
Storing an include in a variable trufla Beginning PHP 1 May 21st, 2006 10:52 PM
Use a Variable for an Include Statement ptetz Classic ASP Basics 2 August 25th, 2003 03:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.