Solved

On form submit, I get prompted to download the PHP file

Posted on 2008-06-23
5
250 Views
Last Modified: 2008-06-23
I tried to do this tutorial: http://www.phpriot.com/articles/complete-prototype-example and whenever I submit the page, I get prompted to download the php file that's triggered for the submit action. PHP is properly installed, the database is receiving the data.
0
Comment
Question by:troubledFish
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:compfixer101
ID: 21851863
hmm where do you have your js files located?
0
 

Author Comment

by:troubledFish
ID: 21851944
0
 
LVL 13

Accepted Solution

by:
compfixer101 earned 500 total points
ID: 21851952
change this on the index.html page

<script type="text/javascript" src="/js/prototype.js"></script>
<script type="text/javascript" src="/js/Application.js"></script>
<script type="text/javascript" src="/js/AddressBook/Creator.js"></script>
<script type="text/javascript" src="/js/AddressBook/Contacts.js"></script>
 
*****************CHANGE TO******************
<script type="text/javascript" src="/js/prototype.js"></script>
<script type="text/javascript" src="/js/Application.js"></script>
<script type="text/javascript" src="/js/Creator.js"></script>
<script type="text/javascript" src="/js/Contacts.js"></script>

Open in new window

0
 

Author Comment

by:troubledFish
ID: 21852019
hm I didn't notice my paths were wrong, thank you. but that didn't solve the issue. I even went so far as to place the files so they are in there proper locations, still didn't work. Here's whats odd:

If I have the path src="/js/<file>" I can submit properly and the database gets updated correctly. If I remove the slash src="js/<file>"  then I can see the existing database entries, but the form will no longer update the database.

0
 

Author Comment

by:troubledFish
ID: 21852035
Figured it out, I made just changed the action path from absolute to relative.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question