anvi kon

Ranch Hand
+ Follow
since Jan 08, 2010
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by anvi kon

Is there anyway to write a regular expression to check the number fall  in between range 1402 to 1423?

What is the regular expression format for the numbers?

Var s= (1402,1403,1404…. 1423)

I need to add the validation  onclick()=download(‘report.html, “”) download  download html in javascript. I added below but it us adding empty file. Can you Please help me what is wring in this

function download(filename, text) {
 var element = document.createElement('a');
 element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
 element.setAttribute('download', filename); = 'none';

Do i have to add  the below code in the servlet or jsp page?


Thanks for the Quick response.

Do you have any example of how and where to set the response header to force download  on  the javascript ?

on my requirement, once the report generated there is Save button ,if the user clicks the save we should save the report.htm on the local drive.

right now we are using the  onclick="document.execCommand('SaveAs',true,'file.html');"

I tired the option window.showSaveFilePicker(), but it is saving as empty file. It overwrites with empty data. I have to save a html report.

funtion save()
async function getNewFileHandle() {
 const options = {
   types: [
       description: 'Text Files',
       accept: {
         'text/plain': ['.txt'],
 const handle = await window.showSaveFilePicker(options);

 return handle;
have a page, that displays a table with contents.
There is a save button. On clicking the save button i need to save the page on my local system.
I have implemented it using the document.execCommand('SaveAs')
It seems it will work only for IE.
Are there any other ways of implementing the "save as" option so that it works on all browsers.
I need to save html on my local. Document.execCommand(“SaveAs”) support only IE . Need to know a common code that will work in both Internet Explorer and Microsoft-Edge (chromium)
2 years ago
I am working on java upgrade from jboss to Wildfly application server
I am facing some Ejb lookup issue when i call and deploy ejb application on wildy fly

Can anyone tell me what are the steps and jars needed when i deploy and call ejb lookup

I need it asap, appreciate your help
Any update on this adding dependency jars in the wildfly application server
3 years ago
Need help on adding external libraries on the wildfly application server

I have one dependency jar weather1.3.jar with package name

In old jboss we add under jboss/ deploy/ lib. But in the new wild fly application server where can we add the libraries
3 years ago
Onclick event is not firing properly when we call the JavaScript
3 years ago
I am try to create a checkbox and onlick event. It is not firing properly for unchecked

here is my code

Javascript code

3 years ago
What  version of java is compatible  with SQLserver2016?

Is jdk1.6.0_45 works?

Please let me know.

5 years ago

Can anyone tell, is jdk1.6 compatible with jboss-6.1.0.Final?

5 years ago