942,523 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 677
  • PHP RSS
Jul 15th, 2010
0

Call PHP script without changing the Page's current HTML

Expand Post »
Here is the problem. I have an HTML page that includes some javascripts. These scripts modify the HTML contents. Some PHP scripts are already in the same file. I want to pass some variables from Javascript to PHP script. If I use get or post, all changes made by javascript are removed and I only have the original HTML elements and whatever that PHP script does.

I want to keep the page as it is now (with javascript modifications), and in the same time use the PHP script to update a MySQL database. How can I do this?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
start_game316 is offline Offline
2 posts
since Apr 2007
Jul 15th, 2010
0
Re: Call PHP script without changing the Page's current HTML
You should be able to use jQuery to achieve this. You can find more information on jQuery here: http://jquery.com/
Reputation Points: 17
Solved Threads: 42
Junior Poster
Wraithmanilian is offline Offline
195 posts
since Dec 2009
Jul 16th, 2010
0
Re: Call PHP script without changing the Page's current HTML
Call a php file with query string from your javascript.

PHP Syntax (Toggle Plain Text)
  1. window.open("update.php?id=10"...)
Reputation Points: 167
Solved Threads: 239
Nearly a Posting Virtuoso
rajarajan07 is offline Offline
1,445 posts
since May 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Any good advanced PHP book?
Next Thread in PHP Forum Timeline: Table problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC