Foros del Web » Programando para Internet » Javascript » Frameworks JS »

Repetir ventana en JSRS

Estas en el tema de Repetir ventana en JSRS en el foro de Frameworks JS en Foros del Web. Hola, estoy usando JSRS con 3 tablas y funciona ok. Sucede que necesito incorporar una 4ta consulta, en la cual se repita exactamente la misma ...
  #1 (permalink)  
Antiguo 15/12/2005, 02:05
 
Fecha de Ingreso: noviembre-2005
Mensajes: 55
Antigüedad: 19 años
Puntos: 0
Repetir ventana en JSRS

Hola, estoy usando JSRS con 3 tablas y funciona ok.

Sucede que necesito incorporar una 4ta consulta, en la cual se repita
exactamente la misma consulta que en la 3ra.


Para indicarlo de otra forma :

1. Selección en tabla padre

2 . Selección en tabla hija

3. Selección en tabla nieta

4. Selección en tabla nieta nuevamente, esto es para que el usuario pueda seleccionar 2 opciones distintas en la última consulta.


Por favor tengan en cuenta que soy nuevo en esto y si la respuesta es muy "técnica o global " no voy a saber como implementarlo.

SI alguien dispone de tiempo le pido por favor que me indique qué archivos debo modificar y qué instrucciones tengo que
agregar o modificar para lograr esto, me alcanza con que me instruyan sobre el código original, y yo luego lo adapto.

Saludos y gracias.
  #2 (permalink)  
Antiguo 20/12/2005, 16:47
Avatar de MaBoRaK  
Fecha de Ingreso: abril-2003
Ubicación: La Paz - Bolivia
Mensajes: 2.003
Antigüedad: 21 años, 6 meses
Puntos: 35
loading...........



Y el codigo?



connection closed.
__________________

Maborak Technologies
  #3 (permalink)  
Antiguo 23/12/2005, 03:40
 
Fecha de Ingreso: noviembre-2005
Mensajes: 55
Antigüedad: 19 años
Puntos: 0
Es verdad, no indico el código, el mismo se encuentra en :


http://www.ashleyit.com/rs/jsrs/select/php/select.php


Gracias de antemano a quien pueda responderme.
  #4 (permalink)  
Antiguo 10/01/2006, 02:35
 
Fecha de Ingreso: noviembre-2005
Mensajes: 55
Antigüedad: 19 años
Puntos: 0
Uno.

Hola:

En realidad comprendo que no me hayan respondido ya que el pedido es bastante engorroso y ninguno de nosotros dispone del tiempo suficiente para hacer tantas modificaciones, he descubierto esto por la inmensa cantidad de horas que le he dedicado y si no es alguien con conocimientos avanzados es posible que le hubiese pasado lo mismo.

A pesar de ser un principiante en estos temas, he avanzado mucho y estoy muy cerca de lograrlo, pero me quedé trabado en el siguiente punto y ya no sé como resolverlo : cuando entro en " select.php " no me muestra nada en la 4ta ventana, pero si selecciono algo en las 3 primeras opciones y pulso "ENVIAR" luego en la pagina de resultados SALE COMO YO LO NECESITO !, es decir en la cuarta ventana me da la posibilidad de elegir otra opción además de la ya seleccionada en la 3er ventana, y si pulso " back " también los devuelve Ok.

Creo que es poco lo que me falta ( quizás alguna instrucción o variable ) pero ya no sé que hacer para lograrlo, por eso les pido por favor si alguien puede darme una mano con esto, sinceramente lo necesito para que funcione de esta forma.

Desde ya muy agradecido por las respuestas que me puedan enviar.

Envío los archivos divididos en 3 post porque tengo un límite de caracteres.

Son 7 en total, (respecto a los originales están modificados : select.php, select_rs.php, result.php y selectphp.js) :


************************************************** ****
************************************************** ****

1) createdb.sql:

# phpMyAdmin MySQL-Dump
#
# Host: localhost
# Database : `selectdemo`
# --------------------------------------------------------

