Click here to Skip to main content
15,890,512 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Date Validation Pin
ClimerChinna18-Mar-14 20:33
ClimerChinna18-Mar-14 20:33 
AnswerRe: Date Validation Pin
Praneet Nadkar4-May-14 22:46
Praneet Nadkar4-May-14 22:46 
QuestionFacebook share button is not working Pin
Member 803236014-Mar-14 21:46
Member 803236014-Mar-14 21:46 
AnswerRe: Facebook share button is not working Pin
ZurdoDev20-Mar-14 15:41
professionalZurdoDev20-Mar-14 15:41 
GeneralRe: Facebook share button is not working Pin
Sunasara Imdadhusen26-May-14 21:24
professionalSunasara Imdadhusen26-May-14 21:24 
Questionddslick set Max height Pin
saigowthami14-Mar-14 17:24
saigowthami14-Mar-14 17:24 
SuggestionRe: ddslick set Max height Pin
ZurdoDev20-Mar-14 15:43
professionalZurdoDev20-Mar-14 15:43 
Questionpop window Pin
Member 1003910910-Mar-14 20:33
Member 1003910910-Mar-14 20:33 
hi,
im doing gui project on that user can enter values for that i have to use popup window.i alredy return code for that if i click edit button popup window opening and closing with in a second.plz help me on that im posting my code also.

jsp code:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>


<%@page import="javax.xml.transform.Source"%>
<%@page import="javax.xml.transform.dom.DOMSource"%>
<%@page import="javax.xml.transform.Result"%>
<%@page import="javax.xml.transform.stream.StreamResult"%>
<%@page import="javax.xml.transform.TransformerFactory"%>
<%@page import="javax.xml.transform.Transformer"%>
<%@page import="java.io.FileWriter"%>
<%@page import="java.io.OutputStream"%>

<%@page import="java.io.File"%>
<%@page import="java.io.BufferedWriter"%>
<%@page import="java.io.OutputStreamWriter"%>
<%@page import="java.io.FileOutputStream"%>



<title>HSS-HOME






<%@page import="org.w3c.dom.Document"%>
<%@page import="org.w3c.dom.NamedNodeMap"%>
<%@page import="java.io.InputStream"%>
<%@page import="javax.xml.parsers.DocumentBuilderFactory"%>
<%@page import="javax.xml.parsers.DocumentBuilder"%>
<%@page import="javax.xml.parsers.ParserConfigurationException"%>
<%@page import="org.xml.sax.SAXException"%>
<%@page import="org.w3c.dom.NodeList"%>
<%@page import="org.w3c.dom.Node"%>
<%@page import="org.w3c.dom.Element"%>
<%@page import="org.xml.sax.Attributes"%>
<%@page import="com.ansula.lte.oam.*"%>



var octet = '(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])';
var ip = '(?:' + octet + '\\.){3}' + octet;
var ipRE = new RegExp( '^' + ip + '$' );

function validate( value ) {
alert( (ipRE.test( value ) ? '' :'IN' ) + 'VALID IPADDRESS' );
}



.TFtable{
width:100%;
border-collapse:collapse;
}
.TFtable td{
padding:7px; border:#4e95f4 0spx solid;
}
/* provide some minimal visual accomodation for IE8 and below */
.TFtable tr{
background: #D3D7E9;
}
/* Define the background color for all the ODD background rows */
.TFtable tr:nth-child(odd){
background: #D3D7E9;
}
/* Define the background color for all the EVEN background rows */
.TFtable tr:nth-child(even){
background: #fff;
}





function myFunction(value)
{
oldvalue=document.getElementById(value).value;


var address=prompt("Please enterip_adress" + oldvalue + "");

if (address!=null)
{
document.getElementById("value").innerHTML=oldvalue;
}
}






function enable_text(checkboxId,textElementId,tagName){
if(document.getElementById(checkboxId).checked === true)
{
oldvalue=document.getElementById(textElementId).value;
document.getElementById(textElementId).disabled = false;
document.getElementById(textElementId).style.backgroundColor = 'lightBlue';

//oldvalue=document.getElementById(textElementId).value;
//function test(){
// oValue= prompt("Enter value","");

//document.forms[0].elements[0].value = oValue;
//}

var df = prompt(" enter value ");

document.Form1.xname1.value = df;
}
else
{
document.getElementById(textElementId).disabled = true;
document.getElementById(textElementId).value = oldvalue;
document.getElementById(textElementId).style.backgroundColor = '';
}}


function AllowNumber(){
if (!form.xname116.value.match(/^[0-9]+$/) && form.xname116.value !=="")
{
form.xname116.value="";
form.xname116.focus();
alert("Please Enter only numbers in textbox");
}}


function OnButton1()
{
document.Form1.action = "hssupdate1.jsp";
// document.Form1.target = "_blank"; // Open in a new window

document.Form1.submit(); // Submit the page

return true;
}

