HTML - Form Action Properties
Can i assign a URL like index.php?page=result using the get method in a php form.
Ex: HTML Code: <form action="?page=results" method="get"> <input type="submit" value="Submit"> </form> Similar TutorialsI made a HTML Submittion, but everytime a user adds stuff, like their name, etc. it redirects to another page. Is it possible, to let the HTML Submisision, submit the details, without it going to a different page? Hi, Is there any way to have more than one action script in a form? Thanks in advance! Geetha hi i was wondering if anyone has any idea how i can add more then one form action to the same page? i have 2 in my page but they are conflicting with each other thanks... This is how i have it in my page: Code: <form name="form" method="post" action="login.php"> form action 1 my code here..... </form> <form name="form" method="post" action="index.php"> form action 2 my code here..... </form> ooh, its been a long time since i had to ask a question in here. i have a form that just wants to redirect to the home page, no matter what the action is. HTML Code: <form id="contactForm" method="post" action="index.phtml?file=contact.phtml" enctype="multipart/form-data"> <input class="input" name="contact_name" type="text" onfocus="if(this.value == 'Name:') { this.value = ''; }" onblur="if(this.value == '') { this.value = 'Name:' }" value="<?php echo (!empty($_POST['contact_name']) && $_POST['contact_name']) ? $_POST['contact_name'] : 'Name:'; ?>" /> <input class="input" name="contact_phone" type="text" onfocus="if(this.value == 'Phone:') { this.value = ''; }" onblur="if(this.value == '') { this.value = 'Phone:' }" value="<?php echo (!empty($_POST['contact_phone'])) ? $_POST['contact_phone']: 'Phone:'; ?>" /> <input class="input" name="contact_email" type="text" onfocus="if(this.value == 'E-Mail:') { this.value = ''; }" onblur="if(this.value == '') { this.value = 'E-Mail:' }" value="<?php echo (!empty($_POST['contact_email'])) ? $_POST['contact_email']: 'E-Mail:'; ?>" /> <textarea name="contact_message" cols="1" rows="1" onfocus="if(this.value == 'Message:') { this.value = ''; }" onblur="if(this.value=='') this.value='Message:'" /><?php echo (!empty($_POST['contact_message'])) ? $_POST['contact_message'] : 'Message:'; ?></textarea> <a href="#" class="right link1" onclick="document.getElementById('contactForm').submit()">Send</a> <a href="#" class="right link1" onclick="document.getElementById('contactForm').reset()">Clear</a> <input name="ContactSubmit" type="hidden" /> </form> and its not submitting. i think i messed up the link submits, what url shoudl be in there, when i put in index.phtml?file=contact.phtml it stays on the page but doesnt process. also, is the enctype correct for this type of post? also my doc type is xhtml strict, but i am going to have to satisfy a couple errors as far as that is concerned as well, its complaining about Quote: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag when i change the action even to itself which is /contact.phtml it still redirects to the home page. i have to ask it, what obvious fundamental have i forgotton? EDIT, ok it must be in the link submits, when i delete the href tag out of it completely, it seems to be processing. i cant figure out why the # sign was in there, whats supposed to be there for a link submit? i trued a url and that didnt work right Hey guys I am making a application form for my website and I have a few questions... After the application is complete and they hit Submit I want a message to come up and say "Thank you for the application" Then it clears all the text boxes etc to default so they know that the application is complete. How do I get that happening? Also I want the application to go to my email however I do not want the application to open a email form, at the moment I have got Code: <form action="MAILTO:contact@xin-gaming.com" method="post" enctype="text/plain"> but that opens up an email form so that they send it as if it was an email which I don't want. I want it to send it to my email but without the applicant knowing that it's going to my email. Sorry for the confusion >< Thank you in advance This maybe a dumb question. I form that I use for my mailing list. I am having trouble getting the cursor to display as a text cursor over the input section and a hand cursor over the "sign up" button. Ref: http://bigdogcattle.com Here is the html code: <div class="form_contents"> <label for="email">Join our Mailing List</label> <input type="text" name="email" /> <br/><br/> <input type="submit" value="Sign Up!"/> </div> Any ideas? Thanks, Jamie Hi, Is there any way to have more than one action script in a form? Regards, Geetha Hey guys. This is my coding, below, for a form on my site. It's just the default white color (and is too bright for my site's color scheme). Is there any way I can change the color to grey or something else?? THanks in advance!! <form action="http://www.xxx.com/xxx/xxx/xxx.php?group=2" method="post"> <div align="center" style="height:30px;"><font size="1px" color="999999" face="Arial"><b>enter your email address and your info will be emailed to you</b></font></div><div align="center" style="height:30px;"><input name="email" value=" " /></div><div align="center"><input type="image" src="buttons.jpg" size="25" value="Find password" /></div> </form> I''m making a form with three input bars. When the user presses "submit", the contents of the three inputs is put together in a string, which is then sent to a CGI program. Is there any way to add arbitrary text to that string - whether before or after the stuff gathered from the form's inputs - so that my CGI program can know which form called it? ok....i have a htm form that has fields that do a get to a aspx datagrid page. this is done in the action part of the form. i set in the form to target a new winodw but how can i have that new window open with no browser menu? i have googled and found ways to do this in the input onclick but either im setting it wrong or it will not work with the get action Code: <form name="Form1" method="get" action="../lookup/phydatagrid.aspx?tablename=physicians" onsubmit="return validateZIP(this.zipcode.value, this.radius.value, this.name)" target="_blank"> Hi All, I want to change the form action clicking on radio button. I have two radio button. the default action is a1.jsp if I click on update button If I click on second radio button I want to change the form action. I want to redirect to another file (change form action if possible) if I click on second radio button How can I do that ? Thanks please reply soon. Hi All, I want to change the form action clicking on radio button. I have two radio button. the default action is a1.jsp if I click on update button If I click on second radio button I want to change the form action. I want to redirect to another file (change form action if possible) if I click on second radio button How can I do that ? Thanks please reply soon. I have a HTML form that truncates the action parameter after the "?" mark - which is NOT the desired behavior I am looking for. I simply want to open the referenced URL within the same viewport. Here is a representative HTML snippet: HTML Code: <form action="http://www.spufalcons.com/index.aspx?tab=gymnastics&path=gym"> <input type="submit" value="Gymnastics"/> </form> In this case, the submit button takes you to the "http://www.spufalcons.com/index.aspx" page, effectively ignoring "?tab=gymnastics&path=gym" parameter. It appears that URL's using HTML and PHP pages referenced in the action=URL work as expected BUT (alas) this is not the case when the target page contains index.aspx. This behavior is consistent across all major browsers (IE, FF, Safari, Chrome, Opera). Has anyone seen this problem before? Or can suggest an alternative and/or workaround consistent with my "pure" CSS/HTML/PHP web development approach? I have tried replacing the special characters with HTML entity values with no impact. I REALLY don't want to use abandon my CSS-styled submit buttons by using Javascript or button PNG's or image maps. Environment: Web Server: Apache 2.2.14 PHP: 5.2.10 OS: Mac OS X 10.5.8 HTML document info: HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> Hi all, I have a query that I hope somebody can help with as my site has been brought to a standstill because of this problem. I have just posted the new version of my site online and I have a folder below the domain root which contains things like database info, form scripts etc. When I process the form I get a 404 error. the action is something like HTML Code: action="../includes/process_form.php" There is no need to any output from these files as they process the information and direct to the relevant files above the domain root using php header scripts. At the beginning of most of my files I have the following PHP Code: <?php $security = 'secure'; require('../includes/default.php'); require('../includes/error_handlers.php'); require('../includes/db.php'); ?> and there is no problem with these whatsoever. I had all of the scripts working fine when I tested them at domainroot.co.uk/take2/public/ domainroot.co.uk/take2/includes/ Does anybody have any ideas why this is happening Any help would be appreciated John Hey guys, I'm working on this site now I'm stuck. Its been a while since the last time I made one. Hoping you guys can help me. Could definitely use it. Thank You. Okay, so basically what I am trying to do but can't is get my random images to open like I set up my first image. Which would be in a new window as specified by my code. The first images join.png and button.png open how I want them to, It's just the random images I have that won't open. Hopefully you guys can guide me in the right direction. Thank You. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>test</title> <link href="style.css" rel="stylesheet" type="text/css" /> <script language="javascript" type="text/javascript"> var win=null; function NewWindow(mypage,myname,w,h,scroll,pos){ if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;} if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;} else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20} settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'; win=window.open(mypage,myname,settings);} </script> </head> <body> <center> <p><img src="images/Banner.png" width="484" height="86" /></p> <p><a href="blahh.php" onclick="NewWindow(this.href,'mywin','800','500','no','center');return false" onfocus="this.blur()"><img src="images/button.png"/><a href="blah.php" onclick="NewWindow(this.href,'mywin','800','500','no','center');return false" onfocus="this.blur()"><img src="images/join.png"/> </p> <script language="JavaScript"> <!-- function random_imglink(){ var myimages=new Array() //specifies random images myimages[1]="images/m_cfb7815dc1124a19afd0200898f1ea38.jpg" myimages[2]="images/example.jpg" //specify corresponding links to images var imagelinks=new Array() imagelinks[1]="http://www.example.com" imagelinks[2]="http://www.example.net" var ry=Math.floor(Math.random()*myimages.length) if (ry==0) ry=1 document.write('<a target="_blank" href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" height="90" width="90" border=0></a>') // specifies link } random_imglink() //--> </script> </center> </body> </html> Hello experts, I have a code like this Code: <form method="POST" action="/irj/portal?NavigationTarget=ROLES:...CourseRegistration" onsubmit = "top.location.href=this.action"> <input type="image" src="http:..register.gif" alt="Submit button"> </form> This works fine. I need the same functionality for a URL! How should I do this. I tried Code: <a href="/irj/portal?NavigationTarget=ROLES:....course_desc" onsubmit = "top.location.href=this.action">Course Descriptions</a> This does not work like the button above. Any ideas are appreciated. Thanks Srinivas When using <a href="" target="_blank"> is there a way to specify the size and title of the new browser window? Is there a way to get rid of the browsing buttons as well so it's just a pop-up window...? Or is there another HTML way to do this? GrampsEd here ?#1 Can I think or look at a Table and a menuh-container as the same thing but used for different things where the ( menuh= the text or links ) the ( Tr=Lu ) and the ( Td=LI ) if so. ?#2 Where can I find all of the properties I can use for the ( menuh Li ) tag in the CSS part. or can I just put properties in the ( LI tag ) just like you do in the ( TD tag ) in the html body part of the page. Also please tell me if I need to ask ?? in a different forum. Thanks Hi guys, i tried looking for help on tihs issue but could not find any. the problem is this: I have an image that is viewed in landscape. i want to make this printable, but when i print it, half of this landscape image is printed in portrait mode. is there any way i can set the print properties so that when the user goes to File>Print it will show the normal print options, and actually print in landscape? Thanks. i want to change this object (player) properties PHP Code: <center> <object id="Player"> <param name="URL" value="www.site.com/media.avi" ref> <param name="fullScreen" value="1"> </object> i know there is a way to do this for example PHP Code: <a onclick="if (Player.playState == 3)Player.fullScreen = '1';"> to change the fullscreen mode but i need to change the URL value |