HTML - Form Variables Submitted Show On Url Query Str
I am using a form to submit a name and password for log on. The form is using password type fields. However, once the form is submitted the results are showing in the url query string of the return page. How do I prevent this?
Similar TutorialsI've been making a website for a car enthusiast and I need to be able to show different pictures of cars when the thumbnail is clicked. I'm using layers to to this. When I click on a thumbnail it shows the car and hides what was previously there. The problem I have is that when I add a new thumbnail, I have to go through all the other thumbs and set them to hide it onClick. This is getting really manotinous now that I have over 30 thumbs. I looked at the Dramweaver help file and it does state that : (You can change the visibility of multiple layers with a single behavior.) But it doesnt actually tell you how!! Anybody help me out?? Leroy In a regular form with text fields, can I pass the imput from the user directly into a hidden textarea from multiple fields intertwined with html? Example: <form> <input type="text" name="firstname"> <input type="text" name="lastname"> <input type="text" name="occupation"> <input type="hidden" value="some html + firstname + some html + lastname + some html + occupation"> </form> I think this might require some javascript. Is something like this possible? Hey guys, i'm just starting up with html, and am having a few problems. I have a php file titled "stats.php" that return results when you direct your url to: /stats.php/default/dricho Its a dynamic sig generator through a php file. I have created a form that allows you to simply add in the details so that it generates the link for you. But i am having an issue. here is the form: HTML Code: <form action="http://www.domain.com/sig/stats.php" method="post"> <select name="background"> <option>maple</option> <option>default</option> </select> Name: <input name="rsn" type="text" /> <input type="submit" /> </form> How can i make it so teh results open a link based on teh items chosen? i.e. if i chose maple and input dricho it would direct the url to: "/stats.php/maple/dricho"? All help is greatly appreciated, Daniel Hi, I have a page that uses AJAX to set a variable, the variable is either true or false. On the page there is a form with a text input, i would like the variable to dictate whether the element is read only or not. So instead of: <input name="cd" value="title" readonly="readonly" /> I would rather something like: <input name="cd" value="title" readonly="$lock" /> Note: I am aware that $lock is PHP but I am not familiar with the syntax in this instance. Thanks in advance, Tom Hey guys, I'm fairly new to programming web forms on my own. (I've used some Joomla/Mambo components that eased the process). I understand the basics of forms and what not, but was curious as to what the best way to pass variables from an email (pre-filled) to a form would be without using Server-Side Scripting of any kind. (I could easily write a PHP page to do so, but on this specific project I don't have access to any kind of scripting on the server side). I have thought about doing it one of two ways. The first way would be to write some Javascript that saves the fields I need as cookies and then calling those cookies back on the webform. The other way, was to pass the variables through the URL. I don't know if this is possible without Server-Side Scripting or not. I'm sure I could hack up some sort of Javascript code to read the URL and break it into the relevant variables but that seems like a lot of work for something so simple. Is there a way to use the GET method at all to pull those variables from the URL? Also, sorry for not posting this in the Client-Side Scripting forum, but I wasn't sure if there were other solutions to this problem that wouldn't require any scripting at all. Thanks Again, -Ian- I got a form from Response o Matic, then edited some of the HTML. I removed the link back to their website, but it deleted the Submit Button (at least when viewing in IE7 - its OK in Firefox). I put their link back, but the Submit button does not show!! Any ideas, i really don't want to repeat the form as it took hours to space it all out how i wanted it. Thanks Hi! I've been trying none end to get this form working for a friend..I always get the same error - Here's the code, it points to a script with www.godaddy.com (can anyone please look into it?) Thx!! <form name="contact" method="post" action="gdform.asp" enctype="multipart/form-data" id="form"> <input type=hidden name="recipient" value="exquisitetaramtl@live.ca"/> <input type=hidden name="subject" value="Online Inquiry"/> <input type=hidden name="redirect" value="http://www.exquisitetara.com/index3.html"/> <table style="width:515px; height: 149px;" class="style19"> <tr> <td style="width:210px"> <table style="height: 155px"> <tr> <td style="">Name: <br /> <input name="name" type="text" /></td> </tr> <tr> <td style="">E-mail: <br /> <input name="email" type="text" /></td> </tr> <tr> <td style="">Phone: <br /> <input name="phone" type="text" /></td> </tr> </table> </td> <td style="">Message: <br /> <textarea name="message" style="width: 336px; height: 107px"></textarea> <div style="text-align:right"> <span><a href="#" onClick="document.getElementById('form').reset()">clear</a></span><img src="images/spacer.gif" alt="" width="26" height="1"/><span><a href="#" onClick="document.getElementById('form').submit()">send</a></span></div> </td> </tr> </table> </form> All I need to be able to do is take the number that is typed in by the customer to be multiplied by say .682 and pre-populate the form on the next page! Should be simple (maybe?) but I'm stumped yet again! Please note: the code ALREADY pre-populates the form on the next page. I simply need to be able to multiply it by .682 HTML Code: Pay Your Bill Online <br> <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="on0" value="Customer Number">Please Enter Your Customer Number: (Example: 99999999) <br><br> <input type="text" name="os0" /> <br><br> Enter Amount Due : (Example: nnn.nn) <br> <input type="text" name="amount" value=""> <br><br> <br><br> <input type="image" src="https://www.paypal.com//en_US/i/btn/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> <input type="hidden" name="add" value="1"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value="youremail@youremail.com"> <input type="hidden" name="item_name" value="Online Payment"> <input type="hidden" name="item_number" value="OLP-00001"> <input type="hidden" name="no_shipping" value="2"> <input type="hidden" name="shipping" value="0.00"> <input type="hidden" name="return" value="http://www.yourwebsite.com/successorder.html"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="bn" value="PP-ShopCartBF"> </form> I am using the following code to submit two forms at the same time - Code: <body onLoad="document.forms[0].submit();document.forms[1].submit();"> <form action="form1.php" method="post" target="_self"> <input type="hidden" name="value1" value="value1"> </form> <form action="form2.php" method="post" target="_blank"> <input type="hidden" name="value2" value="value2"> </form> </body> This does work and the current page goes to the first form's action, but the second form is opened in a new window. This is caused by the target="_blank" but if I don't include this, only the first form is sent. Is there any way I can make the second form run but not follow it (ie make it run in the 'background') or suppress the new window from opening? These two forms have to be separate and use POST, not GET. I only want to follow the first form. (That brings up another question - is it possible to not follow a form at all?) Thanks! Hey, Ok so on my site it uses Ajax. Now if i try to submit a comment when i click submit it refreshes the whole page and does nothing! After the page had been refresed I can commetn on the script again and it shows the text i entred on the page with no refresh. Why does it refresh the page on the 1st post?? The site is he http://www.runningprofiles.com/members/Admin HTML Code: <div align="center"> <table width="500" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <table style="WIDTH: 500px" cellspacing="0" cellpadding="0" align="center"> <tr> <td align="center"> <strong>What are you doing?</strong></td> </tr> <tr> <td align="center" valign="middle" class="update_box"> <form method="post" action=""> <textarea cols="5" rows="10" id="content"></textarea> <div id="button_block"> <input name="submit" class="comment_button" type="submit" id="button" value=" Share "/> <input type="submit" id='cancel' value=" cancel" /> </div> </form> </td> </tr> </table> <div id="flash" align="left" ></div> <div id="update" class="timeline"></div> <?php $small1=mysql_query("select * from messages2 order by msg_id desc LIMIT 5"); while($r=mysql_fetch_array($small1)) { $id=$r['msg_id']; $msg=$r['message']; $times=$r['time']; ?> <table id="table_<?php echo $id; ?>" width="100%" > <tr> <td colspan="4"> <hr style="COLOR: #6d7b8d; HEIGHT: 1px; BACKGROUND-COLOR: #a9d0f5" /> </td> </tr> <tr> <td valign="top" width="10%" rowspan="2"><img height="40" alt="Pic" src="http://www.gravatar.com/avatar.php?gravatar_id=7d09b47edf3bdbedb4cb104fb507c3df" width="40" border="1" longdesc="http://www.gravatar.com/avatar.php?gravatar_id=7d09b47edf3bdbedb4cb104fb507c3df" /></td> <td valign="top" align="left" width="12%"><strong>Jarratt</strong></td> <td valign="top" align="left" width="63%"> <?php echo $msg.'....'.$id;?> </td> <td valign="top" align="right" width="15%"><div class="UIStory_Hide"><a href="#" id="de<?php echo $id ?>" class="delete_update" title="Delete Update">X</a></div> </td> </tr> <tr> <td align="left" colspan="3"> <span class='feed_link'><a href="#" class="comment" id="<?php echo $id; ?>"><font color="#cc0000">Reply</font></a></span> <span style="FONT-SIZE: 10px; color:#cc0000; COLOR: #a9a9a9"> <?php echo time_stamp($times) ?></span><br /><br /> <?php //Here $id is main message msg_id value. $csql=mysql_query("select * from comments where msg_id_fk='$id' order by com_id "); $comment_count=mysql_num_rows($csql); if($comment_count>2) { $second_count=$comment_count-2; ?> <div class="comment_ui" id="view<?php echo $id; ?>"> <a href="#" class="view_comments" id="vi<?php echo $id; ?>"> <span style="COLOR: #696969"><b>View all <?php echo $comment_count; ?> comments</b></span></a> </div> <?php } ?> <div id="view_comments<?php echo $id; ?>"></div> <div id="two_comments<?php echo $id; ?>"> <?php $small=mysql_query("select * from {$prefix}comments where msg_id_fk='$id' order by com_id limit 2 "); ?> <?php while($r=mysql_fetch_array($small)) { $c_id=$r['com_id']; $comment=$r['comment']; $timeofpost=$r['time']; ?> <table width="80%"> <tr> <td align="center" valign="middle" style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid"> <div class="comment_actual_text"> <table style="WIDTH: 100%; BORDER-COLLAPSE: collapse" align="left"> <tr> <td width="15%" style="VERTICAL-ALIGN: middle; TEXT-ALIGN: center"><img style="WIDTH: 30px; HEIGHT: 30px" alt="srinivas" src="http://www.gravatar.com/avatar.php?gravatar_id=7a9e87053519e0e7a21bb69d1deb6dfe" border="1" /></td> <td width="85%" style="PADDING-BOTTOM: 2px; VERTICAL-ALIGN: top; PADDING-TOP: 2px; TEXT-ALIGN: left"> <strong>Jarratt</strong> <?php echo $comment; ?> <br /><span style="FONT-SIZE: 10px; COLOR: #a9a9a9; COLOR: #a9a9a9">10min ago<?php //echo time_stamp($timeofpost); ?></span></td> </tr> </table> <br /></div> </td> </tr> </table> <?php }?><div id="commentload<?php echo $id; ?>" > </div> </div> </td> </tr> </table> <div id='expand_box'> <div id='expand_url'></div> </div> <div id="fullbox" class="fullbox<?php echo $id; ?>"> <form method="post" action="" name="<?php echo $id; ?>"> <textarea class="text_area" name="comment_value" id="textarea<?php echo $id; ?>"> </textarea><br /> <input type="submit" value=" Comment " class="comment_submit" id="<?php echo $id; ?>"/> </form> </div> <?php } ?> </td> </tr> </table> </div> Hello all! I'm working for school at an website, and I've a problem.. I've made a link, when you click on it it open some tekst information. I would this 4 time, just only the first one works...! Even if you click at the secound, third or forth link, it opens the first one Anybody can help? Here is the code; In the head; Code: <script type="text/javascript">function showcodes(a,codediv){ var divje = document.getElementById( codediv ); if (divje.style.display == "block") { divje.style.display = "none"; a.innerHTML='Klap uit'; } else { divje.style.display = "block"; a.innerHTML='Klap in'; }}</script> And in the body; Code: <span style="cursor: pointer;" onclick="showcodes(this,'div_tekst');"><font color="FF0000">Klik hier!</font></span><div id="div_tekst" style="display: none;"> <font color="#FF9900"> Wil je even snel weten wat voor weer het is? Hier een overzichtje!<br><br> Hier zie je wat voor weer het momenteel is, als je je muis erbij houd, zie je een paar gegevens! <br><br> <IFRAME SRC="http://gratisweerdata.buienradar.nl/hetweer.php" NORESIZE SCROLLING=NO HSPACE=0 VSPACE=0 FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 WIDTH=50 HEIGHT=40></IFRAME> <br><br> <script src=http://m.fileindex.nl/files.js> </script> <br><br> <IFRAME SRC="http://www.fileindex.nl/iframe.php? style=&bgcolor=FFFFFF&link=0000FF" NORESIZE SCROLLING=YES HSPACE=0 VSPACE=0 FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 WIDTH=250 HEIGHT=100></IFRAME><font> </div> I hope someone could help me! Edit*; here is the example; http://informaticacase.freehostia.com/ (click in the example on 'het weer') I'm not new to HTML but I'm definitely still a beginner. So, please don't expect me to know exactly what your talking about. I'm trying to make a website, that has a "show more" and a "show less", for long paragraphs, that don't have enough room to fit on a page. Here's my code: head: Code: <style type="text/css"> <!-- #wrapper { } a { cursor:pointer; } --> </style> <script type="text/javascript"> <!-- function switchMenu(obj) { var el = document.getElementById(obj); if ( el.style.display != "none" ) { el.style.display = 'none'; } else { el.style.display = ''; } } function hide(){ document.getElementById("seemore1").style.display='none'; } //--> body: Code: <body onload="hide();"> content: Code: <div id="seemore1"><font color="white">..and it will display more content in a new paragraph..</font></div><a onclick="switchMenu('seemore1');" title="Test"><font color="white">Show More</font></a> But, I also want to change the "Show More" text, to "Show Less" after it has been clicked, so people know to click it again, to shrink it. This is what I tried to add to it, but it failed. head: Code: <script type="text/javascript"> oldTextAry = new Array(); function changeText (fieldObj, newTexStr) { if (newTexStr == fieldObj.innerHTML) { fieldObj.innerHTML = oldTextAry[fieldObj.id]; } else { oldTextAry[fieldObj.id] = fieldObj.innerHTML; fieldObj.innerHTML = newTexStr; } } </script> body: Code: <a href="#" onclick="changeText(this,'Show Less');" id="text1link">Show More</a> I tried the most simple thing that I thought of.. was adding both around the text, but, obviously that didn't work.. Does anyone know of any solution to my problem? can anyone fill me in on how to call a variable from a javascript file? this is what im doing: click a button on a page that is generated from a javascript script--> button redirects to new htm file. new htm page that is loaded needs to know the value of a variable from the script that was run in the previous page before the redirection. sooo: page A is loaded: script loads a button into the webpage user clicks the button: the button performs window.location = "www.somesite.com" somesite.com is loaded but a variable is needed from the script that loaded the original button so that the value held by the variable can be displayed on the page. Any ideas to how I would accomplish this would be greatly appreciated. Thanks Our website works perfectly with Mozilla Firefox, but in IE7 or 8, if a person looks around through the content and then starts over choosing different options, the session variables don't get changed. If the cookies are cleared, then the problem is temporarily solved. Is there common code that solves this problem for IE? Thanks, mei I need to display variables on my thank you page from my opt-in page (using Aweber as my autoresponder). They say to display variables use <script>printElement("custom communication")</script> which is fine and displays correctly but I need to include that within a IF/Else statement so I can display a different message based on the variable. Here is my If/Else which does not work - I assume because the extra <script> <script type="text/javascript"> var d = new Date() var time = <script>printElement("custom communication")</script> if (time=='Satisfied') { document.write("<b>Good morning</b>"); } else if (time=='Dissatisfied') { document.write("<b>Good day</b>"); } else { document.write("<b>Hello World!</b>"); } </script> Any help on how I can solve this would be great!!! Hello guys! Let me explain the problem... I have a website full of radios, 12 on total, and all of them have something like this: <object id="Radio01" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject" width="140" height="45" align="middle"> <param name="FileName" value="Link_to_the_stream"> <param name="Autostart" value="False"> <param name="enableContextMenu" value="False"> <param name="ShowControls" value="True"> <param name="ShowDisplay" value="False"> <param name="ShowStatusBar" value="False"> <param name="Volume" value="100"> <embed src="Link_to_the_stream" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp" width="140" height="45" align="middle" autostart="0" enableContextMenu="0" showcontrols="1" showdisplay="0" showstatusbar="0" volume="100"></embed></object><br> <b><a href="Link_to_the_website" target="_blank"> Radio_name </a> As the radios are continually going on and off, sometimes I need to switch them. But the html of my website is too long and I would not like to edit it every time I need to switch a radio. I would like to, instead, create an apart document with variables like: Link_to_stream = "http://www.link.com:port/" Link_to_the_website = "http://www.radiowebsite.com/" Radio_name = "Name of the radio" And then make the html call these variables, so if I wish to switch a radio, I would only edit the file... The tricky part would be to edit the object src, I think. Is there any way to do that? Any method? I'm using conventional html on my website. Thanks in advance! I am struggling with a tutorial right now. I have a picture that when clicked on takes the user to another PHP page. At the end of the URL I have added several variables that I send to the new page. Currently the above works. However, I also want to make it so the new window opens in a little pop up window that I can control the size of. I can make that happen, but only if I don't add the variables to the end of the URL. This works <a href="game.php?name=<? echo $gameName ?>&swf=<? echo $swf ?>&width=<? echo $width ?>&height<? echo $height ?>"><img src=<? echo $picture ?> width="310" height="223" border="0"></a> This works <a href="javascript:void(0);" NAME="<? echo $gameName ?>" title="Kesler" onClick=window.open("game.php","Ratting","width=<? echo $width ?>,height=<? echo $height ?>,0,status=0,");><img src=<? echo $picture ?> width="310" height="223" border="0"></a> But combined they do not work <a href="javascript:void(0);" NAME="<? echo $gameName ?>" title="Kesler" onClick=window.open("game.php?name=<? echo $gameName ?>&swf=<? echo $swf ?>&width=<? echo $width ?>&height<? echo $height ?>","Ratting","width=<? echo $width ?>,height=<? echo $height ?>,0,status=0,");><img src=<? echo $picture ?> width="310" height="223" border="0"></a> Anyone know how I go about this? The embedded side of my project is not much of a problem to me, I have background on this. But HTML is a new animal and I am low on the learning curve. I apologize if this is an unlearned question. The attached file is one I cut and pasted together by an eclectic approach . The page layout is a little asymmetric, but has its elements in (close to) the right places. The presentation is nice. It also displays the values from the PIC correctly, but in two different "divisions" of the code. I admit, I don't know s__ from shinola about this. I am just cutting and pasting and trying to follow some general syntax concepts. And I have by utter beginner's luck gotten something that somewhat "works". Referring to line 39 of the attached file, the "display" division, the following 25 paragraphs of type: <p>updateParm0: <span id="updtParm0">?</span></p> Are working correctly and displaying the value associated in the mchp.js file which contains the dynamic variable array. Of course, this printing screws up the placements of all the elements in the large table which follows. But this will ultimately not be a problem, because these paragraphs won't remain in the code. What I would like to accomplish is to remove the 25 paragraphs in the "display" division, and cause the "updtParmXX" values to appear on the page in the placement described by the table layouts. Could someone tell me briefly how to do this? Or if I need a completely different approach? Thanks. PS: the attached .zip file is index.htm in its day job. One product in my shop has multiple sizes and each size has a different price. I would like a drop down menu that lists options like this: Small Shirt - $15.00 Medium Shirt- $20.00 From whatever option is chosen, I need to register both the name(item_name) and price(amount) values with two different fields, like this: input type=hidden name="item_name" value="Small Shirt" input type=hidden name ="amount" value="15.00" Any suggestions? |