Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #21 (permalink)  
Old 10-21-2003, 04:06 PM
Contributing Member
 
Join Date: 10-12-03
Location: Cranberry Township
Posts: 224
iTrader: 0 / 0%
Quote:
Originally Posted by PhilC
Dunno if this will give you the info you require. It's a whole page that you can upload and load into a browser - it gives you a load of info about the PHP configuration on the server.
Sure it does, its the first variable displayed as well as the type of server that you are on.
__________________
Web 2.0 Style
 
Reply With Quote
  #22 (permalink)  
Old 10-21-2003, 04:14 PM
Senior Member
Latest Blog:
None

 
Join Date: 10-12-03
Posts: 1,201
iTrader: 0 / 0%
Quote:
Originally Posted by Culland
Well I tested and it works, which is likely because writing the DIV causes a server query. See my code above, where I implimented the idea.
It doesn't cause a server query. This is the page in the browser:-

[code:1:351b2fd9a9]<html>
<head>
<script language="javascript">
function dostuff(){
x = document.getElementById("mainblock");
x.innerHTML = "Testing Two";

}
</script>
</head>
<body>
<div id="mainblock">
Testing One
</div>
<br><br>
<input type="button" onClick="dostuff()" value="Push">
</body>
</html>
[/code:1:351b2fd9a9]
Clicking the button merely writes a different phrase into the div. It doesn't go anywhere near the server.
 
Reply With Quote
  #23 (permalink)  
Old 10-21-2003, 04:14 PM
Junior Member
 
Join Date: 10-20-03
Posts: 16
iTrader: 0 / 0%
I stand corrected, its not working as intended, just works in my short quicky test because its running the function and writing the results, instead of holding the function and inserting it. So in short its processed the result before it sent the page.

Cul
 
Reply With Quote
  #24 (permalink)  
Old 10-21-2003, 04:15 PM
Junior Member
 
Join Date: 10-20-03
Posts: 16
iTrader: 0 / 0%
Beat me too it
 
Reply With Quote
  #25 (permalink)  
Old 10-21-2003, 04:20 PM
Senior Member
Latest Blog:
None

 
Join Date: 10-12-03
Posts: 1,201
iTrader: 0 / 0%
Quote:
Originally Posted by niceguyeddie
Sure it does, its the first variable displayed as well as the type of server that you are on.
hehe...I didn't noticed that at the top
 
Reply With Quote
  #26 (permalink)  
Old 10-21-2003, 04:21 PM
Senior Member
Latest Blog:
None

 
Join Date: 10-12-03
Posts: 1,201
iTrader: 0 / 0%
Quote:
Originally Posted by Culland
Beat me too it
Yeah - we got our posts the wrong way round
 
Reply With Quote
  #27 (permalink)  
Old 10-22-2003, 07:25 AM
LazyJim's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 10-13-03
Location: UK
Posts: 2,469
iTrader: 0 / 0%
Quote:
Originally Posted by Culland
Quote:
Originally Posted by LazyJim
The point is the user is always in the same page, same HTML document, the content of that page changes only.
This I get and understand, but there is only two ways (not counting user input) to change the content of the page, either its written into the page to start with, ie front loading all the text/html into something like a javascript array, or you are fetching new data from the server via includes, php, etc. You can keep the same HTML page, put everything that changes inside a DIV block that you re-write via innerHTML, but it doesnt get around the fact that you either already have the data client side, or you need to request it from the server.

There is a way to alter the XSL file, thus changing what XML data is displayed to the user, completely with javascript. However it only works in IE, plus it doesnt get around the fact that you need to send all the data via XML, which is the same problem as front loading via javascript. You can do server side XSL transformation, but again this calls for a server query, which basically re-writes your HTML page to a new one.

Guess I am out of ideas.

Cul
I see you understand now.
I should have been clearer from the start and focused one one thing at a time.

Anyway, so were all on the same wavelength now and we'ev established that any PHP in any web page doesn't even reach the client.

PPK's site is working again (or my connection to it ha started working again), so I can show you the function I found.
http://www.xs4all.nl/~ppk/js/importxml.html

PPK's Import XML function is all well and good, but limited x-browser, and probably only works for XML documents (very useful when I start working with XML, but not yet).

Maybe I could get it working if the files where XHTML, but i'd rather have the ability to make it work with plain old un-marked-up text as well.

Any ideas?
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
 
Reply With Quote
  #28 (permalink)  
Old 10-22-2003, 10:02 AM
Junior Member
 
Join Date: 10-20-03
Posts: 16
iTrader: 0 / 0%
This script is only going to work if you are browsing with windows. If you are hosting your website on a windows platform you can interface with the same com object through PHP, I have done this and it was buggy as all heck, so I switched to ASP and it worked fine. A similiar option would be to use the filehandler com object via javascript to open files and read their outputs. However soon as you move to server side like ASP or PHP I think you run into the fact that you have to load all the data at once because the server does it all before sending it to the client.

