473,320 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

javascript/php partial update

How can I partially update a page using javascript if javascript is
available, but do a full update if it's not, using php?
Jul 23 '05 #1
6 2077
*** Nik Coughlin wrote/escribió (Mon, 16 Aug 2004 20:52:37 +1200):
How can I partially update a page using javascript if javascript is
available, but do a full update if it's not, using php?


Since PHP is a server-parsed language, there's no way to execute PHP code
without loading the page from the server. I guess you are looking for a
JavaScript trick called "iframe scripting": use these keywords in Google
and you'll probably find something.
--
-- Álvaro G. Vicario - Burgos, Spain
-- Questions sent to my mailbox will be billed ;-)
--
Jul 23 '05 #2


Nik Coughlin wrote:
How can I partially update a page using javascript if javascript is
available, but do a full update if it's not, using php?


Jim has an example where JavaScript is used to question a server and a
normal HTTP form submission by the browser is done if script can't do
the job:
http://jibbering.com/2002/4/add.1

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #3
Alvaro G Vicario wrote:
*** Nik Coughlin wrote/escribió (Mon, 16 Aug 2004 20:52:37 +1200):
How can I partially update a page using javascript if javascript is
available, but do a full update if it's not, using php?


Since PHP is a server-parsed language, there's no way to execute PHP
code without loading the page from the server. I guess you are
looking for a JavaScript trick called "iframe scripting": use these
keywords in Google and you'll probably find something.


Hi Alvaro,

Looks like I didn't explain myself very well.

Somes sites use JavaScript to do a partial update, ie change text on a page,
make a message box appear etc. without reloading the whole page. What I
want to be able to do is, if they have JavaScript, load the page once and
from then on manipulate the dom when the page changes, without reloading the
page. However, if they don't have JavaScript, I want to construct a full
new page using php and load that instead. I've done this before with
Intraweb but I want to use PHP as the back end this time.

I'm not sure if what Martin suggested is what I mean, I will have a look
now.
Jul 23 '05 #4
Martin Honnen wrote:
Nik Coughlin wrote:
How can I partially update a page using javascript if javascript is
available, but do a full update if it's not, using php?


Jim has an example where JavaScript is used to question a server and a
normal HTTP form submission by the browser is done if script can't do
the job:
http://jibbering.com/2002/4/add.1


Hi Martin,

I don't know if I explained myself clearly enough, I have tried to do so in
my response to Alvaro's post, are we talking about the same thing? The
technique you have linked to looks like it could be very handy though.

Thanks!
Jul 23 '05 #5
rw
Mybe simple concept: Your interactive buttons composed like <a
onclick="js_action();return false" href="php_action.php">..., with help
eg. phplib w'l little proffesional.
rw
Nik Coughlin wrote:
How can I partially update a page using javascript if javascript is
available, but do a full update if it's not, using php?

Jul 23 '05 #6
rw wrote:
Mybe simple concept: Your interactive buttons composed like <a
onclick="js_action();return false" href="php_action.php">..., with
help eg. phplib w'l little proffesional.
rw
Nik Coughlin wrote:
How can I partially update a page using javascript if javascript is
available, but do a full update if it's not, using php?


That's what I meant -- awesome. So, if JavaScript is available, the onclick
event fires, if not, the link calls a php script. Pretty simple, cool,
thanks!

Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Nik Coughlin | last post by:
How can I partially update a page using javascript if javascript is available, but do a full update if it's not, using php?
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
6
by: Ronald Mai | last post by:
In my opinion, Ellipsis might be in the middle, not only in leftmost or rightmost, so a placeholder approach can be much more flexible and convenient. Here is a reference implementation: _ =...
0
by: Daniel | last post by:
I wrote a pretty neat website today that can utilize no postback AJAXIAN type features. Basically to populate a drop down with a web service call that hits a SQL server, based off the change of...
1
by: Veerle | last post by:
Hi, I have a web page and at the end of the page I have inserted some javascript that checks if Acrobat Reader plugin is installed. If it is not installed, I disable some elements (buttons,...
5
by: Matthew Wilson | last post by:
I wrote some code to create a user and update a user on a remote box by sending emails to that remote box. When I was done, I realized that my create_user function and my update_user function were...
5
by: SAL | last post by:
Hello, I would like to be able to set the WHERE clause of a select statement on the fly. I have a DataAccess layer designed using the DataSet designer and a BusinessLogic layer using classes. The...
2
by: CrystalMikeMD | last post by:
Greetings, I've been at this problem for some time now and have decided to seek out some help. Essentially, this is what I have. A basic ASP.NET 2.0 page. On this page is the standard...
4
by: Peter | last post by:
ASP.NET I have an application which use ASP.NET Autocomplete extender which works great. But I have a question how to update all the fields on the screen using Ajax. Users starts typing in a...
2
by: pankajsingh5k | last post by:
Dear All, Please help me... I had read an article to lazy load a tab in a tabcontainer using an update panel on http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.