Jump to content

jeeves245

Members
  • Posts

    145
  • Joined

  • Last visited

Posts posted by jeeves245

  1. Hi all,

     

    I got out of the web development game years ago and am now work in a completely different field. I use Wix to manage my website, mainly because it's quick and easy. 

     

    However I now want to create my own website outside of Wix so I don't have to be tied to their servers anymore. But I want to use an editor that has that simple drag & drop functionality that Wix has. I don't have the time to play with code anymore, so just need something really simple to use.

     

    Can anyone suggest a good offline WYSIWYG drag and drop editor? Would be much appreciated :)

  2. Hey guys,

     

    I have a quick question.. it's probably quite simple but I can't figure it out.

     

    I've used one of the built-in templates in Dreamweaver CS4 to design a basic website. What I need to do is insert some text in the grey box on the left side (see attachment). Clicking on it to insert text as usual doesn't work, and I can't insert a new div tag there.

     

    Any ideas?

     

     

     

    [attachment deleted by admin]

  3. Hey guys i'm having a bit of trouble with a script... it's just some basic form validation but I can't get it working (I click submit and it submits even if nothing is in the text boxes).

    The name of the form is "form1" and in the form tags I am putting "onsubmit="return validate_form(this);"

     

    Here is the main code, which I am putting between the head tags:

     

    function validemail(email) 
    {
    invalidChars = " /:,;"
    
    if (email == "") {
    	return false;
    }
    for (i=0; i<invalidChars.length; i++) {
    	badChar = invalidChars.charAt(i);
    	if (email.indexOf(badChar,0) > -1) {
    		return false;
    	}
    }
    atPos = email.indexOf("@",1);
    if (atPos == -1) {
    	return false;
    }
    if (email.indexOf("@",atPos+1) > -1) {
    	return false;
    }
    periodPos = email.indexOf(".",atPos);
    if (periodPos == -1) {
    	return false;
    }
    if (periodPos+3 > email.length)	{
    	return false;
    }
    return true;
    }
    
    //This function will validate a form
    function validateForm(form1)
    {
    
        if (form1.name.value == "")
      {
      alert("Please enter your name to proceed!");
      form1.name.focus();
      return false;
      }
        if (form1.comments.value == "")
      {
      alert("Please enter a message to proceed!");
      form1.comments.focus();
      return false;
      }
          if (!validemail(form1.email.value))
      {
      alert("Please enter a correct Email address!");
      form1.email.focus();
      return false;
      }
    
      return true;
    }

     

    Any ideas appreciated. :)

     

  4. Your CSS and JavaScript should be in external files anyways.

     

        <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />

     

    Use that code to reference a .css document you place in a folder called CSS. Switch over to code view and copy all your CSS tags into a single external one. Its going to help with loading times and prevent any weird problems that might come up with multiple <style>s.

     

     

    The JavaScript should be separate too probably. Same thing as before, place all the code inside the <script language="JavaScript1.4" type="text/javascript"> into an external .js file. Then make sure you reference it in your code.

     

        <script type="text/javascript" src="scripts/ca_signup.js"></script>

     

     

    Having external files for JavaScript and CSS will prevent the browser from having to download EVERYTHING each time a user views a page.

     

    Hope this all makes sense.

     

    So I did all that. It all works fine when I view the website on my local computer.. but as soon as I upload it to my host, the CSS isn't loading properly and the fonts/sizes etc are all wrong.

     

    Do I need to reference the CSS and javascript files in a different way? At the moment I have them in CSS and scripts folders like you said.

  5. No worries. I know a lot of other people have the same problem. Writing code is one thing but designing decent graphics and a nice layout is another thing all together  :shrug:

     

    Dorky - thanks for the comment. As I said, I used a WYSIWYG editor so the extra style tag was created by the editor itself. Do you think it'd be a good idea to manually take it out?

     

     

  6. I know you said opinions about the layout, but I am wondering about this: "I have had a lot of experience with [...] web development (HTML, PHP and SQL)"... you clearly don't, you even admitted "I'm not a pro or anything so i've just used a WYSIWYG editor".

     

    I have had a lot of experience with the above but i'm absolutely useless at design so I just use a WYSIWYG editor for any kind of front end work.

     

    Thanks for the comments.

     

     

  7. Hey guys,

     

    i'm just after some opinions on my website.. just the layout etc. I'm not a pro or anything so i've just used a WYSIWYG editor. Any comments/suggestions appreciated.

     

    www.otbcomputers.co.nz

     

    Thanks in advance :)

  8. Variables definitely contain values.

    Are you 100% positive?

     

    Try:

    echo "Name: " . $name . " | E-mail: " . $email . " | Comments: " . $comments . "";

     

    I'm 100% positive.

     

    And that line didn't work.

     

    I guess I should probably be more specific about the code, as it may make a difference. It's part of code used to send an e-mail.

     

    Here are the bits that matter:

     

    $body = "Name: $name | E-mail: $email  | Comments: $comments ";
    if (mail($to, $subject, $body, $headers)) {
      echo("sent");
    } else {
      echo("failed");
    }

     

    The rest of the code works just fine, it's just not taking the variables...

  9. Hey guys, hopefully this is an easy one...

     

    In this line, the variables are not echoing out. The script runs without error though.

    echo "Name: $name | E-mail: $email | Comments: $comments";

     

    So I tried surround them with "" like so:

    echo "Name: "$name" | E-mail: "$email" | Comments: "$comments"";

     

    I get the error:

    Parse error: syntax error, unexpected T_VARIABLE in /var/www/vhosts/mputers.co.nz/httpdocs/process.php on line 13

     

    Anyone know the correct way to write that line? Variables definitely contain values.

     

    Cheers

  10. I have an existing script that uploads and processes a CSV file. But I was thinking it might be a good idea to let PHP do the conversion from XLS to CSV as well as upload it. Does PHP have a function to handle this?

     

    Thanks.

  11. I can give you a way on how to avoid this. But I'd rather not, Because since I haven't seen the file myself I don't know what's going on for sure.

     

    Are you sure of the file content?

     

    I'm positive of the file content. I'll give you an example of the file. Let's assume that this is the file (i've censored out address and customer details for privacy reasons).

     

    16/07/2009,customername,170880,1,address1,"address2, address3",,0.10

    16/07/2009,customername,170936,1,address1,"address2, address3",,0.91

    16/07/2009,customername,170942,1,address1,address2,address3,0.09

     

    So if I uploaded this using the script I posted above, the bottom line is put into the database twice.

  12. You mean in the future? You are wondering if it would add a row twice again in the future? Didn't get you ^^ didn't you just solve your problem ? XD

     

    Yes, solved the problem. But I just ran the script again and a new problem turned up. It is adding the last line of the CSV file into the database twice for some reason. I was just wondering if you might have any idea why :)

  13. Thanks for that :)

     

    Although I just thought of a better way I think...

     

    What if I take $parts[2] that should ALWAYS have a value in it, and make the for loop like

     

    for ($parts)

        if ($parts[2] != 0)

              continue;

     

    So if $parts[2] does NOT equal 0 (i.e. it DOES have a value), continue. Would that work?

×
×
  • 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.