Data strategy PHP Spry
I'm still pretty new to XML and Spry
But have built a fair few Dynamic PHP/MYSQL websites. HTML
content from database etc. Typically I would have a website defined
by its sections and articles keyed to those sections (in the DB)
Q: Do I still pull a 'sections' worth of data each time I go
to a particular 'section' on the site ie. (recordset to XML in the
document - each time the document refreshes) still use the
recordset mentality and rejoyce in the fact I don't have to do a
page refresh everytime a dynamic region gets updated and leave it
at that??
OR am I missing some other option
tia
Paul
Better late than never I guess... I'm no great shakes at this stuff but I found the following is what worked for me http://foundationphp.com/tutorials/spry_url_utils.php bit messy URL but it does work. I'd be interested to hear if anyone has a better solution.
Similar Messages
-
How to store spry data in php array
I am trying to store spry data in php array like this:
<? $foo= array();?>
<div spry:region="dsCALC">
<div spry:repeat="dsCALC">
<?php
$foo[]='{dsCALC::DataPrice}';
?>
</div>
</div>
<?var_dump($foo);?>
Outputs:
Array ( [0] => {dsCALC::DataPrice} )
If I tried a variable, it works ok... The array, not... Any ideas?Outputs:
Array ( [0] => {dsCALC::DataPrice} )
And so it should, because that is what you told the PHP-script to do in the following line of code.
$foo[]='{dsCALC::DataPrice}';
Please remember that PHP code is handled on the server, whereas JavaScript (Spry) is handeld on the client (browser) end. JavaScript cannot be handeld by PHP nor can JavaScript handel PHP.
My question to you is, why do you want to store the data in a PHP-array and how is the Spry data obtained?
Ben -
Date Format for Spry data set sort
Hi
Just feeling my way through the use of Spry Datasets for the
first time and have a couple of issues hopefully someone with more
knowledge of it than me know the answer to.
I had an issue with my Spry Dataset initially that it would
not work in ie7 but was OK in FF3.
After some mucking round I realised the error I was getting -
albeit obscure in IE was telling me it was a date format issue in
my data set.
The db data I am playing with here is fairly simple: I have a
couple of text fields, an integer field that contains the
unixtimestamp of the entry (its a simple diary application) and a
formal date field that holds the same date in mysql's date format.
When I display the date in the dataset I do so in the format
"23rd May 2009" (as an example)- I code this using phps date
function in my xml query.
I had set this field to date format in the Spry dataset
conditions but IE seems to barf on this- I can change it to
textstring but then my sort is done on Alpha/Numeric sort of the
first character in the date field which is rubbish.
I only display the date in this format and one of the other
text fields in my dataset- the unixdate is for programmatic
purposes not general display so I cannot sort on this field if its
invisible. How can I acheive a date based sort with this set up- or
what date formats does Spry code prefer for date sorts? (My client
wants the date to show as I have explained). Many thanks. I have a
second query which I will post separately!
Kenny"Tanushiheadbash" <[email protected]> wrote
in message
news:gqa70o$iat$[email protected]..
> I think I follow what you are saying and in fact I think
its what I
> already
> have. I have set the sort order to use the unixtime when
the page
> initially
> loads and thats OK.
I am sorry, but you aren't following my explanation. English
isn't my mother
tongue, and I am not able to explain it any better.
> However what I need to be able to do is to have the
AJAX/Javascript sort
> (done in this case with Spry- ) to sort on the date when
the column header
> is
> clicked. The problem I have is the date format in this
visible column is
> in
> DDth Month YYYY format and Spry does not recocnise this
as a date format-
> it
> wants it as a string ( or ie gives an error). Maybe its
not possible what
> I am
> trying to do- just thought there might be a clever way
to implement this.
You can take a look at this page:
http://visual.unipv.it/tmt_calendar/admin/reports/events.cfm
Even if all the dates here are incidentally using the
yyyy-mm-dd format, the
dataset display the date from the "start_date_formatted"
field:
<td><a href="javascript:"
onclick="showUpdate('{event_id}')">{start_date_formatted}</a></td>
But uses another field to sort the table:
<th scope="col" spry:sort="start_date">Start
date</th>
You can have the same date, using two different formats,
inside two,
separated dataset fields. One is used for display, the other
one is used for
sort.
You may try to read again my previous explanations, look at
the code in the
page above and see if you get the idea.
Massimo Foti, web-programmer for hire
Tools for ColdFusion, JavaScript and Dreamweaver:
http://www.massimocorner.com -
Exporting Text data from PHP to Oracle CLOB data (Carriage return - issue)
This is my original text content in PHP - Data type - Longtext
SECTION - 1
This a test description.This a test description.
This a test description.This a test description.
This a test description. This a test description.I exported the above content from PHP as a SQL script file (insert into.. ) - export.sql [ insert into table_name (id, text_content) values (1, '') ]
while exporting data from PHP table into export file.. it replaced the "Carriage return" with "\r\n\r\n" in the insert statement for text_content column
When I run this INSERT statement in Oracle (for longtext, I have created a CLOB column in Oracle), the following text_content data is inserted into CLOB column in Oracle.
SECTION - 2
This a test description.This a test description.\r\n\r\nThis a test description.This a
test description.\r\n\r\nThis a test description.This a test description.Now I have created a item named P1_TEXT_CONTENT of type TEXTAREA and try to fetch the CLOB data into this page item.
BUT textarea displays the entire content including "\r\n\r\n" as mentioned in SECTION - 2
I want to display the content in textarea (item - P1_TEXT_CONTENT) without "\r\n\r\n" same as the original content with "Carriage return" as mentioned in SECTION - 1
What are the options we have?
Thanks,
DeepakDeepakJ wrote:
I want to display the content in textarea (item - P1_TEXT_CONTENT) without "\r\n\r\n" same as the original content with "Carriage return" as mentioned in SECTION - 1
What are the options we have?Run an update on the Oracle table following the inserts to replace the escaped CR/LFs with real ones:
update foo
set clob_column = replace(clob_column, '\r\n', chr(13) || chr(10));You might want to experiment to see which characters are actually necessary. As an OS X/Linux user I'd probably just use a single LF chr(10). -
How to get data from php to java via xmlrpc
I have been trying to get data from php through apache xmlrpc to java.
I do get an value as result. The result is "Array". How how do i convert the XMLRPC Object "Array" to Java Object?
Inside the XMLRPC "Array" Object there is object too of type Array from php.
See code for java here
Object result = client.execute( "blogger.getCategories", params1 );
Code from php here
function getCategories($appkey, $username, $password)
global $xmlrpcerruser, $xmlrpcI4, $xmlrpcInt, $xmlrpcBoolean, $xmlrpcDouble, $xmlrpcString, $xmlrpcDateTime, $xmlrpcBase64, $xmlrpcArray, $xmlrpcStruct, $xmlrpcValue;
$structArray = array();
$structArray[] = new xmlrpcval(array("one" => "test"));
return new xmlrpcresp(new xmlrpcval( $structArray , $xmlrpcArray));
I do get Standard String and Integer from php to Java through XMLRPC.
Can someone help me.
Edited by: Electron32 on Aug 13, 2010 9:44 AMThat is what is so strange. I return an 'array' through xmlrpcval() and in Java I tried to cast it to ArrayList, Vector,String[] but get an error
Object[] result = (Object[]) client.execute( "blogger.getCategories", params1 );
String[] array = (String[]) result;
Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
at com.dirdalit.window.Main.main(Main.java:41)
Edited by: Electron32 on Aug 13, 2010 12:25 PM -
Working with large data and PHP
Using a backend MySQL database, I'd like to interact with
this data using PHP. I got information from one link:
http://www.sephiroth.it/tutorials/flashPHP/pageable_recordset/
Which is exactly what I need. Page the Mysql server every
time you need to grab data and also have a listener that will
automatically update the client. However I can't seem to get it
work. Does anyone know how to make this happen using a repeater and
a panel?Read Developper's Guide at
http://www.adobe.com/support/documentation/en/flex/.
You'll find everything there ! -
DB Polling Issue (last read date strategy)
I am using a DB polling adapter, using the Last read date strategy.
I have an issue when error is occured.. Here is the scenario..
Polling table name: bpel_poll
polling fields: table_name and last_read_date..
insert into bpel_poll values( 'TEST_TABLE', 4/21/08 10 AM )
Now the bpel picked up 100 records at 10:30 AM (after 30 mins). all the BPEL instances are errored out because of some issue in some activity.
At the end When the 100 instances errors out, the polling table is updated with the current date ie 4/21/08 10:30 AM.
There is no way to reprocess the 100 records that are failed becoz the last read date is changed and will never pickup previous 100 records.
I don't know if this is bug or expected behavior. I would assume the BPEL will keep the last read date as 10 AM instead of 10:30 AM as all instances failed..
Is there any way to achieve this? if not How can we reprocess the failed records?
please help..I believe the point of the DBPolling is that once a record is successfully read then depending on the strategy that has been implements either a sequence or value in a table will be updated with a specfied value. Hence logically delete it so it is not picked up by another run of the process.
I.e if you ran the process and it took a long time before the DB was polled again then it would potentially re-process the same records twice.
Not sure if I fully understand the problem. When I have used a Polling strategy I tend to ensure I use a BPEL_STATE column to allow me to re-process records that have errored. -
Hi All
Can anyone please give me some idea on Asset data strategy for utility industry ?
Thanks in advance.
Regards,
VineetDear,
Not sure...
Pls. Check: http://www.sap.com/solutions/sam/index.epx
http://www.sap.com/solutions/sam/featuresfunctions/itsam.epx
http://download.sap.com/download.epd?context=5B42DE357D063E4A4859F40EE02AA3F2E312311F12F00E18086267585C811C71A59A1C5692F3727B5E0E37F72CD475F1D7682C4A1D261804
Also check the fact sheets available at US environmental Protection agency and many with web search.
Regards,
Syed Hussain. -
Need Help importing data using PHP to convert it into a single HTML line
Hi, My names Chance
I'm a 2nd year web design student and have been assigned a project by my teacher for a charity website
i found a tutorial of exactly what i need to do but im stuck on creating a script to import and convert php data
to a single html line
heres the link to the the script, if you scroll down to the bottom
where it says
RSS or XML Data Source
"The scrolling text can be imported from any source: RSS, XML or any other format.
For example, if you want to import data using PHP to convert it into a single HTML line to be displayed by the ticker, create a php script to import and convert the data, and include it directly in the DIV tag as follow"
this is what i need help doing
http://www.mioplanet.com/rsc/newsticker_javascript.htm
i already have the php code that i want to import
i just need to know how to import and convert my php script so im able
to make the the javascript from the link i provided to work
thank you so much for your time
if you have any question or answer please email me
[email protected]
thanks again hope to here from you soonHi
The instructions are there on the page you provided a link to!
What is it you do not understand?
PZ
www.pziecina.com -
Advanced data selection in Spry datasets
There seems to have a bug in the final release of DW CS4 that
wasn't there in the Beta version: when we create an html Spry
dataset and we check the "Advanced data selection" option, DW
automatically adds a row with column0, column1, and so on. This row
doesn't do anything good, and if we click next, checking or
unchecking the "Use first row as header" option doesn't change
anything...
In fact, if we don't check the "Advanced data selection" in
the first step, checking or unchecking the "Use first row as
header" on the second step toggles the column0... behavior... So,
it's like if there was a bug that if we use advanced, it always
acts as if the "Use first row as header" was always unchecked...
adding an unessesary row to our data...
For now, the only way I could go around that, was to not use
the "Advanced data selection", and in the last step, clicking Set
Up... and removing the columns that I don't want...Loveanie wrote:
> There seems to have a bug in the final release of DW CS4
that wasn't there in
> the Beta version: when we create an html Spry dataset
and we check the
> "Advanced data selection" option, DW automatically adds
a row with column0,
> column1, and so on. This row doesn't do anything good
It identifies the column. In Step 2, you can select each
column and
change its name in the Column Name field at the top of the
wizard.
Without a column name, the Spry data set has no way of
identifying the
data you want to display.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
How to get system time and date with PHP
Dear Mr.Craig,
Thanx a lot. We are running SRM 5.0 (RAMP - Implementation).
My initial requirement is to write a server-side script to display server date and time. Could you give more inside on how to achieve it?
Regards,
Deva.Perhaps that will help.
[code]
<html>
<h1>Access System time and date</h1>
<?
// saprfc-class-library
require_once("saprfc.php");
$sap = new saprfc(array(
"logindata"=>array(
"ASHOST"=>"localhost" // application server
,"SYSNR"=>"00" // system number
,"CLIENT"=>"000" // client
,"USER"=>"bcuser" // user
,"PASSWD"=>"minisap" // password
,"show_errors"=>false // let class printout errors
,"debug"=>false)) ; // detailed debugging information
$result=$sap->callFunction("MSS_GET_SY_DATE_TIME",
array( array("EXPORT","SAPTIME",array()),
array("EXPORT","SAPDATE",array())));
if ($sap->getStatus() == SAPRFC_OK) {
echo "Time: ".$result["SAPTIME"];
echo "<br>Date: ".$result["SAPDATE"];
echo "<br>or<br>";
echo "Server is showing: "
.substr($result["SAPDATE"], 0, 4)
."-".substr($result["SAPDATE"], 4, 2)
."-".substr($result["SAPDATE"], 6, 2)
." and "
.substr($result["SAPTIME"], 0, 2)
.":".substr($result["SAPTIME"], 2, 2)
.":".substr($result["SAPTIME"], 4, 2);
} else {
$sap->printStatus();
$sap->logoff();
?>
[/code] -
Flash Builder 4, Data Services, PHP issue
I have installed a fresh Galileo + Fb4 plugin + WST for eclipse on my dev server/workstation.
I have installed a standalone Fb4 on my laptop.
When I use the shwanky new Data services feature and create a PHP service... I can create the service fine... but there are no methods showing up for the data service/class. The class shows up in the Data/Services list -- and when I right-click -> Refresh (other options are greyed out) I get the following alert Error message:
java.lang.IllegalArgumentException: protocol = http host = null
I click OK and procede in my ignorance to scour the internet for a solution...
I feel like a teenager who was given a brand new Corvette (Fb4)... only.... the key doesn't seem to fit the ignition. I CANT WAIT to drive it!
On a side note.... my laptop works fine? Go figure. I can right click and get all the goodies (Configure Return Type, etc.) that I'm suppose to get on that installation...
I would like to get this working on my dev workstation. Is it something to do with Fb4 as a plugin on top of Zend PDT?
Does anyone know where to look (maybe a config file or setting) that sets the value for this:
java.lang.IllegalArgumentException: protocol = http host = null
I know that I had to edit my shortcut and add: -vm "C:\Program Files\Java\jre6\bin\javaw" to get the java vm to work correctly and launch GallileoI don't know where else to post this question ...so apologies if this is not the proper spot
I have created several classes in Flash 4 Professional and would like to know how do I create custom classes in Flash Builder 4
this is one such class that i have created and wnat to use in FB 4..below
package classes.choppingblock.video{
import flash.events.*;
import flash.display.*;
import classes.*;
public class YouTubeLoaderPlus extends YouTubeLoader {
public static var PLAYER_READY:String = "playerReady";
public static var VIDEO_READY:String = "videoReady";
protected var _count:Number = 0;
function YouTubeLoaderPlus() {
super();
this.addEventListener(Event.ENTER_FRAME, checkPlayerReady);
this.addEventListener(YouTubeLoaderPlus.PLAYER_READY, ytPlayerReady);
this.addEventListener(YouTubeLoaderPlus.VIDEO_READY, ytVideoReady);
private function ytPlayerReady(e:Event) {
this.setSize(450, 370);
private function ytVideoReady(e:Event) {
this.pause();
private function checkPlayerReady(e:Event) {
_count++;
if(_count >= 50){
this.removeEventListener(Event.ENTER_FRAME, checkPlayerReady);
dispatchEvent(new Event(YouTubeLoaderPlus.PLAYER_READY));
private function checkVideoReady(e:Event) {
if(this.getDuration()){
this.removeEventListener(Event.ENTER_FRAME, checkVideoReady);
dispatchEvent(new Event(YouTubeLoaderPlus.VIDEO_READY));
override public function loadVideoById (id:String, startSeconds:Number = 0):void{
super.loadVideoById(id, startSeconds);
this.addEventListener(Event.ENTER_FRAME, checkVideoReady);
Where would i develop an analogy of this code in Flash Builder 4 for custom classes? -
Whats the best practice to simply manage data using php sql?
Hi
I'm trying to follow some tutorials but there is too much old material and I'm getting confused.
This is basic. I have a db and I want to movement data from flex.
So, this is how I'm trying to do so. As a newbie, I will try to be clear.
I have created a simple table called "teste" using myphpadmin with only 2 fields for testing. (id, name).
I have created the services automaticly using flex to generate a php code.
This code is a simple exercise with buttons to add, update, and delete a Item.
Although there is a lot of auto-generated code, I had a lot of work (due to my ignorance) to make it work.
It fairly works, but I know veteran users would make it better, smarter, shorter, and ALL I WANT is a better (and simple) example to follow
Please.
Thanks in advance
ps. I have set my table field "name" to the 'utf8_unicode_ci' while creating it and I it seems the adobe's generated php can't handle latin chars.
THE CODE AS FOLLOWS:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600"
xmlns:valueObjects="valueObjects.*"
xmlns:testeservice="services.testeservice.*"
creationComplete="application1_creationCompleteHandler()" >
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.events.FlexEvent;
import mx.events.ListEvent;
import spark.events.IndexChangeEvent;
import spark.events.TextOperationEvent;
//selected item
public var selId:int;
//------GET ITEM (init)------------------------------------------------------
protected function application1_creationCompleteHandler():void
tx_edit.addEventListener(KeyboardEvent.KEY_UP,parallelEdit)
getAllTesteResult.token = testeService.getAllTeste();
//------SELECTED ITEM ID------------------------------------------------------
protected function list_changeHandler(event:IndexChangeEvent):void
selId = event.currentTarget.selectedItem.id;
lb_selectedId.text = "sel id: "+ selId;
if(tb_edit.selected) tx_edit.text = event.currentTarget.selectedItem.name;
//------ADD ITEM-----------------------------------------------------
protected function button_clickHandler(event:MouseEvent):void
var teste2:Teste = new Teste();
teste2.name = nameTextInput.text;
createTesteResult.token = testeService.createTeste(teste2);
application1_creationCompleteHandler();
//------UPDATE ITEM (in parallel)-----------------------------------------------------
private function parallelEdit(e:KeyboardEvent):void
if(!isNaN(selId) && selId > 0){
if(tb_edit.selected){
//uptadating
teste2.id = selId;
teste2.name = tx_edit.text;
updateTesteResult.token = testeService.updateTeste(teste2);
//------UPDATE ITEM (button click)-----------------------------------------------------
protected function button3_clickHandler(event:MouseEvent):void
teste2.id = parseInt(idTextInput2.text);
teste2.name = nameTextInput2.text;
updateTesteResult.token = testeService.updateTeste(teste2);
//------DELETE ITEM------------------------------------------------------
protected function button2_clickHandler(event:MouseEvent):void
if(!isNaN(selId) && selId > 0) deleteTesteResult.token = testeService.deleteTeste(selId);
]]>
</fx:Script>
<fx:Declarations>
<!-- this part was mostly auto generated -->
<valueObjects:Teste id="teste"/>
<testeservice:TesteService id="testeService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
<s:CallResponder id="createTesteResult"/>
<s:CallResponder id="getAllTesteResult"/>
<s:CallResponder id="deleteTesteResult"/>
<s:CallResponder id="updateTesteResult"/>
<valueObjects:Teste id="teste2"/>
</fx:Declarations>
<!-- this are just visual objects. Renamed only necessary for this example
most lines were auto-generated-->
<!--Create form -->
<mx:Form defaultButton="{button}">
<mx:FormItem label="Name">
<s:TextInput id="nameTextInput" text="{teste.name}"/>
</mx:FormItem>
<s:Button label="CreateTeste" id="button" click="button_clickHandler(event)"/>
</mx:Form>
<!--Create Result -->
<mx:Form x="10" y="117">
<mx:FormItem label="CreateTeste">
<s:TextInput id="createTesteTextInput" text="{createTesteResult.lastResult as int}" />
</mx:FormItem>
</mx:Form>
<!--List -->
<s:List x="10" y="179" id="list" labelField="name" change="list_changeHandler(event)">
<s:AsyncListView id="anta" list="{getAllTesteResult.lastResult}" />
</s:List>
<!--Update in parallel -->
<s:Label x="147" y="179" id="lb_selectedId"/>
<s:Button x="147" y="222" label="Remove" id="button2" click="button2_clickHandler(event)"/>
<s:TextInput x="225" y="257" id="tx_edit"/>
<s:ToggleButton x="147" y="257" label="Edit" id="tb_edit" />
<!--Update with button click -->
<mx:Form defaultButton="{button3}" x="220" y="0">
<mx:FormItem label="Id">
<s:TextInput id="idTextInput2" text="{teste2.id}"/>
</mx:FormItem>
<mx:FormItem label="Name">
<s:TextInput id="nameTextInput2" text="{teste2.name}"/>
</mx:FormItem>
<s:Button label="UpdateTeste" id="button3" click="button3_clickHandler(event)"/>
</mx:Form>
</s:Application>Sorry - I had to read up on what a base table block was.
I think I am. In this particular form I have one block - a customer block which has its items pulled in from the customer table, no problems there, it works fine.
My problem is I need to make it as user friendly as possible, if the user inputs the wrong customer ID (or does not know their name) I want them to be able to scroll through the customer list using an up or down button.
When do you have the commit_form statement run, (the OK button) after every change or after a block of changes ? Commit writes the changes to the database giving other users access to that data right ?! How often should it be used ? -
XML Data Set with Spry Slides - Please Help
Hi, I'm trying to combine XML Data Set with sliding tabs.
I've created two keys responsible for sliding the tabs:
<a id="previous" href="#"
onclick="sp1.showPreviousPanel();">Previous</a>
<a id="next" href="#"
onclick="sp1.showNextPanel();">Next</a>
Then XML Data Set is used to populate the tabs, but only a
single tab remains visible, and a "Next/Previous" buttons are used
to move to the next tab. And this is where the problem arises.
The problem is that, every time I refreash the gallery or
load it for the first time, I have to press TWICE the "Next" button
to move to the next image. After that, its all fine, and slides
well. It's only the FIRST time when loaded.
Please help.
Here's the full code:
<div id="images_gal" >
///////////////////////////////////////// The menu - the
culprit///////////////////////////////////////////
<div id="menu_next">
<a id="previous" href="#"
onclick="sp1.showPreviousPanel();">Previous</a>
<a id="next" href="#"
onclick="sp1.showNextPanel();">Next</a>
</div>
//////////////////////////////////////// The Sliding Panels
Gallery ////////////////////////////////////////////////////
<div id="example2" class="SlidingPanels" tabindex="0" >
<div class="SlidingPanelsContentGroup"
spry:region="dsSpecials">
<div spry:repeat="dsSpecials" id="{first}"
class="SlidingPanelsContent{second}"><div class="top_gal"
></div><div class="main_gal"><img
src="images/Galery/{third}" alt="Digital_Signage" width="600"
height="304" />
<p class="screen_gal"><a href="#"
onclick="MM_openBrWindow('film1.html','Coloris','width=340,height=260,
top=250, left=250')">CLICK TO VIEW</a></p>
</div><div
class="bottom_gal"></div></div>
</div>
</div>Anyone has any idea why I need a DOUBLE Click to start moving
the sliding panels?
I've just completed two tutorials by Don Booth.
1/Building a Spry Sliding Panels widget
2/Building a photo album with the Spry framework
But what I try to COMBINE them - display the photos in
sliding panels, I also need to DOUBLE click the "next" buton before
it starts scrolling.
Why is that Double Click needed? Help Please.
Here's my code for the combined version:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
a {
position:relative;
left:23px;
top:127px;
z-index:10000;
color: #FF0000;
</style>
<script type="text/javascript"
src="photo_album_samples/includes/xpath.js"></script>
<script type="text/javascript"
src="photo_album_samples/includes/sprydata.js"></script>
<script type="text/javascript"
src="Spry/SprySlidingPanels.js"></script>
<link type="text/css" rel="stylesheet"
href="Spry/SprySlidingPanels.css">
</head>
<body>
<div >
<a href="#" onclick="sp1.showPreviousPanel();">Previous
Panel</a>
<a href="#" onclick="sp1.showNextPanel();" >Next
Panel</a>
</div>
<div id="panelwidget" class="SlidingPanels" >
<div class="SlidingPanelsContentGroup"
spry:region="dsGallery" >
<div spry:repeat="dsGallery" class="SlidingPanelsContent"
id="p1"><img
src="photo_album_samples/thumbnails/{@thumbpath}"/></div>
</div>
</div>
<script type="text/javascript">
var dsGallery = new
Spry.Data.XMLDataSet("photo_album_samples/photos.xml",
"gallery/photos/photo");
</script>
<script type="text/javascript">
var sp1 = new Spry.Widget.SlidingPanels("panelwidget");
</script>
</body>
</html> -
Build a table based on XML data set with Spry
Hi there,
I'm new to spry technology therefore forgive any basic question of mine.
I'm trying to fill content in a table based on XML data set values but nothing is shown :-(
here is my code.... any suggestion? pls tell me where I'm wrong.
Thank you in advance
<script src="SpryAssets/xpath.js" type="text/javascript"></script>
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script type="text/javascript">
var uscite = new Spry.Data.XMLDataSet("data/Calendario 2011.xml", "csv_data_records/record", {sortOnLoad: "Date", sortOrderOnLoad: "ascending"});
uscite.setColumnType("Date", "date");
uscite.setColumnType("km", "number");
</script>
<div class="RankContainer" id="UsciteDiv" spry:region="uscite" >
<table width="100%" border="0" class="RankTable">
<tr>
<th width="10%" scope="col" spry:sort="Date">Data</th>
<th width="20%" scope="col">Destinazione</th>
<th width="5%" scope="col">KM</th>
<th width="35%" scope="col">Percorso</th>
<th width="30%" scope="col">Breve</th>
<!-- <th width="15%" scope="col">Mappa</th>-->
</tr>
<tr>
<script type="text/javascript">
var rows = uscite.getData();
for (var i = 0; i < rows.length; i++)
if (rows[i]["Mappa"].startsWith("/"))
rowContent = "<td> si </td>";
else
rowContent = "<td> no </td>";
document.write("<td>{Date}</td>");
document.write("<td>"+rowContent+"</td>");
document.write("<td>{km}</td>");
document.write("<td>{Percorso}</td>");
document.write("<td>{Breve}</td>");
</script>
</tr>
</table>
</div>Sure this is how it should work (except that no anchor tag shall be present for Destinazione whereas Mappa has no real value in)
http://www.gsc-borsano.it/_Calendario%202011.html
and this is the non working page
http://www.gsc-borsano.it/_v2Calendario%202011.html
Thanks
Maybe you are looking for
-
Summary report from summary page
I have a report for empolyees consist of 50 pages and every page has some data about emplolyee like attend days, basic salary ans etc the the footer of each page has a summary of page like total days of attend empolyee I need to reprint all footer of
-
Moving home - how can I leave my phone number with...
Hi all, I've searched but not found an answer to this one. I want to: 1) Move my phone line to a new property 2) Set up a new account for the current property (for someone still living there) 3) Move my current phone number, to the new account, on t
-
Unable to Open spreadsheets exported from SAP in Smartphones like Iphone
Hi, My program sends an email with excel attachment. I am able to open and view the attachments in the mail in Laptops/desktops. But unable to open the excel attachments in Smartphones like iphone etc. Can any one help me out with a solution? Satish
-
I've uninstalled and reinstalled mozilla several times. I've read online about looking for a profile.ini file, that file does not exist on my computer. Everytime I open firefox, the choose user profile box appears, and when I click create profile, a
-
Va01 , vbap-taxm1 field not should not be blank when save sale order
Hello all, I am working on sale order.I want if VA01,VA02,VBAP-TAXM1 fields kept blank while saving the sale order it should display a MESSAGE.can anyone please help me with this. Thank in advance.