Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 

Go Back   XSL - XML - RSS Forums > Programming and XML > Ajax and XML

Tags:



Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 12-03-2008, 07:16 PM
dfmatt
 
Posts: n/a

Default Re: Spry XML data set and dynamic post variables

Source sent.

Thanks for the help!
Reply With Quote
Sponsored Links
  #12 (permalink)  
Old 12-04-2008, 11:16 AM
dfmatt
 
Posts: n/a

Default Re: Spry XML data set and dynamic post variables

Well I had it working when I stripped back everything and just had the dss data
set and a single onclick function, but now that I put it back together it hash
foobared again.

Here are the relevant bits of code that I've changed.

The function to change server id:
//function to run when changing the server id
function changeServer ( sid ) {

//set the url to use the current server id
dss.setURL = ( '../../cgi-bin/server_details.pl' , { method: 'POST' ,
postData: 'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1 &cid='+sid } );

//force a reload of the server data
dss.loadData();
}

The inital load of the data set
var dss = new Spry.Data.XMLDataSet ( '../../cgi-bin/server_details.pl' ,
'yams' , { method: 'POST' , postData:
'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1 &cid=0' , subPaths: [ "auth"
, "plugins" , "plugins/plugin" ] , keepSorted: "true", sortOnLoad:
"plugins/plugin/order", sortOrderOnLoad: "descending", useCache: false,
loadInterval: 10000 } );

And the part that changes the server id
<td align="left" style="cursor:default; width:174px;"
onclick="changeServer({dsv::servers/server/@id})"> {dsv::servers/server/name}</td
>


I checked that the function is receiving the correct server id and I even
tried hard coding the cid variable to 2 in the change function but it still
wasn't changing on the server side.

Any ideas?

Thanks

Reply With Quote
  #13 (permalink)  
Old 12-04-2008, 11:16 AM
dfmatt
 
Posts: n/a

Default Re: Spry XML data set and dynamic post variables

DOH!

I had put "dss.setURL = " and of course dss.setURL doesn't want an equals.

I removed that and now it's working fine!!!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Contact Us -|- XSL - XML - RSS Forums -|- Archive -|- Top -|-Rules/Disclaimer-|-Help/Support -|-Advertise
© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
All times are GMT. The time now is 01:20 PM.
Style Developed by Epic Designz