Solved

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

Posted on 2008-06-23
5
257 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Horizontal Full Calendar using php 5 40
history of pages 7 49
Need help for active menu class depending of the page 4 26
Google Chrome: Debugging AJAX call 6 37
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses how to create an extensible mechanism for linked drop downs.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to dynamically set the form action using jQuery.

737 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