Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
"Recent Submissions" coding?
Old 07-12-2004, 06:21 PM "Recent Submissions" coding?
Marc Timberlake's Avatar
Ultra Talker

Posts: 300
Trades: 0
Hi,

would anyone know how I can use javascript to show recent submissions on the index.html page of my short story site? All stories are held in a mySQL database, but I don't want to change the page from html to php or pl etc.

I want to just have a small section showing 5 most recent submissions (title, author, genre), but don't know where to start! (can you tell I'm a beginner )


Any ideas?


Marc
__________________


Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Marc Timberlake is offline
Reply With Quote
View Public Profile Visit Marc Timberlake's homepage!
 
 
Register now for full access!
Old 07-12-2004, 07:27 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
It would be more efficient to just use PHP to grab the latest submissions. If you use Javascript, you will need to use PHP to generate a Javascript file (this, two "actions" instead of one).
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Old 07-12-2004, 07:37 PM
Marc Timberlake's Avatar
Ultra Talker

Posts: 300
Trades: 0
Quote:
Originally Posted by Chroder
It would be more efficient to just use PHP to grab the latest submissions. If you use Javascript, you will need to use PHP to generate a Javascript file (this, two "actions" instead of one).
Is PHP simple enough to embed in an HTML page though?
__________________


Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Marc Timberlake is offline
Reply With Quote
View Public Profile Visit Marc Timberlake's homepage!
 
Old 07-12-2004, 07:44 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
How are you getting articles from a mySQL database via a static HTML page? Or do you just have a story "section" and everything else is powered by PHP/mySQL?

If you do need it to access it via a HTML page then, yes, your right, you'll need to use Javascript. You can generate Javascript with PHP and include:
Code:
<script language="javascript" src="generate_stories.php"></script>
It's kinda hard to say what code you'll need without knowing how you handle the articles.
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Old 07-12-2004, 07:54 PM
Marc Timberlake's Avatar
Ultra Talker

Posts: 300
Trades: 0
the stories themselves are displayed using Perl scripts (eg short-story.net/story.pl?s=35), but all I am wanting to do is display "title, author, genre, rating" on the main page as links etc.

If it's a difficult task, I may just update the links manually and work something into the second version of the site that is currently being worked on!

Thanks for the input, by the way
__________________


Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Marc Timberlake is offline
Reply With Quote
View Public Profile Visit Marc Timberlake's homepage!
 
Reply     « Reply to "Recent Submissions" coding?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.45322 seconds with 12 queries