473,623 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to assign a javaScript variable to a jsp variable in a single page

4 New Member
how to assign a JavaScript variable to a jsp variable in a single page
Ex :
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. var MM=Calculate_Form('<%=DATE_INSTALL%>','<%=TILLDATE%>');
  3. alert(MM);
  4. </script>
this is possible.
But i want
Expand|Select|Wrap|Line Numbers
  1. <%
  2.   String Str =// javascript variable value ;
  3. %>
How to?
plz help...
Mar 23 '11 #1
1 1708
Dormilich
8,658 Recognized Expert Moderator Expert
just make JSP print the JavaScript code (and, no, I’m not a JSP programmer)
Mar 23 '11 #2

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

Similar topics

1
4516
by: iMedia User | last post by:
I have a site where I want to use the Web form validators in two separate forms on a single page. One form allows existing users to log in while the second one allows new users to register. The problem is that if I use the Web Form validation tags, it treats them all as one form (ie...if someone is trying to use the login form, they get an error saying that they have to enter values in the registration form and vice-versa). Any ideas on...
1
9123
by: Machi | last post by:
let say i have a web form with a button on it ... when i click the button, it will pop up one small window to allow me to save a pdf file, everything is done using code behind as below ... however, in javascript, i have set a global variable as a flag to indicate the number of times user click the buttion (let say flagNoOfClick), when user clicks the button once, it will set the flag (flagNoOfClick) to "true" (by using javascript). So, when user...
3
2676
by: google | last post by:
Hi I'm looking for some advice, so if anyone wants to contribute I would be grateful. I'm trying to create a web application. By application I mean something that is like a Windows application, not just a set of web pages (imagine Microsoft Word as opposed to Amazon). Much of the 'screen' contains static info, along the top is an Office style ribbon bar with tabs and buttons. Along the left is a treeview with a fixed
1
3579
by: Ranjan | last post by:
Hi, I want to assign javaScript variable to JSP variable. <Script> var conf=Confirm("Mess"); if(conf) { <% String str=conf; /// line 1 %> }
1
2620
by: Andrew Burton | last post by:
I'm poking at a small "single page application" (SPA), ala TiddlyWiki, to act as kind of a local, single-user version of Twitter (no real application, except to familiarize myself with JavaScript). Right now I'm using a hidden field to hold JSON, which is currently my flat-file database of posts. Is there a better way to store JSON data in a SPA other than hidden fields? I'm Googling now to allay or confirm my concerns, but I'm...
1
1491
by: rupeshnyadav | last post by:
How to access Hidden variable in Javascript declared in Content Page
3
1483
by: sasimca007 | last post by:
how to assign the perl variable to javascript variable?
1
1753
by: siddu | last post by:
How to call Javascript function in single statement, I have to call these two statements in a single onClick img.Attributes("onclick") = "toggleSidebar(" + IDPREFIXSIDEBARCONTENT + CStr(tab.Id) + ")" img.Attributes("onclick") = "showTab(" + IDPREFIXTAB + CStr(res.Id) + ", '" + param + "');" Please advice me how to call above two statements in single img.Attributes("onclick")? Thanks, Vidyasagar
1
1696
by: jmohan | last post by:
Hi everyone, I am developing a website using asp.net with C#. And I developed a toolbar using javascript like google and yahoo toolbar which is placed in the browser separately. Toolbar has the toolbar id. I need to capture the toolbar id and save into the mysql database during the page load.
1
3132
by: timsamshuijzen | last post by:
The website I am developing is implemented as a Single Page Interface (SPI). During a visitor's session all new content gets loaded by JavaScript (Ajax), no new pages get loaded and the URL in the address bar does not change. This has many advantages for the website application I am building (I will not go into the details of the advantages here), but the obvious down-side is that the visitor will get unexpected results when pressing the...
0
8217
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8160
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8603
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8312
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8460
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6104
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4067
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1467
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.