Alex Tech Adventures The webs best tutorials!

Welcome, Guest
Please Login or Register.    Lost Password?

AJAX requests with Zend Framework
(0 viewing) 
Go to bottomPage: 12345
TOPIC: AJAX requests with Zend Framework
#285
Re:AJAX requests with Zend Framework 2 Years, 1 Month ago Karma: 16
I think you are referring to javascript file? that would be under public in frontend.js

To be able to create ajax request you have to know JavaScript language. Look at some JavaScript and AJAX tutorials to see how its done.
alexanderrv
Administrator
Posts: 279
graph
User Offline Click here to see the profile of this user
Gender: Male tmthv2 alexchatonly@hotmail.com Location: Freeport, Bahamas Birthdate: 1989-04-14
The administrator has disabled public write access.
 
#288
Re:AJAX requests with Zend Framework 2 Years, 1 Month ago Karma: 0
Hello Alex.

First of all thx for ur great tutorials. they are awsome and really helpfull.

I came across an error I can't figure out by myself on the 'AJAX requests with Zend Framework'.
Everything is fine considering the visual aspect, but when i clivk the 'test' link for the ajax call, most of the data's are set to null.
To be precised out of three books every value except 1 author is set to null and printed as null on the web page (that's 5 values out of 6!!!).
I do not have the error when i navigate using the pagination controls; just for the ajax call

Do you have any idea, what have i done wrong?
Any help would be appreciated.

Cheers
Seb
stkfdt
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#289
Re:AJAX requests with Zend Framework 2 Years, 1 Month ago Karma: 0
Forgot to add - i build my source on following all the tutorials.
But i also tried downloading directly the source and not changing anything, and i had the exact same issue.

If u have any clue on where that might come from, i'll be glad u share it.

thx in advance
Seb
stkfdt
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#342
Re:AJAX requests with Zend Framework 2 Years ago Karma: 0
Hey Alex,

First off.. I want to thank you a thousand times for your tutorials.. You have no idea how lost I would have been without them. You've really done a service for me and I am great full!

I was wondering if you could give me a hand though.. I'm updating a site where I've implemented you're AJAX paginator example to paginate through some news articles that I've got stored in a DB. Problem is, a lot of the articles are in very poor HTML (looks like whomever wrote the articles that I migrated from the previous site was using something like TinyMCE or the like) and so it looks like the JSON context switch isn't liking the data because it's outputting null values for some of the values. So I figured I'd try using XML instead of JSON since that way I can wrap the info in a CDATA wrapper and tranfer it that way. Problem is, when I set the contextSwitch format to xml, it appends ".xml.phtml' to the end of the request. Is there anyway that you know of to get your AJAX paginator example to work with XML?

Thanks a lot in advance
RavenHursT
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#354
Re:AJAX requests with Zend Framework 2 Years ago Karma: 16
@RavenHurstT
Indeed, thats how xml contextSwitcher works. You have to create a view file same way you would as if it was a regular html output, just with .xml.phtml extension. So I would call it list.xml.phtml as per my existing examples.
Move all the logic of creating the variables from controller into that xml.phtml file. Again, thats identical to how you would create any old HTML view file just make the final output from there look like xml this time.

Hope this helps.

@stkfdt
sorry I am yet to look over my code to answer your question
alexanderrv
Administrator
Posts: 279
graph
User Offline Click here to see the profile of this user
Gender: Male tmthv2 alexchatonly@hotmail.com Location: Freeport, Bahamas Birthdate: 1989-04-14
The administrator has disabled public write access.
 
#361
Re:AJAX requests with Zend Framework 2 Years ago Karma: 0
Thanks Alex.. so you have to actually build the xml yourself? It doesn't just build the xml based on the view's stored variables like the json context switcher does?
RavenHursT
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12345
Moderators: alexanderrv
You are here: Home Forum

Statistics

Members : 1401
Content : 42
Web Links : 1
Content View Hits : 191193

Poll

Interested in TinyBrowser and TinyMce plugin for ZF?
 

Who's Online

We have 37 guests online