Click here to Skip to main content
15,911,890 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Calculating DigestValue over URI - URGENT HELP VERY MUCH APPRECIATED Pin
Andy H3-Jul-08 8:55
Andy H3-Jul-08 8:55 
QuestionHow to add a tag <tag val="N"> to an xml file Pin
SWDevil1-Jul-08 8:57
SWDevil1-Jul-08 8:57 
Questionadding xmlnode with child nodes Pin
manoj221841-Jul-08 6:25
manoj221841-Jul-08 6:25 
QuestionReturning XML from the web service Pin
steve_rm28-Jun-08 4:41
steve_rm28-Jun-08 4:41 
QuestionOpen Office XML - Setting Style Pane Options Programmatically Pin
trvenkat27-Jun-08 11:20
trvenkat27-Jun-08 11:20 
QuestionXML Value change Pin
Jhony george24-Jun-08 23:21
Jhony george24-Jun-08 23:21 
AnswerRe: XML Value change Pin
led mike25-Jun-08 4:16
led mike25-Jun-08 4:16 
QuestionAjax and XML related problem Pin
Y_Kaushik23-Jun-08 23:14
Y_Kaushik23-Jun-08 23:14 
Hello all's
I am new in ajax and XML.When any form data is saved using ajax ( without page refresh ) Then the function return xml ...
How can i do this can any one help me my code is written below.
<?
some required files.
?>
<html>
<head>
<title></title>
<link href="templates/<?php echo $TEMPLATE ?>/css/stylesheet.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="templates/<?php echo $TEMPLATE ?>/javascript/jstb_validations.js"></script>
<script type="text/javascript" src="templates/<?php echo $TEMPLATE ?>/javascript/AjaxRequest.js"></script>
<script language="javascript" type="text/javascript">
function ajaxFunction(sText)
{
var ajaxRequest; // The variable that makes Ajax possible!
try
{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer Browsers
try
{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){
// Something went wrong
alert("Your browser browser is not compitable for the page on which you are working!");
return false;
}
}
}
var device_type_name = document.getElementById('device_type_name').value;
var reporting_interval = document.getElementById('reporting_interval').value;
var module = document.getElementById('module').value;
var version = document.getElementById('version').value;
var s_key = document.getElementById('s_key').value;
var uid = document.getElementById('uid').value;
var lang = document.getElementById('lang').value;
// This query string is for direct call using class
//var strUrl = '?device_type_name='+device_type_name+'&reporting_interval='+reporting_interval;
// This query string is for API call
var strUrl = '?device_type_name='+device_type_name+'&reporting_interval='+reporting_interval+'&module='+module+'&version='+version+'&s_key='+s_key+'&uid='+uid+'&lang='+lang;
ajaxRequest.open("GET", "api/index.php" + strUrl,onResponse,true);
ajaxRequest.send(null);
// AjaxRequest.get(
// {
// 'url':'strUrl','onSuccess':function(){ alert('Success!');
// }}
// );

// var ajax = new Ajax();
// ajax.makeRequest('GET', 'api/index.php', onResponse);



//blank all field for new entry
document.getElementById('device_type_name').value='';
document.getElementById('reporting_interval').value='';
/////////

