Fiji Web Design
Welcome, Guest
Please Login or Register.    Lost Password?
how to execute Ajax and Javascrpt code in com_php (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: how to execute Ajax and Javascrpt code in com_php
#1101
rahul mathankar (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
how to execute Ajax and Javascrpt code in com_php 2 Years, 2 Months ago Karma: 0  
Hello to all..

I am working on automatic suggestion-textbox, for that i have ajax code.This code is working on localhost but facing problem in com_php (not showing the suggestion)means java and ajax script not executing properly.

How can i do this ?

Please help me?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1102
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:how to execute Ajax and Javascrpt code in com_php 2 Years, 2 Months ago Karma: 10  
What does the ajax code make requests to? Does it make HTTP requests to a Joomla component? Or is it a custom page created by com_php?

If you have firebug (firefox extension) you can view the HTTP requests in detail, and get a better idea of the problem. The JS console should also give you an idea of the error, it is available in native Firefox, Firebug, IE8, Chrome, Safari etc. I like the one that comes with Firebug the best, though IE8's is exceptional as well.

Cross domain issues is common also with AJAX. Even www.domain.com and domain.com are not the same domain in the browser's same domain policy.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1103
rahul mathankar (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:how to execute Ajax and Javascrpt code in com_p 2 Years, 2 Months ago Karma: 0  
hello admin.
Thanks for help.
I tried to redefined my problem here:

I have a php_com published page where i call the JS file stored in same folder.
And which is properly linked.

And then same code i working fine on server(means the auto suggest drop down will appear when i press any alphabet in textbox.)
But when i tried to run the code inside the Joomla then it causes no output.

Means why same code working fine outside the joomla but not inside the joomla.

Thanks
And waiting for you reply.

rahul
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1104
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:how to execute Ajax and Javascrpt code in com_p 2 Years, 2 Months ago Karma: 10  
You'll need to install Firebug and examine the HTTP Request. AJAX is simply a way to make a HTTP Request without reloading the page.

My guess is that the autosuggest is hardcoded to make a request to a URL that is not consistent with the Joomla URL.

In order to work with Joomla, you'll have to edit the autosuggest's javascript so that it makes requests to the correct URL.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Joomla Downloads

DownloadsDownload our free Joomla! Components, Modules and Plugins.