HTML - Trying To Post Back To Same Page
Hey guys,
so right now i have a page that has some basic info and i have added a text box so the user can enter his/her name and a text box where they can enter in comments after hitting the submit button i want to post back the data the user entered into the text boxes to the SAME PAGE (indexJS.html) Right now after the user hits submit the page reloads but the data never is displayed. Can someone please tell me what i am leaving out or doing wrong Here is my code: Code: <html> <head> <title>My Page</title> <link rel="stylesheet" href="one.css" type="text/css"> <script src="tricks.js"></script> </head> <body> <div id="section2"> <h2>Add some comments</h2> <form action="indexJS.html" method="POST" id="eventform"> <table> <tr> <td class="name">Name:</td> <td> <input type="text" name="name" id="name"/> </td> </tr> <tr> <td class="label">Comment:</td> <td> <textarea name="comment" id="comment"></textarea> </td> </tr> <tr> <td> <input type="Submit" value="Submit button"/> </td> </tr> </table> </form> </div> <?php if( $_POST ) { ?> <ul> <?php foreach ($_POST as $k ) { ?> <li><?php=$k?> <?php } } ?> </body> </html> Similar TutorialsHi all, I have a form with 4 pages, there are few checkbox in the 2nd page. The problem here is when the user fills in the 2nd form and moves on to the 3rd form, and in case if he comes back to the 2nd form using the back button on the browser, then how can i automatically check the checkboxes the user has already checked in the 2nd page of the form. Thanks James NT Yes, I searched, found nothing--- I have a pretty basic Forum. Users must log in to the Forum - from inside the Forum they can log in to their email accounts - it is seamless, it appears to the user that they are still in the Forum site, but they are actually in a different site--- The email client has a 'log out' button - I have code that will return the user to my forum: <script type="text/javascript"> <!-- document.location.href = "http://www.Your_Home_page/"; //--> </script> BUT, this doesn't work for me because it returns the user to the forum HOME PAGE, and they must log in again. In the same situation, if the user logs into the email client, and then rather than clicking on the 'Log Out' button, they hit the browser 'Back' button, it takes them straight back to the forum, without the need to log back in-- I would like to have code behind the 'Log Out' button that will do the same, take them straight back to the forum, not just log them out of the email client. make sense??? Thanks very much for your help!! Hi, Is it possible in HTML to have a link that takes you back to the previous page you visited. But here's the catch....i want the back link on my pages to behave exactly as the BACK button in Internet Explorer (hope that makes sense). I have a link on my pages which is this: <font size="2"><a href="javascript: window.history.go(-1)">BACK</a></font> but this works in such a way that if you go to Page1, then Page2, then Page 3, then you click on BACK in page3...that takes you to Page2...if you then click on the BACK link on Page2, it takes you back to Page 3...when in fact I want it to go to Page 1.... Please urgently help. Thanks Hello; I have text box & submit button in page_1 & I have text box & submit button in page_2. I want when write text in text box in page_1 it go directly to text box in page_2 & I want when click on submit button in page_1 it is like click on submit button in page_2. Assume page_2 located in other site www.page_2.com. How to do that.?? Hello, I dont know if someone had the same problems, but it seem to me that it is quite common. For a service I would offer my visitors to log in or register... Then after registering or logging in I would like to direct them back to the page where they had been diverted from. And the number of steps and the page are not always the same. Is there a way to "remember" the page name when click on register or login and at the end of the reg/log process go back there? Thanks Attila Any suggestions on the best way for me to put a rather large document on the web? It will have about 500 pages, looks like. Comes in 22 chapters of varying sizes. Currently all the pages are .jpg pictures. Html menu tree to chapters then sections then pages? Or just html links in a similar fashion - with thumbnails maybe? Or should I make one or more .pdf 's ? Or should I/could I put it in an SQL database and serve it up from there? ( A bit unlikely, I think - I don't get that much room with my host and I don't want to pay for more - but if it turns out to be the solution of choice I'd maybe go for it.) Or what? HI, I just started here... like two minutes ago. I NEED help on getting a form to automatically post to a page on my website. So, i'm making a class website, right, and I need my teacher to be able to post stuff on a page and have it erase what was already on there (every week). My teacher does not know html, so I would like to have a text box automatically edit the page, I am a medium web designer... but I do not know ANYTHING about this, I have searched EVERYWHERE and couldn't find ANYTHING. It got so annoying that I gave up for about 6 months... until today, which is why I'm asking this. By the way, I would also like "Contact us" forms to go directly to my email, WITHOUT any CRAPPY websites (like the one I'm using now) any help would be very appreciated!! Hello all mates! I am working with my forum trying to properly edit the html for the posts so that they will display any custom script/html of my choice. I want this to appear in ONLY the first post in every thread. I am also trying to find out how to make a bot that automatically posts another second post in every thread, with my own custom scripts/html. At the moment I am trying to add some adsense ads this way. What I am looking for is two things: 1 - How to get the adsense ad aligned to either right or left of the text within the first post. 2 - How to get an adsense bot autopost an ad as post number 2 in any thread (including being applied to all threads already existing) I am using IPB3. I previously used Adsense Bot for IPB2, and that worked fine, but it is not supported for IPB3. It uses the Universal Mod Installer, and in IPB3 there is a new "hook" feature to ass custom mods etc, but I do not know how to alter the code for the Adsense Bot to work with IPB3 so I am trying to get it done from scratch by adding codes directly into the templates. If anyone know how to configure / modify the old Adsense Bot to work with IPB3 that would be great of course, so I am attaching it here just in case someone wants to take a look at it and its documentation and scripts. But primarily I am looking for the two mentioned features, one is how to get the script running in ONLY the first post of every thread - at the moment I got it running, but it is global and implements into all posts not only the first. I also have figured out how to make a script appear, such as an ad, between posts, but not after ONLY the first post, nor how to make a bot that posts a post just like any member, which is what I am really looking for when it comes to that part. This is the code I have entered into the topicViewTemplate in Topic View: Code: {parse template="aip" group="topic" params="$post"} <div style="display:block;float:right;margin: 0px 10px 0px 0px;"> <script type="text/javascript"><!-- google_ad_client = "pub-3737464431076938"; /* forum posts large recnt */ google_ad_slot = "6548059149"; google_ad_width = 336; google_ad_height = 280; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> This works perfectly for adding my desired custom script embedded within the posts. The problem is that it gets embedded in ALL posts and not only the first as I would want. Here is a link to my forum for an example on how it looks: http://www.conspiraciesforums.com/fo...ic/3-atlantis/ I know I have to edit/add some code regarding post counts etc to configure it to only affect the first post - my question is how to do that? And as seen, the second post shows the ad as well, here I would want a bot to post a post containing another ad - between the first and third post of every thread (which will be standard members posts). I have messed my brain with this for more than a week now trying different things, looking around at forums, googling, trying scripts and so on, mods etc, but as of yet have not found the solution to these things for IPB3. Any help here would be extremely greatly appreciated and I'll buy you a beer if you're ever around my part of the world! :p Thanks and bless you! -M I am programming a site and i am having a pag with thousnds of things on it, literally, so i want to have a bar up at the top that says "G" and it will take you down to the beginning of section "G" and then a back to top section. here is the site, it is very, very unfinished. Hi i was wondering what the code is for hypserlinking text to go to a certain part of a page thanks I have another question. If you look at my main page he http://www.bestsellersworld.com On the section called "What's New", I have a book cover called "Should Old Acquaintance Be Dead". I would like to move that cover more over to the right. I have align="right" but it does not move over. How can I do that? Thanks. Hi there, Hope someone can help me out! i got a page that i am working on , and i have a frame in it which the links on the side of the page displays the contents of that link inside the frame box, now these links run from top to bottom of the page, which extend farther down than the frame box, i need a code that will bring the index page to the top of the page, but also open the frame of that link also, what i have is : <td width="150" height="20"><a href="toys.html" target="MainFrm">◊Toys and Games</a> this opens the toys.html in the frame but since this is the last link on the left side it is far down the page, and when you click it you dont even see that the frame changed, is there a way to place a code somewhere so that when someone clicks on it , it will actually bring the index page up to the top. so that the person can see the frame on top ? page is : http://www.busybeeretail.com/test thanks, Elaine Hi guys I would like to use "back" button like this: Code: <form> <input type=button value="Back" onCLick="history.back()"> </form> Can I replace this button with my own designed button? How can I do that? Hi everybody. Can someone come up with code that will give me the same back function that Internet Explorer has at the top of their page ? Thanks Launchnet Hi, My client wants me to add a back to top link within a CSS scrollerble area. I can't seem to get it to work??!! Please check this out in i.e first as I haven't sorted it out in Firefox and safari yet. Link is here/ Many thanks, Louise I got into this about 5/6 years ago when I had to design a basic site for school so taught myself some CSS, we were using dreamweaver. I've been wanting to get back into it recently and was just wondering best way to do this? I was thinking about experimenting with maybe wordpress or another CMS. I'd like to get back into a bit of photoshop or fireworks as well not sure where I'll find the time but eventually maybe. Any suggestions would be much appreciated. Im using google analytics, just discovered it.. loving it. It gave me something to think about. My site.. it hasnt been tested with a Mac/safari browser.. now ive no idea why but i think it doesnt show up properly; that explains the bounce block part. So, could someone tell me how to code for safari? I tried googling but that lead to little.. and the old link generators 'see your site throught the eyes of a mac" are all long gone.. thank you for reading. I am looking for a back button but there is a catch. I want to send an email newsletter, the newsletter will link to articles on a website. I want a back button that will return the user to the Outlook email they clicked from. Any suggestions? Thanks Brian I guess I'm technically a noob. I've only half heartedly plied my feeble html skills for about 12 years. Right, well, a site I am working on has a rather long index page and several times along it there is a link to another page. They are all links to the same page and what I desire to do is allow my visitors to click on a link on that second page that will take them back to the same spot they were at on the index page. I know it's what the browser's back button does but I want to really "dumb it down" for the visitors. I can't seem to get the code and it's probably something so simple I'll kick myself, or... I'm just asking for something that can't be done What am I missing? (besides a few marbles) Cheers, +Nathan <a href="javascript: history.go(-1)">Back</a> this does - on click go back to previous page right.. can you tell me equivalen code to go back automatically.. i.e. with a possible time delay thank you |