function onResponse()
{
if(ajax.checkReadyState() == "success")
{
// add your parsing code here
alert("success");
}
}
}
</script>
<script type="text/javascript">
function ChkFrm_data()
{
frm=document.add_new_dev_type;
if(frm.device_type_name.value=="")
{
CustomAlert('<?php echo NECESSARY_FIELD_REQUIRED?>');
frm.txt_device_type_name.focus();
return false;
}
if(frm.reporting_interval.value=="")
{
CustomAlert('<?php echo NECESSARY_FIELD_REQUIRED?>');
frm.txt_reporting_interval.focus();
return false;
}
}
function CheckInteger(input_object)
{
if(!isNumeric(input_object.value))
{
CustomAlert('<?php echo NUMERIC_FIELD_REQUIRED?>');
input_object.value = "";
//next two lines are there for compatibility with FireFox
myField = input_object;
setTimeout("this.myField.focus();",0);
//input_object.focus();
return false;
}
}
function CustomAlert(message, message_header, message_type)
{
alert(message);
}
</script>
</head>
<body class="body_inner">
<form action="add_new_dev_type.php" name="add_new_dev_type" method="POST" onSubmit="return ChkFrm_data();">
<table id="form_container">
<tr id="form_header">
<td colspan="2"><?php echo HEADING?></td>
</tr>
<tr id="form_message">
<?if(!empty($message)){?>
<td colspan="2"><?php echo $message;?></td>
<?}?>
</tr>
<tr id="field_row">
<td><?php echo DEVICE_TYPE_NAME?></td>
<td><input type='text' name='device_type_name' id='device_type_name' value='<?php echo $device_type_name ?>' /></td>
</tr>
<tr id="field_row">
<td><?php echo REPORTING_INTERVAL?></td>
<td><input type='text' id="reporting_interval" name='reporting_interval' value='<?php echo $reporting_interval ?>' onChange="return CheckInteger(document.getElementById('txt_reporting_interval'))" /></td>
</tr>
<tr>
<td colspan="2">
<input type="hidden" name="module" id="module" value="ADD_DEVICE_TYPE">
<input type="hidden" name="version" id="version" value="0.3">
<input type="hidden" name="s_key" id="s_key" value="<?php echo $CURRENT_HASH?>">
<input type="hidden" name="uid" id="uid" value="<?php echo $USER_ID?>">
<input type="hidden" name="lang" id="lang" value="english">
<input type="button" onClick="ajaxFunction(add_new_dev_type)" name='Save' value='Save' />
</td>
</tr>
</table>
</form>
</body>
</html>

Regard's
Kaushik
QuestionNeed help for converting XML data in excel spreadsheet and to show in web page... Pin
Pushpa Setty20-Jun-08 21:24
Pushpa Setty20-Jun-08 21:24 
QuestionDataGridView to Xml Pin
Anoop Brijmohun20-Jun-08 0:29
Anoop Brijmohun20-Jun-08 0:29 
QuestionWBXML encoding/decoding Pin
hitonly200818-Jun-08 20:26
hitonly200818-Jun-08 20:26 
QuestionDeserializing a xml document for sending it using a WebService Pin
beatles169215-Jun-08 19:15
beatles169215-Jun-08 19:15 
Questioncomparing two XML files Pin
salon12-Jun-08 4:53
salon12-Jun-08 4:53 
AnswerRe: comparing two XML files Pin
led mike12-Jun-08 5:11
led mike12-Jun-08 5:11 
Question[Message Deleted] Pin
angel123456789010-Jun-08 9:06
angel123456789010-Jun-08 9:06 
AnswerRe: Numbering in XSLT Pin
led mike10-Jun-08 9:43
led mike10-Jun-08 9:43 
AnswerRe: [Message Deleted] Pin
led mike11-Jun-08 4:50
led mike11-Jun-08 4:50 
QuestionCreate multiple pages Pin
Nishad S10-Jun-08 1:00
Nishad S10-Jun-08 1:00 
AnswerRe: Create multiple pages Pin
led mike10-Jun-08 5:08
led mike10-Jun-08 5:08 
GeneralRe: Create multiple pages Pin
Nishad S10-Jun-08 18:32
Nishad S10-Jun-08 18:32 
GeneralRe: Create multiple pages Pin
led mike11-Jun-08 4:51
led mike11-Jun-08 4:51 
GeneralRe: Create multiple pages Pin
Nishad S11-Jun-08 18:20
Nishad S11-Jun-08 18:20 
QuestionValidation of unknown subclass [modified] Pin
hase24078-Jun-08 22:46
hase24078-Jun-08 22:46 
QuestionXML and old ASP(not ASP.NET) Pin
LeilaBayat7-Jun-08 23:22
LeilaBayat7-Jun-08 23:22 
QuestionBest practices for programmatically creating XML storage files Pin
jesarg6-Jun-08 9:43
jesarg6-Jun-08 9:43 

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.