Jump to content
Killersites Community

markwill2112

Member
  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

0 Neutral

About markwill2112

  • Rank
    Member
  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. markwill2112

    'If' to send an email

    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. markwill2112

    How was this created?

    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. markwill2112

    Required Fields not all working on webform

    AWESOME! That did the trick. Many thanks! I see now how it can be done from your post. Excellent!
  6. markwill2112

    Required Fields not all working on webform

    No I lied - still not working.
  7. 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
  8. 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?
  9. markwill2112

    e-Newsletters in Outlook 2007

    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.
  10. markwill2112

    Floaters

    I hope so then I can stop using tables!
  11. 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!
  12. 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?
  13. markwill2112

    What do you call this type of menu?

    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.
  14. markwill2112

    Firefox to IE or IE to Firefox - compatibility problems

    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!
  15. markwill2112

    What do you call this type of menu?

    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
×