473,326 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

jsp session variable in javascript

hi,
i want use a jsp session variable inside a javascript code, for this i am using the following function,

function checkList()
{
<% String ecode1=(String)session.getAttribute("e_numb"); %>
var code=<%=ecode1%>
alert (code)
}

this is showing an error can any one please help me,

thanks saurabh
Mar 6 '08 #1
1 3149
acoder
16,027 Expert Mod 8TB
You'll need to include it within quotes.
Mar 7 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Joe | last post by:
I am new to web development at all but maintaining a .NET site that utilizes .apsx pages using vbscript, javascript,and C#. There is a function I am doing that I only can find out how to do in...
0
by: SteveS | last post by:
Hello, this problem is driving me nuts! I am using the Content Ratings (RSACi) for my website. The settings strictly "G" rated - No violence, sex, nudity or offensive language. I have a user...
3
by: M Wells | last post by:
Hi All, Just wondering how you go about changing the value of a session cookie via javascript? I have a PHP page that sets a session cookie when it first loads. I'd like to be able to change...
6
by: -D- | last post by:
I'm trying to accomplish the following. I'm trying to get the values for the table rows that are dynamically created to persist through a redirect. Referring URL:...
2
by: Eric | last post by:
Hi, I've a problem with trying to retrieve a session variable in an include file. Basically, the main asp creates a session variable: <% Session("var1") = "Hello" %> And then when I click...
3
by: Enoch Chan | last post by:
I would like to set a Session variable to a value. In Vbscript it should be Session("ZoomValue")=500 How can I set this session variable by using Javascript? Thanks
2
by: Joe Molloy | last post by:
Hi, This isn't a mission critical question but I thought I'dl throw it out there for your feedback as it's a bit curious. I have developed a shopping cart for an application I'm working on...
5
by: rockdale | last post by:
Hi, all: I have a linkbutton and I use javascript to open another webpage in a new window. I also want to set my session variable value when this linkbutton get clicked. These session variable...
4
by: philin007 | last post by:
Hi , I have the following javascript codes: ****************************************** <script language="JavaScript"> <!-- .... ..... if (nextRow >5) {
10
by: sheldonlg | last post by:
Something weird is happening here. I inherited some code that looks like what is shown below. The problem is that when menu1.php is included, the session variables are not known in homepage.php. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.