Help - Search - Members - Calendar
Full Version: Way above my head
HTMLHelp Forums > Web Authoring > General Web Design
roamin_oz
I have uploaded a page with all the information that's needed and a link on that page which i hope after its worked out looks like it. I'm trying to create a web page for my father as he is currently wanting to study and watch the Australian Share market. He doesn't know much about computers let alone source editing. So if i can get this to work it would be a huge help.

What i need done is, I have a form text box at the top of the page which you can add the company's name and company's stock code into, which when submitted adds the source code i have provided but changes the {Share_Name] and [Share_Code] to your desired information submitted in the form text box. Also possible have the option of deleting a specific chart too.

Links are to....

http://roaminoz.50webs.com/Shares/Shares.html

and then the look i desire

http://roaminoz.50webs.com/Shares/SharesNew.html

I Hope this is enough information, if not please don't hesitate to ask.

Thanks Mark
Christian J
Does finance.yahoo.com allow hotlinking/leeching of their chart images? If the pages are offline hotlinking might still work, but if hosted on the web your site might get blocked.

Assuming the above is not a problem, one way is to submit an HTML form using the GET method, and keep all information in the URL's query string (the part after "?" in the URL when GET is used), but then the user must bookmark all new URLs in order to save changes. When a page is requested, the server script will print out an HTML table for each pair of share code/name data in the query string. Here's an example: http://www.php.net/manual/en/reserved.variables.get.php

Another way is to save the share code and name in a "data base" (can be as simple as a plain text file) on your server, instead of in the query string. Submitting the form will rewrite the data base file. This way you can use the form's POST method, which means no query string will be used and the user doesn't have to save lots of URLs. The disadvantage is that the user can't save different configurations, since only the latest version is kept in the data base.

In order to remove a table you must submit the form, delete the removed table's data (depending on which Remove button was clicked), and print the new version of the page. Maybe multiple submit buttons can be used for this (where each Remove button is a submit button)? Another idea is to add pre-checked checkboxes next to each table, and uncheck the ones you want removed.

See also http://htmlhelp.com/faq/html/forms.html#form-howto and http://www.htmlhelp.com/reference/html40/forms/form.html and if you're going to use PHP, the manual is very useful: http://www.php.net/manual/en/index.php

If the web page is going to be public, make sure malicious users can't inject arbitrary HTML on the page through the query string. There are PHP functions like htmlspecialchars() that can handle that.
Christian J
OTOH, if you don't want anything saved you might make the whole thing in javascript. This should be easier to do.
Brian Chandler
Don't most of these money sites have a portfolio service -- wouldn't that be what is needed?

It's a 98% certainty that just pulling the desired images off the Yahoo website and displaying them in your own website is a violation of their "Terms and Conditions", because they get money from advertiser clicks. (Course, you could always fake some advert clicks, keeping Yahoo happy, then the advertisers would get cross...)

But anyway, I think the only reasonable way to do this is with a database, and frankly it's probably more work writing a bit of code to save in a flat file than in SQL. If you don't want to learn database programming, I think the best thing is just to look for a portfolio or similar function.

I don't understand Christian's claim that you could "write this in javascript" -- unless you don't mind typing the relevant information in everytime you use it, in which case it just *has* to be quicker, simpler, and probably more environmentally friendly just to go and look at the Yahoo site.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.