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 05-14-2008, 04:36 PM
Minti Minti is offline
Newbie
 
Join Date: May 2008
Posts: 3
Rep Power: 0
Minti is on a distinguished road
Default Displaying stock price

Hi there,

I am currently trying to get the stock price to display on a webpage and have it refresh every 5 minutes. I am a bit of a newbie to programming so i have been given some sample code and guidelines.

First of all i have the html page:

HTML Code:
<html xmlns:v="urn:schemas-microsoft-com:vml">
    <head>
                <title>Default</title>
                <link rel="stylesheet" type="text/css" href="csse.css" />
                <script language="JavaScript" type="text/javascript" src="jse.js"></script>
    </head>

    <body onLoad="loadPrice()">
        <div id="HTMLResults"></div>
    </body>
</html>
This is calling a javascript file.

Now i need some help on how to write a javascript function in a seperate file that queries a url that i have been given.
"Please see second post below"
And return and display the symbol and the stock price.

Also how would i go about getting it to refresh every five minutes?

Any help with this would be greatly appreciated.

Cheers for taking the time to read this.
Minty

Last edited by Jordan; 05-14-2008 at 04:44 PM. Reason: Added code tags
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 05-14-2008, 04:37 PM
Minti Minti is offline
Newbie
 
Join Date: May 2008
Posts: 3
Rep Power: 0
Minti is on a distinguished road
Default Re: Displaying stock price

Stock price URL:
http://products.stockpoint.com/servl...es?symbols=gsk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-14-2008, 04:43 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Age: 25
Posts: 4,529
Last Blog:
PHP: list()
Rep Power: 50
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default Re: Displaying stock price

To display the symbol you would just need to do:

HTML Code:
document.write(quote[0]);
The easiest way to refresh a page every xx amount of minutes is to simply put this in the <head> segments:

HTML Code:
<meta http-equiv="refresh" content="600">
If you want to use JavaScript though you can use this function: The JavaScript Source: Page Details: Refresh Page - Automatic
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a 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
  #4 (permalink)  
Old 05-14-2008, 05:47 PM
Minti Minti is offline
Newbie
 
Join Date: May 2008
Posts: 3
Rep Power: 0
Minti is on a distinguished road
Default Re: Displaying stock price

Cheers for the reply.

A few questions

First of all how would i also display the stock price from that link.

And for the refresh i know i have shown a full html page but how i am actually going to do it is so that a section of a div refreshes therefore i need it to be done through javascript. So is the link you gave able to do this for me or should i be looking at something else?

Taa
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
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 11:19 PM.

Contest Stats

dargueta ........ 93.00000
John ........ 87.50000
Xav ........ 50.00000
MeTh0Dz ........ 20.00000
gaylo565 ........ 18.00000
Johnnyboy ........ 3.00000

Contest Rules

Ads