Solved

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

Posted on 2008-06-23
5
225 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
Comment Utility
hmm where do you have your js files located?
0
 

Author Comment

by:troubledFish
Comment Utility
0
 
LVL 13

Accepted Solution

by:
compfixer101 earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Figured it out, I made just changed the action path from absolute to relative.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now