DarkPrince2005 Posted March 22, 2008 Share Posted March 22, 2008 ok so here is my code. is there anyway that i can change the input type of the 4 textboxes at the bottom to something like a lable,i don't want users to be able to change the contents of the textboxes, but as soon as i disable the textboxes they don't seem to post their values to my php page. <html> <head> <title></title> <style> .scrollable { width: 700px; height: 90%; overflow: auto; background-repeat:no-repeat; } td{background-repeat: no-repeat; } a{color:"#3C00FF"; } </style> <script type="text/javascript"> function favBrowser() { var mylist=document.getElementById("myList"); if (document.getElementById("myList").selectedIndex=="1"){ document.getElementById("package").value=mylist.options[mylist.selectedIndex].text; document.getElementById("favorite").value="80"; document.getElementById("favorite1").value="250"; document.getElementById("favorite2").value=parseInt(document.getElementById("favorite1").value)+parseInt(document.getElementById("favorite").value); } if (document.getElementById("myList").selectedIndex=="2"){ document.getElementById("package").value=mylist.options[mylist.selectedIndex].text; document.getElementById("favorite").value="130"; document.getElementById("favorite1").value="250"; document.getElementById("favorite2").value=parseInt(document.getElementById("favorite1").value)+parseInt(document.getElementById("favorite").value);} if (document.getElementById("myList").selectedIndex=="3"){ document.getElementById("package").value=mylist.options[mylist.selectedIndex].text; document.getElementById("favorite").value="198"; document.getElementById("favorite1").value="250"; document.getElementById("favorite2").value=parseInt(document.getElementById("favorite1").value)+parseInt(document.getElementById("favorite").value);} if (document.getElementById("myList").selectedIndex=="4"){ document.getElementById("package").value=mylist.options[mylist.selectedIndex].text; document.getElementById("favorite").value="250"; document.getElementById("favorite1").value="250"; document.getElementById("favorite2").value=parseInt(document.getElementById("favorite1").value)+parseInt(document.getElementById("favorite").value);} if (document.getElementById("myList").selectedIndex=="5"){ document.getElementById("package").value=mylist.options[mylist.selectedIndex].text; document.getElementById("favorite").value="360"; document.getElementById("favorite1").value="250"; document.getElementById("favorite2").value=parseInt(document.getElementById("favorite1").value)+parseInt(document.getElementById("favorite").value);} } </script> </head> <body topmargin="0" bottommargin="0" rightmargin="0" leftmargin="0"> <center><table height="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="735" height="150" background="top.gif"> </td> </tr> <tr> <td width="735" height="32" background="nav.gif" valign="top"> <font size="2"> <b><a href="index.html">Home</a> | <a href="contact_us.html">Contact Us</a> | <a href="http://www.geekforce.co.za/geekhost_support.html">Support</a> | <a href="https://secure.konsoleh.co.za">Mail Login</a> | <a href=" http://dsl.wadns.net">ADSL Console</a> | <a href="terms.html">Terms & Conditions</a></font></b></td> </tr> <tr> <td width="735" background="main2.gif" align="center" valign="top"><br><div class="scrollable"> <table width="675"> <tr> <td valign="top"><br> </td> <td valign="top"><br> </td> <td valign="top" align="center"><form name="form1" method="post" action="new_domain_details.php"> <table width="650"> <tr> <td colspan="3"><font color="#3C00FF"><b><u><h3>Register a new domain: Step 1</h3></u></b></font></td> </tr> <tr> <td colspan="2"><font color="#FF6600">Please choose 3 domain names:</font></td> <td><input type="text" name="domain_name" size="35"> . <select name="domain_name_type"><option value=""></option> <option value=".co.za">co.za</option> <option value=".com">com</option> <option value=".net">net</option></select> </td> <td></td> </tr> <tr> <td colspan="2"> </td> <td><input type="text" name="domain_name1" size="35"> . <select name="domain_name_type1"><option></option> <option value=".co.za">co.za</option> <option value=".com">com</option> <option value=".net">net</option></select> </td> <td></td> </tr> <tr> <td colspan="2"> </td> <td><input type="text" name="domain_name2" size="35"> . <select name="domain_name_type2"><option></option> <option value=".co.za">co.za</option> <option value=".com">com</option> <option value=".net">net</option></select> </td> <td></td> </tr> <tr> <td colspan="3"> </td> </tr> <tr> <td colspan="2"><font color="#FF6600">Please select your hosting package:</font></td> <td><select id="myList" onchange="favBrowser()"><option value="">- SELECT -</option> <option value="Geek Entry">Geek Entry</option> <option value="Geek Micro">Geek Micro</option> <option value="Geek Icon">Geek Icon</option> <option value="Geek Value">Geek Value</option> <option value="Geek Pro">Geek Pro</option></select> </td> <td></td> </tr> <tr> <td colspan="3"> </td> </tr> <tr> <td colspan="3"><hr></td> </tr> <tr> <td colspan="3"><br> <table> <tr> <td colspan="3"><input type="text" name="package" size="22"></td> </tr> <tr> <td width="100"><b><font color="#FF6600">Monthly:</font></b></td> <td colspan="2" align="left"><input type="text" id="favorite" name="favorite" size="5"></td> </tr> <tr> <td><b><font color="#FF6600">Once Off:</font></b></td> <td colspan="2"><input type="text" id="favorite1" name="favorite1" size="5"></td> </tr> <tr> <td><b><font color="#FF6600">Total Due:</font></b></td> <td colspan="2"><input type="text" id="favorite2" name="favorite2" size="5"></td> </tr> </table><br> <center><input type="submit" value="Submit"></td> </tr> </table></form></div> </td> </tr> </table> </td> </tr> <tr> <td width="735" height="42" background="bottom.gif"> </td> </tr> </table> Quote Link to comment https://forums.phpfreaks.com/topic/97423-form-alternate/ Share on other sites More sharing options...
haku Posted March 23, 2008 Share Posted March 23, 2008 I don't get what your problem is. What do you want do do, what are you doing, what is actually happening, what do you want to happen? Quote Link to comment https://forums.phpfreaks.com/topic/97423-form-alternate/#findComment-498558 Share on other sites More sharing options...
DarkPrince2005 Posted March 23, 2008 Author Share Posted March 23, 2008 ok the 4 textboxes at the bottom have values that are generated by the choice made in the drop down box. I want to change their input type or something sothat they cannot be tampered with. I have tried to disable the textboxes but when they are disabled they don't seem to post their values to my php page. Quote Link to comment https://forums.phpfreaks.com/topic/97423-form-alternate/#findComment-498830 Share on other sites More sharing options...
haku Posted March 24, 2008 Share Posted March 24, 2008 set your input tag to be readonly: <input type="text" name="somename" value="somevalue" readonly="readonly" /> Quote Link to comment https://forums.phpfreaks.com/topic/97423-form-alternate/#findComment-499145 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.