Jump to content

bigkga

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bigkga's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ok, I have changed things around now and this is what I have done. Now my question is that I have the friend one working but cannot get a repeat with another question which has another question and has a second box that needs to come up. How do i achieve this. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <script language="JavaScript" type="text/javascript"> <!-- function SelectCng(sel,id){ document.getElementById(id).style.display=sel.selectedIndex==3?'':'none'; } //--> </script></head> <body> <form> <table border="1"> <tr> <td>Your Name </td><td><input type="text" name="Name" /></td></tr> <tr> <td>Email Address</td><td><input type="text" name="Email" /></td></tr> <tr> <td>First Time Here?</td><td><select size="1" name="First"> <option value="No">No</option> <option value="Yes">Yes</option> </select> </td> </tr> <tr> <td> How did you find us? </td> <td> <select size="1" name="Found_by" onchange="SelectCng(this,'Friend');" > <option value="Newspaper">Newspaper</option> <option value="Search Engine">Search Engine</option> <option value="Flyer">Flyer</option> <option value="Friend">Friend</option> </select> </td> </tr> <tr id="Friend" style="display:none;" > <td> Friends Name </td> <td> <input name="FriendName"> </td> </tr> </form> </table> </body> </html>
  2. Yes I did but it does not show the box on my site. It has a white background if that has any impact
  3. On my website it didnt This is how I seen it happening They select friend and then next to it another box shows where they put the name of the friend
  4. Here is the full extent of what I am wanting to do. When the person submits this an email is generated by what they put the in boxes for us <table> <tr><td>Your Name </td><td><input type="text" name="Name" /></td></tr> <tr><td>Email Address</td><td><input type="text" name="Email" /></td></tr> <tr><td>First Time Here?</td><td><select size="1" name="First"> <option value="No">No</option> <option value="Yes">Yes</option> </select></td></tr> <tr><td>How did you find us?</td><td><select size="1" name="Found_by"> <option value="Newspaper">Newspaper</option> <option value="Search Engine">Search Engine</option> <option value="Flyer">Flyer</option> <option value="Magazine">Magazine</option> <option value="Client">Current Client</option> <option value="Manager">Property Manager</option> </select></td></tr> Or am I trying to do too much with my table and adding additional boxes dependent upon an answer
  5. Thanks. It looks good but the second box does not come up. Do I put the whole lot in the middle of table or are there different areas each part should go? I guess I should have said I have a table which has a number of questions but this one line is in the middle of the table
  6. Thanks really appreciate. I am trying to figure it out but struggling. This piece also appears on my website now at the top of the table function checkFriendSelect(friendSelect) { document.getElementById("friendText").disabled = (friendSelect.value == "Friend") ? false : true; }
  7. This is what i have done with my coding <table> function checkFriendSelect(friendSelect) { document.getElementById("friendText").disabled = (friendSelect.value == "Friend") ? false : true; } .... .... .... <tr><td>How did you find us?</td><td><select size="1" name="Found_by"> <option value="Newspaper">Newspaper</option> <option value="Search Engine">Search Engine</option> <option value="Flyer">Flyer</option> <option value="Magazine">Magazine</option> <option value="Friend"<c:if test=${status.value == =='Friend'}"> selected="true" </c:if> id="friendSelect">Friend</option> </select> <select name="${status.expression}"class="select_long"id=""friendText" onchange="checkFriendSelect(this);"> What is wrong with that? Also was thinking I might need this to make my second box work <div class="hidden" id="Friend"> <input type="text" name="Referred_by_Friend" size="20"/></div>
  8. I am sorry but I am reasonably new to this and have tried doing what the article says but think I am getting it wrong Friend doesnt show as an option but selected="true" id="friendSelect">Friend shows in my first drop down box. Also the second box is there all the time and only 1 space wide. I need to make the second box wider and also have it appear only when friend is selected
  9. So what do i need to do to make the friend line show a box that comes and go based on that article? Is someone able to help me make the changes so that it refers to my friend line? I assume that this works within a table? function checkProbSelect(probSelect) { document.getElementById("otherProblemText").disabled = (probSelect.value == "Other") ? false : true; } ... <option value="Other" <c:if test="${status.value == 'Other'}"> selected="true"</c:if> id="otherSelect">Other</option> </select> <select name="${status.expression}" class="select_long" id="helpFormProblemType" onchange="checkProbSelect(this);"> Do i need this line that was also in the article textarea name="otherProblemText" id="otherProblemText" class="textarea_longest_half" disabled="true">${status.value}</textarea>
  10. Help please I am doing a form where I want the user to select an option in a table row and if a particular option is selected a second box appears beside the first drop down box where they can type in a answer What I have done so far is as follows <tr><td>How did you find us?</td><td><select size="1" name="Found_by"> <option value="Newspaper">Newspaper</option> <option value="Search Engine">Search Engine</option> <option value="Flyer">Flyer</option> <option value="Friend">Friend</option> It is the friend line that I want a second input line to show up for. I do not want a second box showing up for any of the other lines. Whatever the user inputs needs to be sent to me in an email. At this stage i can have the email showing flyer or friend etc but cannot get details of the referral Any help would be greatly appreciated
  11. Hi there Thanks for that answer. I now get this error message which is progress i think ../Uploads/bob/tv.jpg Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxxx/www/Scripts/uploader.php:13) in /home/xxxxxxxx/www/Scripts/uploader.php on line 24 Line 24 is header("Location: https://sexxxxxx.xxxxxxxx.net.nz/xxxxxxxnetnz/fileuploaded.php"); Any ideas?
  12. Does anyone know how I can solve this please
  13. I am having trouble with my file uploader on a webpage. Whenever I test it out I get the message that there is an error. I have separate uploads directory for the "client" so that person can upload. My uploader.php contains the following <?php require '/home/xxxxxxxxx/Includes/connect.php'; /* Assign variables from form */ $var1 = mysql_real_escape_string($_POST["leadon"]); $var2 = mysql_real_escape_string($_POST["client"]); $target_path = $var1 . $var2 . '/'; /*Create path to upload to*/ /* Add the original filename to our target path. Result is "uploads/filename.extension" */ $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); echo $target_path; if(move_uploaded_file($_FILES['uploadedfile']['name'], $target_path)) { /*If file successfully moved to directory*/ /* Send Email to us */ $to = "info@xxxxxxxxxxxx.net.nz"; $subject = "A File has been uploaded by " . $var2; $body = ""; $headers = 'From: info@xxxxxxxxxx.net.nz'; mail($to, $subject, $body, $headers); /* Once complete return to........ */ header("Location: https://xxxxxxxxxxxxxxxxxxxxxxxx/fileuploaded.php"); }else{ echo "There was an error uploading the file, please try again!"; } ?> My .htaccess file contains the following redirect /Clients/bob http://www.xxxxxxxxxxxxx.net.nz redirect /Clients/bob/ http://www.xxxxxxxxxx.net.nz RedirectMatch (.*)\index.php http://www.xxxxxxxxxx.net.nz <Files ~ "\.(in|sql|pdf)$"> order allow,deny deny from all </Files> bob is the client name. What is wrong with this? I think it use to work but not anymore.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.