Reply
 
Thread Tools
Old 03-17-2012, 06:30 AM   #1
shakemelikeapig
Member
Activity Longevity
0/20 10/20
Today Posts
ssssssss4
Join Date: Mar 2012
Posts: 4
Rep: shakemelikeapig is on a distinguished road
iTrader: (0)

Default comment posting feature in my site


I am trying to create a comments posting feature in my site using javascript
However everytime i click on submit it shows the comment posted for a second and then the comment dissapears. It does not retain the comment posted. Please help.

code is given below:

Code:
<html>
    <head>
        <script type="text/javascript">
            function post(){
                document.getElementById("label").innerHTML=document.hello.posted.value;
                              
            }
            
        </script>
    </head>
    <body>
        <form name="hello">
            <div id="label"> </div>
        <textarea name="posted">  </textarea>
        <input type="submit" value="Submit" onclick="post()">
        </form>
    </body>
</html>
CF
shakemelikeapig is offline   Reply With Quote

Old 04-16-2012, 11:25 AM   #2
alen12345
Member
Activity Longevity
0/20 10/20
Today Posts
sssssss88
Join Date: Feb 2012
Posts: 88
Rep: alen12345 is on a distinguished roadalen12345 is on a distinguished road
iTrader: (0)


When you click on a submit button the page is refreshed, and reloaded once more. Change the type to "button". But I expect that you realise that only the writer of the comment can see it! If you want all you users to see the comments then you will require server-side scripting and a database.
alen12345 is offline   Reply With Quote
Old 05-17-2012, 01:42 PM   #3
SelinaWang
Member
Activity Longevity
0/20 9/20
Today Posts
ssssssss1
Join Date: May 2012
Posts: 1
Rep: SelinaWang is on a distinguished road
iTrader: (0)


nice posts cool
SelinaWang is offline   Reply With Quote
Old 06-04-2012, 05:44 AM   #4
Robbin07
Member
Activity Longevity
0/20 9/20
Today Posts
sssssss47
Join Date: Jun 2012
Posts: 47
Rep: Robbin07 is on a distinguished road
iTrader: (0)


I think you need for visiting the website of w3school where your solution can be get easily.
Robbin07 is offline   Reply With Quote
Old 06-04-2012, 09:55 PM   #5
bhatti420
Member
Activity Longevity
0/20 9/20
Today Posts
ssssssss9
Join Date: Jun 2012
Posts: 9
Rep: bhatti420 is on a distinguished road
iTrader: (0)


from w3school you can get easily the script you want. All main scripts are available there.
bhatti420 is offline   Reply With Quote
Old 07-26-2012, 08:13 AM   #6
joelsculley
Member
Activity Longevity
0/20 9/20
Today Posts
ssssssss2
Join Date: Jul 2012
Posts: 2
Rep: joelsculley is on a distinguished road
iTrader: (0)


yes i am agree with you. Good information thanks
joelsculley is offline   Reply With Quote
Reply

Bookmarks

Tags
comment, feature, posting, site

Thread Tools

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New feature: Twitter crumblepie Latest News 7 07-31-2014 05:07 PM
New: Buy Me A Latte Feature crumblepie Latest News 3 12-02-2013 07:52 AM
New feature: Portfolio link under your avatar crumblepie Latest News 4 11-28-2013 09:24 PM
Ping Posting in SEO mobileapplover General 2 03-10-2012 07:35 AM
How to find do follow blog comment sites? gideonscott Web Developer 6 10-12-2011 07:53 PM

Forum Sponsors

Please take the time to visit the websites of some of our sponsors.