HTML - Input Type-submit With Form Action=url Which Contains Index.aspx
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"> Similar TutorialsThe following common code is not working in Firefox (3.0.11). It works in Safari (4.02) and IE7. When I say not working, I mean that when I click the submit button, the address does not change to the form processing url: Code: <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="uploader.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="mp3file" type="file" /> <input type="submit" name="submit" value="Send File" /> </form> The file uploader.php does nothing, it is blank, I'm merely trying to establish communication. Once again, the code functions in IE and Safari so I dont think this is PHP related. Any idea why the "theuploadedfile" input is not displayed when the program comes in after the submit ? PHP Code: <?php print 'Post=<pre>'; print_r($_POST);print '</pre>'; // PROBLEM $_POST['theuploadedfile'] IS NOT DISPLAYED (the text one is) ?> <form enctype="multipart/form-data" action="<?php print $_SERVER['PHP_SELF']; ?>" method="post"> <br>File to upload <input name="status" type="hidden" value="submitted"> <br>A<input name="thetexttype" type="text" size="100"> <br>B<input name="theuploadedfile" type="file" size="100" > <br><input name="submit" type="submit"> </form> Hi guys, I'm trying to create a form which uploads an image from the user and saves it in the database. However with the code I have so far it seems the input isn't working. Any help would be appreciated. This is what I have: <html> <head><title>Store image into SQL Database</title></head> <body> PHP Code: <?php if ($_POST[submit]) { include("connect.php"); $data = addslashes(fread(fopen($_POST[form_data], "r"), filesize($_POST[form_data]))); $result=MYSQL_QUERY("INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) ". "VALUES ('$_POST[form_description]','$_POST[data]','$_POST[form_data_name]','$_POST[form_data_size]','$_POST[form_data_type]')"); $id= mysql_insert_id(); MYSQL_CLOSE(); } else { ?> HTML Code: <form method="post" action="imageupload.php" enctype="multipart/form-data"> File Description:<br> <input type="text" name="form_description" size="40"> <input type="hidden" name="MAX_FILE_SIZE" value="1000000"> <br>File to upload/store in database:<br> <input type="file" name="form_data" size="40"> <p><input type="submit" name="submit" value="submit"> </form> <?php } ?> </body> </html> Hi, Below is my line of input code where I pass a certain variable. What I want to know is - is it possible to leave that 'identifer' value out of the url string if a user does not enter anything in that field? It's for a hotel reservation system and if left blank, it causes an error. It works fine is a user enters a code though. Code: <input type="text" name="identifier" value="" style="width:70px; font-size:11px;" /> Any ideas? Thanks Hi guys - sorry for this dumb post but It's my first go at this. I am using a simple form to pull in a user name and add it to a URL. However, it is converting -]^ etc to HEX. code: <form name="input" action="http://www.eclive.org/shotdetails.aspx" method="get"> Username: <input type="text" name="user"> <input type="submit" value="Submit"> </form> If I input user name -]Sa^Bison it returns this: http://www.eclive.org/shotdetails.as...-%5DSa%5EBison I have tried method="post" and that does not even pass the input accross. If I type the URL in manually it works great and returns the results I want, as in http://www.eclive.org/shotdetails.aspx?user=-]Sa^Bison I know it's going to be obvious here but ... Any help appreciated!! Hi Experts, I have a form that is used to collect member information. After the members inputs the info and hits submit button it should redirect them to a Merchant site. Is it possible to have a dual action SUBMIT button on a form. For ex: Action -1) When the user clicks on a SUBMIT button the data gets saved to the database (which it does right now) Action -2) And at the same time redirect the user to merchant HTTPS Site for online payment processing .- How do I do this?? I want to incorporate the below code into the submit button as a secondary action. Code: <form action="https://www.myvirtualmerchant.com/VirtualMerchant/process.do" method="POST"> <input type="hidden" name="ssl_merchant_id" value="my_virtualmerchant_ID"> <input type="hidden" name="ssl_user_id" value="my_User_ID"> <input type="hidden" name="ssl_pin" value="my_PIN"> <input type="hidden" name="ssl_show_form" value="true"> <input type="hidden" name="ssl_test_mode" value="false"> <input type="hidden" name="ssl_invoice_number" value="???? PASS INVOICE"> <input type="hidden" name="ssl_transaction_type" value="ccsale"> <input type="hidden" name="ssl_amount" value="???????? PASS TOTAL $$$"> <input type="submit" value="Click Here to Complete Your Order - USE FORM BUTTOM"> </form> I would like to use one SUBMIT button for both actions. Thanks in advance for your help. Vinny My page contains several iframes and each contains a form. In IE (but not in FF), when I submit a form, the action page is shown in a new window. How can I make it so the action page is instead loaded inside the iframe? Sorry I didnt know what section to put this in, or if this is even the right webpage considering all I seen was html, xhtml and CSS (Ithink) but I'm looking to recreate http://freenew.net/index.html if I need to and was wondering if there was ANYWAY to find an already made one, or maybe if I could put this together using source code found online (I suck at programming). Ideas? Thanks so much I have the following tables coded in an e-mail which I send to new contacts to invite them to subscribe to our information network - there is more to the message but the rest seems to be working fine. When a contact receives the message and is just reading it, she or he can check the selections or the button to select the information category or the method of communication, but when she or he replies to or forwards the e-mail the selections disappear. Is there a way to retain the selections on the reply or forward? I also need this functionality for other e-mail requests. Any suggestions would be gratefully received. Please note: I am very much a novice and have inherited a lot of documents etc from my predecessor, i.e. the original e-mail is not of my own creation but one that I am attempting to modify to do what I need it to do. <TABLE class=resultscolor1> <TBODY> <FORM> <TR> <TD colSpan=5><BR> <DIV class=inputlabel1><FONT style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'" color=#0000ff size=4><B>Which of the following notices would you like to receive from GFTC? (Click to check a category; please select all that apply.) <BR></DIV></B></FONT> <TR> <TD vAlign=top><INPUT type=checkbox></TD> <TD><STRONG>Upcoming Courses & Events</STRONG></TD></TR> <TR> <TD vAlign=top><INPUT type=checkbox></TD> <TD><STRONG>GFTC Newsletter</STRONG> (Email editions in March & September. Print editions in June & December)</TD></TR> <TR> <TD vAlign=top><INPUT type=checkbox></TD> <TD><STRONG>Innovation Seminar Notices</STRONG> (events held for Members only; occasionally attendance is offered to Non-Members also; GFTC reserves the right to determine membership status)</TD></TR> <TR> <TD vAlign=top><INPUT type=checkbox></TD> <TD><STRONG>Industry Alerts</STRONG></TD></TR></FORM></TBODY></TABLE><TD colspan="5"><BR>How would you prefer to receive GFTC information updates? (Please select one.)<BR><BR> <DIV></DIV> <TABLE> <FORM> <TBODY> <TR> <TD><INPUT type=radio value="Email, Post" name=key4> </FONT>Email & Post<BR><INPUT type=radio value=Email name=key4> Email Only<BR><INPUT type=radio value="Fax, Post" name=key4> Fax & Post<BR><INPUT type=radio value=Fax name=key4> Fax Only<BR><INPUT type=radio value=Post name=key4> Post Only</TD></FORM></TR> </TBODY> </TABLE> Hi What is wrong with this, it can't post text only post checkbox <html> <head> </head> <body> <FORM action="http://localhost:8182/items" method="post"> <P> <LABEL for="firstname">First name: </LABEL> <input type="text" value = "Hamada" id="firstname"><BR> <LABEL for="lastname">Last name: </LABEL> <input type="text" value = "I hate my life" id="lastname"><BR> <LABEL for="email">email: </LABEL> <input type="text" id="email" value = "I hate you"><BR> <INPUT type="radio" name="sex" value="Male"> Male<BR> <INPUT type="radio" name="sex" value="Female"> Female<BR> <input type="submit" value="Submit"> <INPUT type="reset"> </P> </FORM> </body> </html> Thanks Hi, I have got an anonymous emailer service but i want to change the input type into a drop down menu, How can I do this Here is my Code: Code: <!--Email Sender--> <h3>Your Email</h3> Select your email address from the list, Enter Subject, Then enter your text (use the additional header if you want). <div style="display: block; width: 1px; height: 10px;"><spacer type="block" width="1" height="10"></div> <form method=post action="https://riot.eu.org/cgi/remailer.cgi"> <label for="to" accesskey="r"></label> E-mail address:<br> <input TYPE="text" SIZE="20" NAME="to" id="to" MAXLENGTH="60"> <div style="display: block; width: 1px; height: 4px;"><spacer type="block" width="1" height="4"></div> Subject:<br> <input TYPE="text" SIZE="20" NAME="subject" MAXLENGTH="60"> <div style="display: block; width: 1px; height: 4px;"><spacer type="block" width="1" height="4"></div> Additional header (CC:,Bcc:,Newsgroup:..):<br> <textarea name="header" rows=3 cols=30></textarea> <div style="display: block; width: 1px; height: 4px;"><spacer type="block" width="1" height="4"></div> Message Text:<br> <textarea name="message" rows=10 cols=30 wrap=virtual></textarea> <div style="display: block; width: 1px; height: 6px;"><spacer type="block" width="1" height="6"></div> <div style="display: block; width: 1px; height: 8px;"><spacer type="block" width="1" height="8"></div> <input type="submit" value="Send" class="button"> </form> <div style="display: block; width: 1px; height: 20px;"><spacer type="block" width="1" height="20"></div> <table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td background="i/hr.gif"><div style="display: block; width: 1px; height: 1px;"><spacer type="block" width="1" height="1"></div></td></tr></table> <!--end Email Sender--> Thanks Hi, I'm novice in webpage creating, and i have this kind of problem : I'm creating a webpage, where users could post some kind of a comment... I don't know did i choose rigth, but i'm using "input type="text" ...> users write there a comment, and press submit button. This comment is sent to mysql database and saved there, after submiting it. Next step is placing it in a webpage. It works, but ot that way as i want. A problem is : I've added a code like <input type="text" style="650px; height:150px" name="msg"> Input area is about height of 7-8 rows. I want that it worked like this : user types a text, and when it reaches the end of a line, cursor jumpt to the beneath row. Now, user is writing everything in one row, and when it reaches the end - scrollbar apear on the bottom. I would like that scrollbar would apear then, when user reaches the bottom of the input area. Moreover - i would like that user could press the ENTER button, to jump to next row. Now, when he does this - submit button is activated, and a written text is sent to the database. Should i use CSS? or ... i'm really green here, and don't know what to do .. hope anypne will answer to my SOS call Hi all, I've created a simple login with some free code i found online. I wanted to change the login button to an image, just for aesthetics, but no matter what i try, it wouldnt work - the form does make sure i'm entering the right user & password, but once i do enter them, i get the same page with an empty form. (if i try the original type="button" code, it works just fine) I've been googling it for hours, with no results... i've tried anything and everything. ANY help would do :-) this is the code: <script language="javascript"> <!--// function pasuser(form) {if (form.id.value=="1") {if (form.pass.value=="1") {location="MainPage.htm"} else {alert("Invalid Password")}} else {alert("Invalid UserID")}} //--> </script> these are the buttons: WORKING BUTTON: <input type="button" value="Login" onClick="pasuser(this.form)"> NOT WORKING BUTTON: <input type="image" value="Login" onClick="pasuser(this.form)" src="Materials/Login.png" alt="Login" /> i have seen alot of place on web that sometimes programmers are using :- <input type="button" / > and sometimes <input type="button" > Is there any difference between the two? What is correct way of using <input> tag, is it with end slash '/' or not ? Hi, Is there any way to have more than one action script in a form? Thanks in advance! Geetha I 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 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> Hi, Is there any way to have more than one action script in a form? Regards, Geetha 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> 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 |