The alternative is to use PHP, I expect this can be done with just the XMLDOM module active and not need Sablotron, but I could be wrong on that part, but again its server side so you have to front load everything.

In short I think what you might have to do, is allow the client side version for those that can handle it and go iframes/frames or front load the data if they are not windows users.

Cul
 
Reply With Quote
  #29 (permalink)  
Old 10-22-2003, 11:02 AM
LazyJim's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 10-13-03
Location: UK
Posts: 2,469
iTrader: 0 / 0%
That's a shame
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
 
Reply With Quote
  #30 (permalink)  
Old 03-13-2006, 04:34 AM
LazyJim's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 10-13-03
Location: UK
Posts: 2,469
iTrader: 0 / 0%
Just thought I'd point out that AJAX is now what people use because it there is much better cross-browser support these days.
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
 
Reply With Quote
  #31 (permalink)  
Old 03-13-2006, 06:11 AM
kyleposey's Avatar
Member
 
Join Date: 03-02-06
Location: Indianapolis, Indiana
Posts: 82
iTrader: 0 / 0%
Quote:
Originally Posted by LazyJim
Yeah I was rather unclear, and asked lot's of questions at the same time! sorry too

The effect I was trying to create has also been brought up on another thread: "Div Include" http://www.internet-marketing-resear...opic.php?t=523

In essence, I want to load data from html files into the page without the browser going to the page.
The same page has to stay in the browser over the whole session, and I want to download and insert data as it is needed.

*edit - Yes I can already do the insertion bit, I need the download bit.
What you are talking about can be done via Ajax (Asyncronous Javascript and Xml). You essentially rely on Javascript's XmlHttpRequest object to retrieve xml data (in real time) from another website or webpage, and then manipulate the DOM of the current page to write to the browser in the exact location you want. The browser window does not need to be refreshed.

There are several good Ajax libraries out there, here are a couple: Moo FX, script.aculo.us/. Or if you aren't a coder and would rather have someone else help you out, pm me.
__________________
Kyle Posey
Programming Coffee | Paniris Web Development
 
Reply With Quote
  #32 (permalink)  
Old 03-16-2006, 02:09 AM
LazyJim's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 10-13-03
Location: UK
Posts: 2,469
iTrader: 0 / 0%
Yeah, thanks for the links.

How come everyone had trouble getting it back then when I was first talking about it? Should I have invented a catchy name like AJAX? Was it just too early for everyone else? Was browser support too low? I don't know but I'm glad everyone likes the idea now (even if some people are using it with bad results).
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
 
Reply With Quote
  #33 (permalink)  
Old 03-17-2006, 06:23 AM
kyleposey's Avatar
Member
 
Join Date: 03-02-06
Location: Indianapolis, Indiana
Posts: 82
iTrader: 0 / 0%
You know, I didn't even look at the dates of the post... You definately should have invented a catchy name for it.
__________________
Kyle Posey
Programming Coffee | Paniris Web Development
 
Reply With Quote
  #34 (permalink)  
Old 03-17-2006, 07:03 AM
GeorgeB's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 02-19-06
Location: United States
Posts: 276
iTrader: 0 / 0%
LazyJim invented AJAX...


spread that around.
__________________
Latest project: compiling a database of printer errors among other tech issues.
Visit the main site at error forums.
 
Reply With Quote
  #35 (permalink)  
Old 03-17-2006, 08:50 AM
Contributing Member
Latest Blog:
None

 
Join Date: 07-30-05
Posts: 247
iTrader: 0 / 0%
Quote:
XMLHttpRequest must have been one of the Web's best kept secrets. Since its debut in 1998, few sites have used it at all, and most developers, if they even knew about it, never used it.
link...
 
Reply With Quote
  #36 (permalink)  
Old 06-06-2006, 02:58 PM
LazyJim's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 10-13-03
Location: UK
Posts: 2,469
iTrader: 0 / 0%
Quote:
LazyJim invented AJAX...
Damn right!



I used in before i started this thread and was frustrated by the IE-only thing, but mozilla might have actually had what I needed at that time anyway. Unfortunatly no-one on this forum was able to show it me!

Edit: no-one even understood what I was talking about let alone tell me there might be a similar function on another browser.

P.S. although don't forget AJAX was possible ever since IFRAMEs worked - and not just using an internal frame, but hiding it and accessing its content via JavaScript.
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt

Last edited by LazyJim; 06-06-2006 at 03:02 PM.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SOAP API Key Tariel Zivzivadze Google Forum 0 04-30-2007 05:29 AM
http:// vs http://www Dup Content theChronic Google Forum 2 06-13-2006 03:58 AM
http://www. or http://sitename DOS SEO Forum 3 09-04-2004 11:36 PM
HTTP 400 Bad Request Problem discusman Dedicated Servers 0 03-03-2004 12:08 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 11:05 PM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.