function OnButton2()
{
document.Form1.action = "hssdefault1.jsp";
//document.Form1.target = "_blank"; // Open in a new window

document.Form1.submit(); // Submit the page

return true;
}









<%

Document doc = null;
InputStream path = null;
try {

DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Getproperty property = new Getproperty();
String configfilepath = property.getProperty("HSSFilepath");
// System.out.println(configfilepath);
doc = dBuilder.parse(configfilepath);
// Normalize the DOM tree to combine all adjacent nodes
doc.getDocumentElement().normalize();
}
catch (ParserConfigurationException e)
{
e.printStackTrace();
}
catch (SAXException e)
{
e.printStackTrace();
}


/*here the root elelment we are taking acc to file is config*/
//int booksIdParam = "1";
/* declaring string for the node value to be displayed*/
String xname = null;
String xname1 = null;

String cell = null;
String cell1 = null;

String cdes = null;
String cdes1 = null;

Element libElement = null;

NodeList nodeList = doc.getElementsByTagName("config");
for(int i=0; i<nodelist.getlength();i++)
{
="" node=""
="" if(node.getnodetype()="=" node.element_node)
="" element="" nodelist="" childnodelist25="element.getElementsByTagName("hss_ip_address");" for(i="0;i<childNodeList25.getLength();i++)
" childnode25="childNodeList25.item(i);
" if(childnode25.getnodetype()="=" libelement="(Element)" childnode25;="" xname="libElement.getFirstChild().getNodeValue();" namednodemap="" var2="childNode25.getAttributes();
" var3="var2.getNamedItem("default");
" cell="var3.getTextContent();
" desc="var2.getNamedItem("Description");
" cdes="desc.getTextContent();
" }
="" }
nodelist="" childnodelist="element.getElementsByTagName("hss_name");" childnode="childNodeList.item(i);
" if(childnode.getnodetype()="=" childnode;="" xname1="libElement.getFirstChild().getNodeValue();" cell1="var3.getTextContent();
" cdes1="desc.getTextContent();
" }="" %="">








                             NAME



















Edit




hss_name
IP ADDRESS DEFAULT IP ADDRESS


Edit




hss_ip_address




js code:


$(document).ready(function(){


$(".editForDesignElements").click(function(){

$(this).parent().find('div.popup').show();

});

});
SuggestionRe: pop window Pin
ZurdoDev20-Mar-14 15:45
professionalZurdoDev20-Mar-14 15:45 
QuestionTrying to compare cancel from prompt dialog not working Pin
RabbitTrail10-Mar-14 11:43
RabbitTrail10-Mar-14 11:43 
AnswerRe: Trying to compare cancel from prompt dialog not working Pin
Kornfeld Eliyahu Peter10-Mar-14 21:57
professionalKornfeld Eliyahu Peter10-Mar-14 21:57 
AnswerRe: Trying to compare cancel from prompt dialog not working Pin
ZurdoDev13-Mar-14 6:44
professionalZurdoDev13-Mar-14 6:44 
AnswerRe: Trying to compare cancel from prompt dialog not working Pin
twseitex13-Mar-14 9:28
twseitex13-Mar-14 9:28 
QuestionHow to write confirmation message? Pin
Member 1062605710-Mar-14 0:08
Member 1062605710-Mar-14 0:08 
AnswerRe: How to write confirmation message? Pin
thatraja10-Mar-14 2:29
professionalthatraja10-Mar-14 2:29 
GeneralRe: How to write confirmation message? Pin
Member 1062605710-Mar-14 2:45
Member 1062605710-Mar-14 2:45 
GeneralRe: How to write confirmation message? Pin
thatraja10-Mar-14 2:59
professionalthatraja10-Mar-14 2:59 
GeneralRe: How to write confirmation message? Pin
Praneet Nadkar4-May-14 23:22
Praneet Nadkar4-May-14 23:22 
GeneralRe: How to write confirmation message? Pin
thatraja4-May-14 23:28
professionalthatraja4-May-14 23:28 
GeneralRe: How to write confirmation message? Pin
Praneet Nadkar4-May-14 23:40
Praneet Nadkar4-May-14 23:40 
AnswerRe: How to write confirmation message? Pin
Praneet Nadkar4-May-14 23:39
Praneet Nadkar4-May-14 23:39 
Questionconsume external WCF REST services using Angular.js Pin
ramsai19737-Mar-14 1:14
ramsai19737-Mar-14 1:14 
AnswerRe: consume external WCF REST services using Angular.js Pin
Jellali Tarek7-Mar-14 4:38
Jellali Tarek7-Mar-14 4:38 
AnswerRe: consume external WCF REST services using Angular.js Pin
petra.elhashem7-Mar-14 10:30
petra.elhashem7-Mar-14 10:30 
Questionbody onunload Pin
RabbitTrail6-Mar-14 16:26
RabbitTrail6-Mar-14 16:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.