#
# Table structure for table `makes`
#

CREATE TABLE makes (
makeID tinyint(3) unsigned NOT NULL auto_increment,
makeName varchar(20) NOT NULL default '',
PRIMARY KEY (makeID)
) TYPE=MyISAM;

#
# Dumping data for table `makes`
#

INSERT INTO makes VALUES (1,'Ford');
INSERT INTO makes VALUES (2,'Pontiac');
INSERT INTO makes VALUES (3,'Chevrolet');
INSERT INTO makes VALUES (4,'Hyundai');
INSERT INTO makes VALUES (5,'Porsche');
# --------------------------------------------------------

#
# Table structure for table `models`
#

CREATE TABLE models (
modelID tinyint(3) unsigned NOT NULL auto_increment,
modelName varchar(20) NOT NULL default '',
makeID tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (modelID)
) TYPE=MyISAM;

#
# Dumping data for table `models`
#

INSERT INTO models VALUES (1,'Escort',1);
INSERT INTO models VALUES (2,'Mustang',1);
INSERT INTO models VALUES (3,'Windstar',1);
INSERT INTO models VALUES (4,'Sunfire',2);
INSERT INTO models VALUES (5,'Firebird',2);
INSERT INTO models VALUES (6,'Montana',2);
INSERT INTO models VALUES (7,'Cavalier',3);
INSERT INTO models VALUES (8,'Camaro',3);
INSERT INTO models VALUES (9,'Venture',3);
INSERT INTO models VALUES (10,'Elantra',4);
INSERT INTO models VALUES (11,'Sonata',4);
INSERT INTO models VALUES (12,'Carrera',5);
# --------------------------------------------------------

#
# Table structure for table `options`
#

CREATE TABLE options (
optionID tinyint(3) unsigned NOT NULL auto_increment,
optionName varchar(20) NOT NULL default '',
modelID tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (optionID)
) TYPE=MyISAM;

#
# Dumping data for table `options`
#

INSERT INTO options VALUES (1,'Air Conditioning',1);
INSERT INTO options VALUES (2,'ABS Brakes',1);
INSERT INTO options VALUES (3,'Cup Holder',1);
INSERT INTO options VALUES (4,'Racing Stripes',2);
INSERT INTO options VALUES (5,'Spoiler',2);
INSERT INTO options VALUES (6,'Mag Wheels',2);
INSERT INTO options VALUES (7,'Cargo Cover',3);
INSERT INTO options VALUES (8,'Bed Seat',3);
INSERT INTO options VALUES (9,'Roof Rack',3);
INSERT INTO options VALUES (10,'CD Player',4);
INSERT INTO options VALUES (11,'Spoiler',4);
INSERT INTO options VALUES (12,'2-Tone Paint',4);
INSERT INTO options VALUES (13,'Tinted Windows',5);
INSERT INTO options VALUES (14,'Toilet Brush',6);
INSERT INTO options VALUES (15,'Socket Wrench',6);
INSERT INTO options VALUES (16,'Fan Belt',7);
INSERT INTO options VALUES (17,'Muffler',7);
INSERT INTO options VALUES (18,'V8',8);
INSERT INTO options VALUES (19,'Fuel Injection',8);
INSERT INTO options VALUES (20,'Driver Side Door',9);
INSERT INTO options VALUES (21,'Radio',10);
INSERT INTO options VALUES (22,'Seats',11);
INSERT INTO options VALUES (23,'Mirrors',11);
INSERT INTO options VALUES (24,'Whale Tail',12);

************************************************** ****
************************************************** ****

2) select.php:

