Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > JavaScript and CSS

JavaScript and CSS Extensible Markup Language, Java Script, and CSS questions here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-06-2008, 06:37 PM
domestic's Avatar   
domestic domestic is offline
Learning Programmer
 
Join Date: Mar 2007
Location: SCOTLAND!
Age: 19
Posts: 39
Rep Power: 6
domestic is on a distinguished road
Default Js, XML, and arrays

Sounds like fun, huh?

Well, quite simply, I need to make a ticker (see bbc news). Simple enough but the catch is, the whole site needs to be able to continue if the IT team came out a meeting and were killed by a bus. So, I am writing a back-end via php etc. Unfortuantly, Js cant read text files, but it can read xml. Therefore, I had the idea, I'll use this:

Php writes xml
xml imported into Js
Js displays ticker

Simple. Told you so. However, as ever, there is a catch. I'm not sure how to set the length of the array. My thoughts were to make a field in the xml that would contain the number of items the array requires to hold. Couldn't think of a better way. Anyways, I nt sure how to get the xml into the Js array.

What I have: Js Ticker, Js file for reading xml (both IE and FF etc)

Anyways, the above is really for background, just in case there was a better way. However, I couldn't find it, so assistance in showing me how to create the array according to the bit in the xml file would be great.

Cheers,

Domestic
__________________
.


Programming Languages: Java, VB6, VB2005 (.NET2)
Web Languages: HTML, CSS, JS

Website: http://abdn.ac.uk/~u41am6

Opportunity is missed by most people because it is dressed in overalls and looks like work.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 02-08-2008, 06:01 PM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,135
Rep Power: 16
Lop is on a distinguished road
Default

I didn't finish reading your thread because you said "write to a file". Why would you write to a file when you can read/write with PHP? Second, why not just use AJAX? Create a PHP file in the backend. The front end will consist of JavaScript executing a PHP file (hey, AJAX!) that reads the file again.
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-08-2008, 09:22 PM
domestic's Avatar   
domestic domestic is offline
Learning Programmer
 
Join Date: Mar 2007
Location: SCOTLAND!
Age: 19
Posts: 39
Rep Power: 6
domestic is on a distinguished road
Default

tickers are js things. its how they continually update what you see. php wont do this for me, so I would still need to get the information into a js array.
__________________
.


Programming Languages: Java, VB6, VB2005 (.NET2)
Web Languages: HTML, CSS, JS

Website: http://abdn.ac.uk/~u41am6

Opportunity is missed by most people because it is dressed in overalls and looks like work.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-09-2008, 12:12 AM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,746
Last Blog:
Passwords
Rep Power: 20
John has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud of
Send a message via AIM to John
Default

If you create an asynchronous connection between your JavaScript file and your PHP file, every time your JavaScript file calls the PHP script, the PHP script will execute and update the information.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 04:49 AM
Makubex Makubex is offline
Newbie
 
Join Date: Feb 2008
Posts: 1
Rep Power: 0
Makubex is on a distinguished road
Default

ok
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 09:31 AM.

Contest Stats

GoogleKeyw ........ 20.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 67%

Ads