Web Design Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignWeb Design Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 11th, 2004, 09:38 AM
petcat petcat is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 petcat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Reload

I have made a diary where you can post comments to the specific day.
From the diary there are a link to the comment-page where you can post comments. After you have entered the information and press OK, the page reloads and you can view your comment together with the rest. But at the diary-page where the link is, is also a counter to show how many comments is on this day. My problem is that I want to update/reload the diary-page together with the comment-page.
When I press OK in comment-page I want the diary-page to reload(which is in the background)

How do I do that? (Javascript I supose...?)


Cat

Last edited by petcat : February 11th, 2004 at 09:42 AM.

Reply With Quote
  #2  
Old February 17th, 2004, 09:03 AM
GeoHoffman49431 GeoHoffman49431 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 28 GeoHoffman49431 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I think I am understanding this? You want to have a web page that has a form that will update a page on your web site with the contents of the form? To do so you should use PHP. PHP is a complete server side programing language. If you want to use it your server needs to be set up to allow this. Javascript will not be able to change any information on your web site by itself (unless you use some kind of server side javascript). The normal way to post data with PHP would be to send it as a form. When a form is submited you can specify a php page

Code:
<form action="fileToRecieveFormFields.php" method="GET">
<input type="text" name="variable" value="valueStoredInVariable" > </input>
<input type="submit"></input>
</form>


this will send the user to a page "fileToRecieveFormFields.php" that can process the entries into the form. All the input fields will be accessible as variables. You can use the variables passed in via forms to create the content for the page the user has been redirected to. You can also use the variables to create a new file on the server that can be displayed.

The posibilities of PHP are endless. For instance I use PHP for my photo album. When it is loaded it searches for photos in certain directories and lets the user choose which folders contents to display. So all I have to do is create a new folder and drop in pictures and PHP does all the rest. You can use PHP for searching databases of info on the server, or for creating Messageboards, or even chat rooms(if used in conjunction with javascript).

On a side note. You should be carefull when allowing anyone to post directly to a web page for security reasons. They could do something malicious like post HTML tags or script tags. Or if you are using php they could post something to the PHP file that might end up getting run, and then have the ability to run file system comands (create files/delete files) on your web server. You should always have a way to check through their post and make sure at the very least they dont have tags in it. Also what if they posted something like:

Code:
<?php   while(); ?>


then you saved that to a file and allowed someone to open that file as HTML. Esentially anything in the <?php> tag would run. They could put in something malicious like code to check all your directories and delete everything they find.

Reply With Quote
  #3  
Old February 17th, 2004, 12:14 PM
Executive's Avatar
Executive Executive is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 147 Executive User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
It kind of sounds confusing, you said, "After you have entered the information and press OK, the page reloads and you can view your comment together with the rest" which sounds like the diary page is refreshing when a new comment is posted?
__________________
Family Hosting, we treat you like family!
United Web Site Award Givers, is your website worthy of an award?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignWeb Design Help > Reload


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway