Jump to content

markwill2112

Member
  • Posts

    21
  • Joined

  • Last visited

Everything posted by markwill2112

  1. I have been working on converting an .asp script connected to a webform I inherited to PHP. I think I have done it, but am confused by these lines in the old .asp script: <% ON Error resume next set email=Server.CreateObject("JMail.Message") How would these translate in PHP? Are they necessary? I hve copied them at the top of the PHP script below (lines 2 and 3). <? ON Error resume next set email=Server.CreateObject("JMail.Message")[/color] $email->Logging=true; $email->From="edudevfacmedcourses@imperial.ac.uk"; $email->FromName="On-Line Booking"; $email->AddRecipient("edudevfacmedcourses@imperial.ac.uk"); $email->subject=strtoupper($_POST["surname"]).", ".$_POST["workshop_title"].", ".$_POST["nhsjobtitle"].", ".$_POST["division"].", ".$_POST["nhstrust"].", ".$_POST["hospitalorganisation"]; $email->body="______________________________________________________\r\n"; $email->body.="WORKSHOP DETAILS\r\n"; $email->body.="______________________________________________________\r\n"; $email->body.="Title:".$_POST["workshop_title"]."\r\n"; $email->body.="Date:".$_POST["workshop_date"]."\r\n"; $email->body.="Teaching Imperial students:".$_POST["teachingstudents"]."\r\n"; $email->body.="\r\n"; $email->body.="______________________________________________________\r\n"; $email->body.="PARTICIPANT DETAILS\r\n"; $email->body.="______________________________________________________\r\n"; $email->body.="CID:".$_POST["cid"]."\r\n"; $email->body.="Probationer lecturer:".$_POST["prob_lect"]."\r\n"; $email->body.="Probation end date:".$_POST["probation_expiry"]."\r\n"; $email->body.="Title:".$_POST["participant_title"]."\r\n"; $email->body.="Forename:".$_POST["forename"]."\r\n"; $email->body.="Surname:".$_POST["surname"]."\r\n"; $email->body.="NHS Job title:".$_POST["nhsjobtitle"]."\r\n"; $email->body.="NHS Trust:".$_POST["nhstrust"]."\r\n"; $email->body.="Hospital/Organisation:".$_POST["hospitalorganisation"]."\r\n"; $email->body.="Division:".$_POST["division"]."\r\n"; $email->body.="Department and/or Speciality:".$_POST["department"]."\r\n"; $email->body.="Telephone number:".$_POST["tel_no"]."\r\n"; $email->body.="Email:".$_POST["email"]."\r\n"; $email->body.="Work address:".$_POST["work_address"]."\r\n"; $email->body.="Special requirements:".$_POST["requirements"]."\r\n"; $email->body.="\r\n"; $email->body.="______________________________________________________\r\n"; $email->body.="PAYMENT DETAILS\r\n"; $email->body.="______________________________________________________\r\n"; $email->body.="Payment name:".$_POST["payment_name"]."\r\n"; $email->body.="Payment address:".$_POST["payment_address"]."\r\n"; $email->body.="Payment telephone number:".$_POST["payment_telno"]."\r\n"; $email->body.="Payment email:".$_POST["payment_email"]."\r\n"; $email->Send["mhs-relay.ic.ac.uk"]; $email->close; if ((Err->Number > 0)) { header("Location: http://www.imperial.ac.uk/edudev/bookingforms/formfailure"); // WARNING: assuming Err is an external function } else { header("Location: http://www.imperial.ac.uk/edudev/bookingforms/formsuccess"); } ?>
  2. Apologies - my previous question was rubbish and not clear (even to me)! Is it possible to use two server-side .asp scripts in the same webform and use an if statement in the form to send form submissions via one of the two scripts based on choices from a drop-down menu? Basically I have a drop-down list of course choices in a web form. If I select course A from the drop-down list, I want the completed form submission to be sent via .asp script number 1. If I select course B, I want the completed course submission to be sent via .asp script number 2 and so on for different course choices from the list. Is that possible? I tried to create an if statement using the following two scripts, but it just kept sending to the first .asp script and ignored the second one. action="http://www.imperial.ac.uk/ict/services/website/cms/help/edudev/emailfom.asp" method="post"> action="http://www.imperial.ac.uk/ict/services/website/cms/help/edudev/emailnonfom.asp" method="post">
  3. I am a JavaScript beginner and am teaching myself - slowly. I have managed to create two web forms that each when submitted post an .asp form that is in turn emailed to one of two email addresses (I inherited these so didn't create them originally but I have been modifying them). There are two such web forms. When submitted, one posts one .asp form to one email address and the other to another address. What I want to do is only have one web form instead of two and when particular choices from a drop-down list are chosen, that will post one of two .asp forms to the correct address. The code for one of the forms is here: https://fileexchange.imperial.ac.uk/files/fb905b49d27/Form.html I have copied below a section of the code from the above .html file. If e.g. 'A Practical Introduction to Problem Based Learning (PBL)' is selected from the list below, I want the form to post to this: action="http://www.imperial.ac.uk/ict/services/website/cms/help/edudev/emailfom.asp" method="post"> If e.g. 'Approaches to Teaching in Clinical Settings' is chosen from the list, I want the form to instead post to: action="http://www.imperial.ac.uk/ict/services/website/cms/help/edudev/emailnonfom.asp" method="post"> The two .asp files are here: https://fileexchange.imperial.ac.uk/files/16d72adf49/emailfom.asp https://fileexchange.imperial.ac.uk/files/ca24e268aab/emailnonfom.asp What do I add to the script to make it do the above. I assume I need to use if (condition) {action1} but I have not been able to work it out. <script type="text/javascript" type="text/JavaScript"><!-- function setOptions(chosen) { var selbox = document.edudevcoursesbookingform.workshop_date; selbox.options.length = 0; if (chosen == "select the workshop title...") { selbox.options[selbox.options.length] = new Option('Please select a workshop first',' '); } if (chosen == "A Practical Introduction to Problem Based Learning (PBL)") { selbox.options[selbox.options.length] = new Option('Select workshop date',''); selbox.options[selbox.options.length] = new Option('19 September Waiting List','19 September Waiting List'); } if (chosen == "Approaches to Teaching in Clinical Settings") { selbox.options[selbox.options.length] = new Option('Select workshop date',''); selbox.options[selbox.options.length] = new Option('Contact EDU','Contact EDU'); } if (chosen == "Giving Feedback and Formative Assessment") { selbox.options[selbox.options.length] = new Option('Select workshop date',''); selbox.options[selbox.options.length] = new Option('27 June 2012','27 June 2012'); } if (chosen == "Managing Challenging Groups in Problem Based Learning") { selbox.options[selbox.options.length] = new Option('Select workshop date',''); selbox.options[selbox.options.length] = new Option('Contact EDU','Contact EDU'); } if (chosen == "Portfolios in the Faculty of Medicine") { selbox.options[selbox.options.length] = new Option('Select workshop date',''); selbox.options[selbox.options.length] = new Option('Contact EDU','Contact EDU'); } if (chosen == "Teaching and Learning in the Faculty of Medicine") { selbox.options[selbox.options.length] = new Option('Select workshop date',''); selbox.options[selbox.options.length] = new Option('17 July Waiting List','17 July Waiting List'); } } //--> </script>
  4. Is this done with javascript and Flash, i.e. moving things around the screen with the mouse on a webpage? http://www.bbc.co.uk/doctorwho/dw/funandgames/d11s02e01_jigsaw_01?category=jigsaws On a similar theme, how is this drawing with the mouse done on a webpage?
  5. AWESOME! That did the trick. Many thanks! I see now how it can be done from your post. Excellent!
  6. Hello All, Could you possibly take a look at the attached code for me? I have made a number of fields 'required fields' so that if they are not filled in, a message pops up on the webform saying they have to be completed...until all required fields are filled, after which the form can be submitted. I have included 'First Name' and 'Surname' in the 'value' list of required fields. However, if I leave them blank on the form and fill in everything else, the form can still be submitted and there is no prompt saying that those two are required, even though there should be. What am I doing wrong? Why are 'First name' and 'Surname not included as required fields? Thanks Mark Required_fields_java.html
  7. I have created a small header image in Photoshop. It consists of a background with a number of layers using blue and grey (the grey is RGB: 202, 202, 202). I placed the image in InDesign and then converted to press quality PDF for printing. In InDesign I have also created a number of shapes (rectangles with rounded corners) which I have made the same grey colour (202, 202, 202). On the screen everything looks the same grey, however, when I convert to a PDF and print, the grey in the image I placed from Photoshop looks a completely different grey colour to the rectangle shapes I created in InDesign with the same background colour. The grey colour I am using for everything is 202, 202, 202. I have checked Adobe Bridge colour synching and it says my creative suite colours are synchronized using 'Europe General Purpose 2' Why when I print are there completely different shades of grey?
  8. I send out regular e-newsletters. Obviously I had to revert to tables to send via Outlook 2007 because of Microsoft's leap back to the dark ages! Here is the web version of one I sent out today: http://www.imperial.ac.uk/edudev/newsletters/FacMed_prog_2010-11.html I basically create the webpage in Dreamweaver using tables so the formatting doesn't go awry, view it in the browser and click file > send page by email. This 'embeds' the page in the email and I also include a link to the webpage in case Outlook throws a wobbly! Could Outlook cope with fancier e-newsletters this way? E.g. could I 'embed' flash, hover over thumbnails etc etc Basically I am always looking at ways to improve them and jazz them up. Any suggestions and/or advice on how I could improve these 'embedded' e-newsletters would be most welcome.
  9. markwill2112

    Floaters

    I hope so then I can stop using tables!
  10. markwill2112

    Floaters

    Excellent resources! Thanks so much. Yes, sadly I had to revert to using tables for my e-newsletters that I send in Outlook!
  11. markwill2112

    Floaters

    I added the following to a style sheet I am working on: img.floatLeft { float: left; margin: 4px; } img.floatRight { float: right; margin: 4px; } I then added e.g. <img src="image.jpg" class="floatLeft"> <p>Text...</p> to the body of the css to wrap text around an image. It worked fine and looked great in the browser. However, when I embedded the code in Outlook to send as an email as I do regularly with my CSS e-newsletters the 'floating' images formatting went awry. Is this an overflow:auto issue, i.e if I add this to my stylesheet will it lock the 'floated' images in place or is it something else causing them to move and formatting get messed up when sending in the body of the email?
  12. I'd never heard of suckerfish. Dropdown is what I know, but I think of that more of an 'old-fashioned' type, but I gues yes it is the same things just a modern spin on it. I was just thinking whether they had a name for when it appears 'out of thin air' so to speak in this 'up-to-date- way.
  13. All - worked like a dream by the way. It is great to understand why instead of just getting someone to do the code for me. I have now created some new pages using the autoflow auto and know whay I am doing it and how it works - pefect! Thanks for the help!
  14. Quick question: what is this type of menu referred to as - when you hover over a link and another menu with links appears? I am working on one and am looking for some code ideas to develop further what I have created to date. This is an example of the kind of menu I am referring to: http://www.pielframa.com/menu_smartphone_cases.htm
  15. Apologies for the dealy - been away! I sure was! Thanks for sharing the info everyone - perfect!
  16. Can anyone give me any tips or point me the right direction of tutorials to create hover over thumbnails in CSS that enlarge when you hover over them and then open to full size when you click on them. I basically want to create thumbnails of some images similar to the ones that Google Images now uses that enlarge slightly when you hover over the thumbnails and then open to full size in a new window when you click on them, or to a bigger size with the option to enlarge them to to full size if large images. Thanks Mark
  17. Sorry to be such a dumbass, but what does 'down below instead of alongside the red links' mean?
  18. Many thanks for that and the explanation -that make sense. Could you posisbly give an example of how it would look in the code?
  19. Hello Everyone, My first post on this excellent forum. I hope someone can help me - apologies for the long post. I am having problems with IE/Firefox compatibility. I have read that it is best to design pages to look right in Firefox and not as I have been doing in IE and then expect them to show properly in Firefox. I believe I am doing something wrong with my <Div> tags as the formatting of the following page looks perfect in IE but is messed up in Firefox and there is also e.g. a vertical dotted line missing when viewed in Firefox. The page is: http://www3.imperial.ac.uk/edudev/workshops/otherworkshops We use a content management system here at work and I go in and copy the html to Dreamweaver and work on it there and then copy and paste when I am done. I do not have control over the header or right hand pane. The code for the main content is as follows (see below). Can someone explain what is missing or what is in the wrong order that is causing the formatting to be wrong in Firefox and for the top shadow line not be centred and for the vertical dotted line to be missing. I did blindly move a <Div> tag around and the vertical line magically appeared but was longer and badly formatted. If possible, I would like to know or be pointed in the right direction to learn the fundamentals behind what I am doing wrong. I don;t really just want the correct code that I can copy and paste, but more to understand why it isn't working properly so I can do it right in the future on other pages: <div class="generic-content-block"> <h1>Specific Teaching Skills Workshops</h1> </div> <!-- OPEN TWO COLUMN BLOCK --> <div class="column-wrapper with-top-shadow"> <div class="two-col-block"> <div class="col"> <ul class="link-list"> <li> <h4><a href="../../../edudev/workshops/otherworkshops/assessingstudentlearning">Assessing Student Learning</a></h4> </li> <li> <h4><a href="../../../edudev/workshops/core/communicatingknowledge">Communicating Knowledge</a></h4> </li> <li> <h4><a href="../../../edudev/workshops/otherworkshops/designingcurriculaandlearning">Designing Curricula and Teaching</a></h4> </li> <li> <h4><a href="../../../edudev/workshops/otherworkshops/interactivegroupteaching">Interactive Group Teaching</a></h4> </li> <li> <h4><a href="../../../edudev/workshops/otherworkshops/issuesandtechniquesforoneoffteachingsessions">Issues and Techniques for One-off Teaching Sessions</a></h4> </li> </ul> </div> <div class="col"> <ul class="link-list"> <li> <h4><a href="../../../edudev/workshops/otherworkshops/laboratoryteaching">Laboratory Teaching</a></h4> </li> <li> <h4><a href="../../../edudev/workshops/otherworkshops/usingfeedbacktoenhancestudentlearning">Using Feedback to Enhance Student Learning</a></h4> </li> </ul> </div> </div> </div> <!-- CLOSE TWO COLUMN BLOCK --> <div class="generic-content-block"> <h2>Enquiries</h2> <p>If you wish to discuss your choice of workshops before booking, please <a title="contact us link opens in a new window" href="mailto:edudevcourses@imperial.ac.uk" target="_blank">contact us</a></p> </div>
×
×
  • Create New...