Results 1 to 9 of 9

Thread: Too Much PHP/JavaScript / Killed My Page

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Too Much PHP/JavaScript / Killed My Page

    I have this page http://www.australianairtours.com.au...test_email.php, which was previously working fine until I added some new code which I got from this example http://www.sws-tech.com/scripts/tellafriend.php, GREAT script but doesn't appear to work on my page... I have also lost a fair bit of my JavaScript functions... Any ideas?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You don't have "sendemail.php." Also, it's quite difficult to debug something that isn't there.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    You don't have "sendemail.php." Also, it's quite difficult to debug something that isn't there.
    Hi There,

    Well I have added the email code, and now my random images don't load... In the header I have 5 images which are meant to load but adding the email code killed it...

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Works fine for me.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, everytime I add the code below:

    Code:
    <!--
    function newWindow(mypage,myname,w,h,features) {
      if(screen.width){
      var winl = (screen.width-w)/2;
      var wint = (screen.height-h)/2;
      }else{winl = 0;wint =0;}
      if (winl < 0) winl = 0;
      if (wint < 0) wint = 0;
      var settings = 'height=' + h + ',';
      settings += 'width=' + w + ',';
      settings += 'top=' + wint + ',';
      settings += 'left=' + winl + ',';
      settings += features;
      win = window.open(mypage,myname,settings);
      win.window.focus();
    }
    to this page http://www.australianairtours.com.au...test_email.php, it kills my randome image loader and kills the css on my site. The complete code of this page is here http://www.australianairtours.com.au...test_email.txt

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I don't see that code in there anywhere... you need to put it *in* the page so I can see what you're doing wrong.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok here is the code, just didn't put it in because it kills the page and wasn't sure where it would go: http://www.australianairtours.com.au...l_all_code.txt and here's what it does to the page: http://www.australianairtours.com.au...l_all_code.php

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    HTML Code:
    <script language="JavaScript">
    <!--
    function newWindow(mypage,myname,w,h,features) {
      if(screen.width){
      var winl = (screen.width-w)/2;
      var wint = (screen.height-h)/2;
      }else{winl = 0;wint =0;}
      if (winl < 0) winl = 0;
      if (wint < 0) wint = 0;
      var settings = 'height=' + h + ',';
      settings += 'width=' + w + ',';
      settings += 'top=' + wint + ',';
      settings += 'left=' + winl + ',';
      settings += features;
      win = window.open(mypage,myname,settings);
      win.window.focus();
    }
    </script>
    You never close that SGML comment delimiter. In fact, you should remove the opening one as well; it hasn't been necessary for a long time.

    As you can see from the forum's HTML highlighter, this has the effect of commenting out all the code down to the end of the next <style> element, which has a matching close-comment delimiter.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    May 2006
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    My site did the same thing. Even killed my buttons.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •