•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 402,047 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,504 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 453 | Replies: 12 | Solved
![]() |
•
•
Join Date: Jul 2008
Posts: 13
Reputation:
Rep Power: 1
Solved Threads: 0
I have a javascript that looks up some details on googlemaps for me, then returns them to a php script that does the web bit I actually need doing. I actually works by filling in a form and submitting it, so that php can handle the data.
However I now need to call the script combo from another script. With a normal straight php script I could use curl to effectively run the second script, however with the combo this approach won't run the javascript.
Any ideas how I can get round this anyone?
However I now need to call the script combo from another script. With a normal straight php script I could use curl to effectively run the second script, however with the combo this approach won't run the javascript.
Any ideas how I can get round this anyone?
Dragonfly Services - Same Day Courier
•
•
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 600
Reputation:
Rep Power: 2
Solved Threads: 53
Last edited by R0bb0b : Jul 24th, 2008 at 5:09 pm.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
•
•
Join Date: Jul 2008
Posts: 13
Reputation:
Rep Power: 1
Solved Threads: 0
The javascript gets details from googlemaps, then submits the to a php script whic formats them, and stores them in a mysql database as a cache.
The lookup needs to be triggered by data entered into a html form, and the final result is displayed on another page. The final result involves several lookups of different sorts, but this is the only one that I've not managed to do without using javascript.
The lookup needs to be triggered by data entered into a html form, and the final result is displayed on another page. The final result involves several lookups of different sorts, but this is the only one that I've not managed to do without using javascript.
Dragonfly Services - Same Day Courier
•
•
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 600
Reputation:
Rep Power: 2
Solved Threads: 53
OK, javascript is client side = must be parsed by the web browser.
So this means that the possibility of php parsing the javascript and running it is out of the realm of possibility, so you need a work around.
How about this, in your php script, if the google maps data is non existent, redirect to the page with the google maps javascript, then redirect back to the php script with the data either in the url or in a session variable.
So this means that the possibility of php parsing the javascript and running it is out of the realm of possibility, so you need a work around.
How about this, in your php script, if the google maps data is non existent, redirect to the page with the google maps javascript, then redirect back to the php script with the data either in the url or in a session variable.
Last edited by R0bb0b : Jul 25th, 2008 at 12:38 am.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
•
•
Join Date: Jul 2008
Posts: 13
Reputation:
Rep Power: 1
Solved Threads: 0
I suppose I could have a "Processing" page that does the javascript and bounces back, suppose that could work.
Dragonfly Services - Same Day Courier
•
•
Join Date: Jul 2008
Posts: 13
Reputation:
Rep Power: 1
Solved Threads: 0
Think I've got that to work now. It's not pretty yet, but see what you think.
www.route-information.co.uk
www.route-information.co.uk
Dragonfly Services - Same Day Courier
•
•
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 600
Reputation:
Rep Power: 2
Solved Threads: 53
•
•
Join Date: Jul 2008
Posts: 13
Reputation:
Rep Power: 1
Solved Threads: 0
Dragonfly Services - Same Day Courier
•
•
Join Date: Jul 2008
Posts: 13
Reputation:
Rep Power: 1
Solved Threads: 0
Looking at our logs, I notice that quite a few users, look at the page then go back, probably to change some details or similar, however back doesn't work because of the intermediary page. Any ideas how to avoid the intermediary page been the default "back" location?
Dragonfly Services - Same Day Courier
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Frontpage+PHP+JavaScript, help!!! (PHP)
- Are you a PHP and Javascript junkie? It's time you met Emma. (Software Development Job Offers)
- Rss, php, javascript nightmare! help? (JavaScript / DHTML / AJAX)
- Accessing HTML checkboxes with php and javascript (PHP)
- help with php and javascript (PHP)
- PHP Form mailing troubles (PHP)
- PHP image swapping ? (PHP)
- embedding java script in php (PHP)
Other Threads in the PHP Forum
- Previous Thread: Error: not displaying messages...
- Next Thread: Automated Paypal using php


Linear Mode