<html>
<head>
<title>JSRS Select Demo</title>
<script language="javascript" src="jsrsClient.js"></script>
<script language="javascript" src="selectphp.js"></script>
<style>
body{background:#dddddd;text-align:center;}
#sel {width:100%;margin: 0px auto 0px auto;}
#show {background-color:darkgray;width:80%;height:45px;text-align:center;margin-top:15px;padding-top:10px;}
</style>
</head>
<?php
$make = isset($_POST['lstMake']) ? $_POST['lstMake'] : -99;
$model = isset($_POST['lstModel']) ? $_POST['lstModel'] : -99;
$options = isset($_POST['lstOptions']) ? $_POST['lstOptions'] : -99;
$options2 = isset($_POST['lstOptions2']) ? $_POST['lstOptions2'] : -99;
?>
<body onload="preselect('<?php echo $make;?>', '<?php echo $model;?>', '<?php echo $options;?>', '<?php echo $options2;?>', 1);" onhelp="jsrsDebugInfo();return false;">
<h2>JSRS Select Box Filling Demo - page #1</h2>
<form name="QForm" method="post" action="./result.php">
<div id="sel">
<table class="normal" width="575" BORDER="0" CELLSPACING="2" CELLPADDING="2" VALIGN="TOP">
<?php
SelectBox ("Make", "lstMake");
SelectBox ("Model", "lstModel");
SelectBox ("Options", "lstOptions");
SelectBox ("Options2", "lstOptions2");
?>
</table>
<div id="show">
<input type="submit" name="cmdSubmit" value="Submit" id="cmdSubmit" title="Show selects with preselected values" style="" /><br />
(submits to second page which preselects current values in another form like this)
</div>
</div>
</form>

<p>
Make your selections. Dependent selections will be filled with data from the server.
Change selections and dependencies will change.
</p>
<p>
<a href=>Download</a> the files for this Select Demo.
</p>
<p>
<a href=>View</a> the source for the server-side file Select_rs.PHP
</p>
<p>
<a href="">Return</a> to Brent's Remote Scripting page.
</p>
</body>
</html>
<?php

function SelectBox( $Label, $selectName ){
?>
<tr ALIGN="LEFT">
<td width="15%"><?php echo $Label ?></td>
<td align="left">
<select name="<?php echo $selectName ?>">
<option></option><option></option><option></option>
<option>--------- Not Yet Loaded ---------</option>
</select>
</td>
</tr>
<?php
}
?>

************************************************** ****
************************************************** ****

3) select_rs.php:

<?php

require("jsrsServer.php.inc");
jsrsDispatch( "makeList modelList optionsList optionsList2" );

function makeList() {
return serializeSql( "select makeID, makeName from makes order by makeName" );
}

function modelList( $makeID ){
return serializeSql("select modelID, modelName from models where makeID=" . $makeID . " order by modelName");
}

function optionsList( $modelID ){
return serializeSql("select optionID, optionName from options where modelID=" . $modelID . " order by optionName");
}

function optionsList2( $modelID ){
return serializeSql("select optionID, optionName from options where modelID=" . $modelID . " order by optionName");
}



function serializeSql( $sql ){
$link = mysql_connect("localhost", "root", "");
mysql_select_db ("selectdemo");
$result = mysql_query ($sql);
$s = '';
while ($row = mysql_fetch_row($result)) {
$s .= join( $row, '~') . "|";
}

mysql_close($link);
return $s;
}

?>

************************************************** ****
************************************************** ****
  #5 (permalink)  
Antiguo 10/01/2006, 02:38
 
Fecha de Ingreso: noviembre-2005
Mensajes: 55
Antigüedad: 19 años
Puntos: 0
Dos.

************************************************** ****
************************************************** ****

4) result.php:



<html xmlns="" xml:lang="cs" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<meta name="author" content="" />
<title>JSRS Select Demo - page #2</title>
<style type="text/css">
/* <![CDATA[ */
@import url(./style.css);
/* ]]> */
</style>
<script type="text/javascript" src="jsrsClient.js"></script>
<script type="text/javascript" src="selectphp.js"></script>
</head>
<?php
$make = isset($_POST['lstMake']) ? $_POST['lstMake'] : -99;
$model = isset($_POST['lstModel']) ? $_POST['lstModel'] : -99;
$options = isset($_POST['lstOptions']) ? $_POST['lstOptions'] : -99;
$options2 = isset($_POST['lstOptions2']) ? $_POST['lstOptions2'] : -99;
?>
<body onload="preselect('<?php echo $make;?>', '<?php echo $model;?>', '<?php echo $options;?>', '<?php echo $options2;?>', 1);">
<h2>JSRS Select Box Filling Demo - page #2</h2>
<form name="QForm" action="./select.php" method="post">
<fieldset>
<legend>Result from previous selects</legend>
<p>
<label for="lstMake">Make</label>
<select name="lstMake" id="lstMake">
<option>--------- Not Yet Loaded ---------</option>
</select>
</p>
<p>
<label for="lstModel">Model</label>
<select name="lstModel" id="lstModel">
<option>--------- Not Yet Loaded ---------</option>
</select>
</p>
<p>
<label for="lstOptions">Options</label>
<select name="lstOptions" id="lstOptions">
<option>--------- Not Yet Loaded ---------</option>
</select>
</p>
<p>
<label for="lstOptions2">Options</label>
<select name="lstOptions2" id="lstOptions2">
<option>--------- Not Yet Loaded ---------</option>
</select>
</p>

</fieldset>
<p><input type="submit" name="cmdBack" value="Back" id="cmdSubmit" /></p>
</form>
Thanks to Milfson () for the preselection code!
</body>
</html>

************************************************** ****
************************************************** ****


5) jsrsServer.php.inc:

<?php

//
// jsrsServer.php - javascript remote scripting server include
//
// see jsrsClient.js for version info
//

function jsrsDispatch($validFuncs ){
$func = jsrsBuildFunc($validFuncs);

if ($func != ""){
$retval = "";

eval("\$retval = " . $func . ";");

if (strlen($retval)>0){
jsrsReturn($retval."");
} else {
jsrsReturn("");
}
} else {
jsrsReturnError("function builds as empty string");
}
}

function jsrsReturn($payload) {
global $C;
if(isset($_POST['C'])) $C = $_POST['C'];
if(isset($_GET['C'])) $C = $_GET['C'];

Print (
"<html><head></head><body onload=\"p=document.layers?parentLayer:window.pare nt;p.jsrsLoaded('"
. $C . "');\">jsrsPayload:<br>"
. "<form name=\"jsrs_Form\"><textarea name=\"jsrs_Payload\" id=\"jsrs_Payload\">"
. jsrsEscape($payload) . "</textarea></form></body></html>");
exit();
}

function jsrsEscape($str){
// escape ampersands so special chars aren't interpreted
$tmp = ereg_replace( "&", "&amp;", $str );
// escape slashes with whacks so end tags don't interfere with return html
return ereg_replace( "\/" , "\\/",$tmp);
}

/////////////////////////////
//
// user functions


function jsrsReturnError($str){
global $C;
if(isset($_POST['C'])) $C = $_POST['C'];
if(isset($_GET['C'])) $C = $_GET['C'];


// escape quotes
$cleanStr = ereg_replace("\'","\\'",$str);

// !!!! --- Warning -- !!!
$cleanStr = "jsrsError: " . ereg_replace("\"", "\\\"", $cleanStr);
print ("<html><head></head><body "
. "onload=\"p=document.layers?parentLayer:window.par ent;p.jsrsError('" . $C . "','" . urlencode($str) . "');\">"
. $cleanStr . "</body></html>" );
exit();
}

function jsrsArrayToString( $a, $delim ){
// user function to flatten 1-dim array to string for return to client
$d = "~";
if (!isset($delim)) $d = $delim;
return implode($a,$d);
}


function jsrsBuildFunc($validFuncs) {
$F = '';
if(isset($_POST['F'])) {
$F = $_POST['F'];
$method = 'post';
}
if(isset($_GET['F'])) {
$F = $_GET['F'];
$method = 'get';
}

$func = "";


if ($F != "") {
$func = $F;


// make sure it's in the dispatch list
if (strpos(strtoupper($validFuncs),strtoupper($func)) ===false)
jsrsReturnError($func . " is not a valid function" );

$func .= "(";

switch($method){
case 'post':
foreach($_POST['P'] as $index => $value){
$func .= '"'.substr($value, 1, strlen($value)-2).'",';
}
break;
case 'get':
foreach($_GET['P'] as $index => $value){
$func .= '"'.substr($value, 1, strlen($value)-2).'",';
}
break;
}
if (substr($func,strlen($func)-1,1)==",")
$func = substr($func,0,strlen($func)-1);

$func .= ")";
}

return $func;
}

