Hello all
Here is a topic that I posted on Oracle. It thought to place it some other forums to see what comes back.
I'll post the original, then the few replies...
Graeme wrote:
------------------------------
Hi guys
First off I hope I'm using the correct terms...
Ok, I would like to create a web page where for example I have a message listing and an item listing. Only one is viewable at a time and the one should overlay the other, let's say in tabular format.
So if i click on the msg tab all the messages appear and visa versa.
The next thing is that all the msg and item data is sent in one request so the client browser should NOT have to return to the server when toggling between the 2 tabs.
Incl. is a simple script where I assign an 'echo' based on a form submission value.
So how i test is to fire up the browser with the given script, enter a few values and all is well. I then shut apache down and the html crashes with 'Page cannot be displayed'...
Basically I require the browser (once loaded) to operate on the given data set independantly ie. not returning to the server unless 'told' to.
Hope this is clear for you guys
Thanks in advance
Graeme
<html>
<head>
<title>Hello Oracle Forum</title>
</head>
<body>
<FORM METHOD="POST" >
<?php if ($_POST[x]=='a') {echo 'a';} else {echo '?';} ?>
<INPUT TYPE="text" NAME="x"/>
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="submit a or ?"/>
<FORM/>
</body>
</html>
... and in response:
--------------------------------------------------
PHP is a server parsed language, which means every function and command must be passed through apache to the php libraries on the server for processing. All the client browser gets on their end is the resulting HTML. In short, you can't do exactly what you're looking to do in PHP, because everytime you post or get, the browser is going to want to connect to the server. To accomplish this you'll likely want to use a client side language that can retain arrays and parse them. Java (and I believe action scripting in flash) can do this.
Alternatively, if you're simply looking to save database resources you can save the information in either a really long URL with get variables (this may get tricky with multi dimensional arrays), using sessions or cookies. You'll still need to pass the information back on up to apache, but with the data saved you wont need to hit the database everytime.
... so:
--------------------------
Basically I'm messed here :S I need a way of loading the session variables and toggling between two tables which are overlayed without returning to the server.
If this is achieved through scripting please be so kind to tell me / show me how.
Thanks in advance!
Graeme
PS the original topic may be viewed at
http://forums.oracle.com/forums/thread. ... 1􇚻