function jsrsEvalEscape($thing) {
$tmp = ereg_replace($thing,"\r\n","\n");
return $tmp;
}

function jsrsVBArrayToString($a,$delim) {
// --- not use in PHP see jsrsArrayToString method
return jsrsArrayToString($a,$delim);
}


?>

************************************************** ****
************************************************** ****
  #6 (permalink)  
Antiguo 10/01/2006, 02:43
 
Fecha de Ingreso: noviembre-2005
Mensajes: 55
Antigüedad: 19 años
Puntos: 0
Tres.

************************************************** ****
************************************************** ****

6) selectphp.js:

// constants
var noValue = '-99';
// default values
var IDMake = noValue;
var IDModel = noValue;
var IDOptions = noValue;
var IDOptions2 = noValue;

//selects disabled true/false
var boolEnabled = true;

// globals
var curOption = new Array();
var isLoaded = new Array();

function initLists(){
// initialize lists
emptyList( 'lstMake' );
emptyList( 'lstModel');
emptyList( 'lstOptions' );
emptyList( 'lstOptions2' );

jsrsExecute( 'select_rs.php', cbFillMake, 'makeList');
}

function preselect(idMake,idModel,idOptions,idOptions2,sele ctable){
boolEnabled = selectable;
IDMake = idMake;
IDModel = idModel;
IDOptions = idOptions;
IDOptions2 = idOptions2;
initLists();
}

function lstMake_onChange(){
var val = this.options[this.selectedIndex].value;
IDMake = val;
IDModel = noValue;
IDOptions = noValue;
IDOptions2 = noValue;

if(val == noValue){
selectOption( this.name, curOption[this.name] )
} else {
curOption[this.name] = val;
// init dependent lists
emptyList( 'lstModel' );
emptyList( 'lstOptions');
emptyList( 'lstOptions2');
window.status = 'Loading Model Selections...';
jsrsExecute( 'select_rs.php', cbFillModel, 'modelList', val);
}
}

function lstModel_onChange(){

var val = this.options[this.selectedIndex].value;
if(val == noValue){
selectOption( this.name, curOption[this.name] )
} else {
curOption[this.name] = val;
emptyList( 'lstOptions');
emptyList( 'lstOptions2');
window.status = 'Loading Options Selections...';
jsrsExecute( 'select_rs.php', cbFillOptions, 'optionsList', val);
}
}

function lstOptions_onChange(){

var val = this.options[this.selectedIndex].value;
if(val == noValue){
selectOption( this.name, curOption[this.name] )
} else {
curOption[this.name] = val;
emptyList( 'lstOptions2');
window.status = 'Loading Options Selections...';
jsrsExecute( 'select_rs.php', cbFillOptions2, 'optionsList2', val);
}
}



function lstOptions2_onChange(){
var val = this.options[this.selectedIndex].value;
IDOptions2 = val;
if(val == noValue){
selectOption( this.name, curOption[this.name] )
} else {
var msg = "You have selected: \n\n";
msg += this.form.lstMake.options[this.form.lstMake.selectedIndex].text + "\n";
msg += this.form.lstModel.options[this.form.lstModel.selectedIndex].text + "\n";
msg += this.form.lstOptions.options[this.form.lstOptions.selectedIndex].text + "\n";
msg += this.options[this.selectedIndex].text + "\n";
//alert (msg);

if(boolEnabled){
document.getElementById('cmdSubmit').disabled="";
document.getElementById('show').style.backgroundCo lor="#FFCC99";
}

}
}

function cbFillMake ( strMakes ){
window.status = '';
fillList( 'lstMake', strMakes );
if(IDMake != noValue){
jsrsExecute( 'select_rs.php', cbFillModel, 'modelList', ''+IDMake+'');
}
}

function cbFillModel ( strModels ){
// callback for dependent listbox
window.status = '';
fillList( 'lstModel', strModels );
if(IDModel != noValue){
jsrsExecute( 'select_rs.php', cbFillOptions, 'optionsList', ''+IDModel+'');
}
}

function cbFillOptions( strOptions ){
// callback for dependent listbox
window.status = '';
fillList( 'lstOptions', strOptions );
if(IDOptions != noValue){
jsrsExecute( 'select_rs.php', cbFillOptions2, 'optionsList2', ''+IDModel+'');
}
}


function cbFillOptions2( strOptions2 ){
// callback for dependent listbox
window.status = '';
fillList( 'lstOptions2', strOptions2 );
}

function fillList( listName, strOptions2 ){
// fill any list with options
emptyList( listName );

// always insert selection prompt
var lst = document.forms['QForm'][listName];
lst.disabled = true;
lst.options[0] = new Option('=> Please Select <=', noValue);

// options in form "value~displaytext|value~displaytext|..."
var aOptionPairs = strOptions2.split('|');
for( var i = 0; i < aOptionPairs.length; i++ ){
if (aOptionPairs[i].indexOf('~') != -1) {
var aOptions = aOptionPairs[i].split('~');
lst.options[i + 1] = new Option(aOptions[1], aOptions[0]);
}
}
switch(listName){
case 'lstMake':
ID = IDMake;
break;
case 'lstModel':
ID = IDModel;
break;
case 'lstOptions':
ID = IDOptions;
break;
case 'lstOptions2':
ID = IDOptions2;
break;
}
// init to no value
selectOption( listName, ID );
isLoaded[listName] = true;
lst.disabled = !boolEnabled;
lst.onchange = eval( listName + "_onChange" );
// eval( "document.forms['QForm']['" + listName + "'].onchange=" + listName + "_onChange;" );
}

function emptyList( listName ){
var lst = document.forms['QForm'][listName];
lst.options.length = 0;
lst.onchange = null;
lst.disabled = !boolEnabled;
isLoaded[listName] = false;
curOption[listName] = noValue;
}

function selectOption( listName, optionVal ){
// set list selection to option based on value
var lst = document.forms['QForm'][listName];
for( var i = 0; i< lst.options.length; i++ ){
if( lst.options[i].value == optionVal ){
lst.selectedIndex = i;
curOption[listName] = optionVal;
return;
}
}
}


************************************************** ****
************************************************** ****
  #7 (permalink)  
Antiguo 10/01/2006, 02:51
 
Fecha de Ingreso: noviembre-2005
Mensajes: 55
Antigüedad: 19 años
Puntos: 0
Cuatro. Perdon Por Lo Extenso !!!

7) jsrsClient.js:

var jsrsContextPoolSize = 0;
var jsrsContextMaxPool = 10;
var jsrsContextPool = new Array();
var jsrsBrowser = jsrsBrowserSniff();
var jsrsPOST = true;
var containerName;

function jsrsContextObj( contextID ){

// properties
this.id = contextID;
this.busy = true;
this.callback = null;
this.container = contextCreateContainer( contextID );

// methods
this.GET = contextGET;
this.POST = contextPOST;
this.getPayload = contextGetPayload;
this.setVisibility = contextSetVisibility;
}

function contextCreateContainer( containerName ){
var container;
switch( jsrsBrowser ) {
case 'NS':
container = new Layer(100);
container.name = containerName;
container.visibility = 'hidden';
container.clip.width = 100;
container.clip.height = 100;
break;

case 'IE':
document.body.insertAdjacentHTML( "afterBegin", '<span id="SPAN' + containerName + '"></span>' );
var span = document.all( "SPAN" + containerName );
var html = '<iframe name="' + containerName + '" src=""></iframe>';
span.innerHTML = html;
span.style.display = 'none';
container = window.frames[ containerName ];
break;

case 'MOZ':
var span = document.createElement('SPAN');
span.id = "SPAN" + containerName;
document.body.appendChild( span );
var iframe = document.createElement('IFRAME');
iframe.name = containerName;
iframe.id = containerName;
span.appendChild( iframe );
container = iframe;
break;

case 'OPR':
var span = document.createElement('SPAN');
span.id = "SPAN" + containerName;
document.body.appendChild( span );
var iframe = document.createElement('IFRAME');
iframe.name = containerName;
iframe.id = containerName;
span.appendChild( iframe );
container = iframe;
break;

case 'KONQ':
var span = document.createElement('SPAN');
span.id = "SPAN" + containerName;
document.body.appendChild( span );
var iframe = document.createElement('IFRAME');
iframe.name = containerName;
iframe.id = containerName;
span.appendChild( iframe );
container = iframe;

span.style.display = none;
iframe.style.display = none;
iframe.style.visibility = hidden;
iframe.height = 0;
iframe.width = 0;

break;
}
return container;
}

function contextPOST( rsPage, func, parms ){

var d = new Date();
var unique = d.getTime() + '' + Math.floor(1000 * Math.random());
var doc = (jsrsBrowser == "IE" ) ? this.container.document : this.container.contentDocument;
doc.open();
doc.write('<html><body>');
doc.write('<form name="jsrsForm" method="post" target="" ');
doc.write(' action="' + rsPage + '?U=' + unique + '">');
doc.write('<input type="hidden" name="C" value="' + this.id + '">');

if (func != null){
doc.write('<input type="hidden" name="F" value="' + func + '">');

if (parms != null){
if (typeof(parms) == "string"){
// single parameter
doc.write( '<input type="hidden" name="P[0]" '
+ 'value="[' + jsrsEscapeQQ(parms) + ']">');
} else {
// assume parms is array of strings
for( var i=0; i < parms.length; i++ ){
doc.write( '<input type="hidden" name="P[' + i + ']" '
+ 'value="[' + jsrsEscapeQQ(parms[i]) + ']">');
}
} // parm type
} // parms
} // func

doc.write('</form></body></html>');
doc.close();
doc.forms['jsrsForm'].submit();
}

function contextGET( rsPage, func, parms ){


var URL = rsPage;

URL += "?C=" + this.id;

if (func != null){
URL += "&F=" + escape(func);

if (parms != null){
if (typeof(parms) == "string"){
// single parameter
URL += "&P[0]=[" + escape(parms+'') + "]";
} else {
// assume parms is array of strings
for( var i=0; i < parms.length; i++ ){
URL += "&P[" + i + "]=[" + escape(parms[i]+'') + "]";
}
} // parm type
} // parms
} // func

var d = new Date();
URL += "&U=" + d.getTime();

switch( jsrsBrowser ) {
case 'NS':
this.container.src = URL;
break;
case 'IE':
this.container.document.location.replace(URL);
break;
case 'MOZ':
this.container.src = '';
this.container.src = URL;
break;
case 'OPR':
this.container.src = '';
this.container.src = URL;
break;
case 'KONQ':
this.container.src = '';
this.container.src = URL;
break;
}
}

function contextGetPayload(){
switch( jsrsBrowser ) {
case 'NS':
return this.container.document.forms['jsrs_Form'].elements['jsrs_Payload'].value;
case 'IE':
return this.container.document.forms['jsrs_Form']['jsrs_Payload'].value;
case 'MOZ':
return window.frames[this.container.name].document.forms['jsrs_Form']['jsrs_Payload'].value;
case 'OPR':
var textElement = window.frames[this.container.name].document.getElementById("jsrs_Payload");
case 'KONQ':
var textElement = window.frames[this.container.name].document.getElementById("jsrs_Payload");
return textElement.value;
}
}

function contextSetVisibility( vis ){
switch( jsrsBrowser ) {
case 'NS':
this.container.visibility = (vis)? 'show' : 'hidden';
break;
case 'IE':
document.all("SPAN" + this.id ).style.display = (vis)? '' : 'none';
break;
case 'MOZ':
document.getElementById("SPAN" + this.id).style.visibility = (vis)? '' : 'hidden';
case 'OPR':
document.getElementById("SPAN" + this.id).style.visibility = (vis)? '' : 'hidden';
this.container.width = (vis)? 250 : 0;
this.container.height = (vis)? 100 : 0;
break;
}
}

function jsrsGetContextID(){
var contextObj;
for (var i = 1; i <= jsrsContextPoolSize; i++){
contextObj = jsrsContextPool[ 'jsrs' + i ];
if ( !contextObj.busy ){
contextObj.busy = true;
return contextObj.id;
}
}

if ( jsrsContextPoolSize <= jsrsContextMaxPool ){
// create new context
var contextID = "jsrs" + (jsrsContextPoolSize + 1);
jsrsContextPool[ contextID ] = new jsrsContextObj( contextID );
jsrsContextPoolSize++;
return contextID;
} else {
alert( "jsrs Error: context pool full" );
return null;
}
}

function jsrsExecute( rspage, callback, func, parms, visibility ){

var contextObj = jsrsContextPool[ jsrsGetContextID() ];
contextObj.callback = callback;

var vis = (visibility == null)? false : visibility;
contextObj.setVisibility( vis );

if ( jsrsPOST && ((jsrsBrowser == 'IE') || (jsrsBrowser == 'MOZ'))){
contextObj.POST( rspage, func, parms );
} else {
contextObj.GET( rspage, func, parms );
}

return contextObj.id;
}

function jsrsLoaded( contextID ){
// get context object and invoke callback
var contextObj = jsrsContextPool[ contextID ];
if( contextObj.callback != null){
contextObj.callback( jsrsUnescape( contextObj.getPayload() ), contextID );
}
contextObj.callback = null;
contextObj.busy = false;
}

function jsrsError( contextID, str ){
alert( unescape(str) );
jsrsContextPool[ contextID ].busy = false
}

function jsrsEscapeQQ( thing ){
return thing.replace(/'"'/g, '\\"');
}

function jsrsUnescape( str ){
return str.replace( /\\\//g, "/" );
}

function jsrsBrowserSniff(){
if (document.layers) return "NS";
if (document.all) {
// But is it really IE?
// convert all characters to lowercase to simplify testing
var agt=navigator.userAgent.toLowerCase();
var is_opera = (agt.indexOf("opera") != -1);
var is_konq = (agt.indexOf("konqueror") != -1);
if(is_opera) {
return "OPR";
} else {
if(is_konq) {
return "KONQ";
} else {
// Really is IE
return "IE";
}
}
}
if (document.getElementById) return "MOZ";
return "OTHER";
}


function jsrsArrayFromString( s, delim ){
var d = (delim == null)? '~' : delim;
return s.split(d);
}

function jsrsDebugInfo(){
var doc = window.open().document;
doc.open;
doc.write( 'Pool Size: ' + jsrsContextPoolSize + '<br><font face="arial" size="2"><b>' );
for( var i in jsrsContextPool ){
var contextObj = jsrsContextPool[i];
doc.write( '<hr>' + contextObj.id + ' : ' + (contextObj.busy ? 'busy' : 'available') + '<br>');
doc.write( contextObj.container.document.location.pathname + '<br>');
doc.write( contextObj.container.document.location.search + '<br>');
doc.write( '<table border="1"><tr><td>' + contextObj.container.document.body.innerHTML + '</td></tr></table>' );
}
doc.write('</table>');
doc.close();
return false;
}

*****
  #8 (permalink)  
Antiguo 17/01/2006, 16:38
 
Fecha de Ingreso: noviembre-2005
Mensajes: 55
Antigüedad: 19 años
Puntos: 0
Enviar presupuesto y forma de pago.

Necesito resolver este tema, si no quieren dejar sus datos para efectuar el pago indicarlo en este post y yo le dejaré una dirección de correo para que
me lo envíen allí.

Gracias.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 14:15.