SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 42 of 42
  1. #26
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some more progress was made, as it's now looking for a HTML thank you page I'm assuming I place this HTML page within a nested DIV or how can I have it be loaded on the same ID ?

    I'd like the page to show the thank you page for 3-4 seconds then redirect to another ID on the same page.

  2. #27
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    You don't need to change anything else in your construction page now.

    Create a separate file called thank-you.html and put it in the same folder as your construction file.

    If you want it to redirect, add:
    Code:
    <meta http-equiv="refresh" content="4;url=http://www.mysite.com/mypage.html">
    somewhere within the <head></head> elements on the thank-you.html page. Then replace 4 with the number of seconds you want to wait, and replace the URL with the URL of the page you want to redirect to.

  3. #28
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I wanted to place the thank-you.html within a ID I assume the code would be as follows:
    <meta http-equiv="refresh" content="4;.thankyou>
    Page Updated ! Causing Error!

  4. #29
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    Not quite.

    The page you go to for the thank you is specified in your PHP, specifically this line:
    Code:
    Location('thank-you.html');
    If you want to go to a different page, change that URL.

    If you want to go to your thank-you page and then redirect to another, you'd set that page in your meta redirect. You need the whole filename (preferably including the domain).

  5. #30
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How come the page doesn't load, odd ?

  6. #31
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no way to have the thankyou page load within a class?

  7. #32
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    There is, but it's much easier to put it in a separate file...

  8. #33
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want it within a class within an ID on my page, but stumped on how it works. When I create the class the page doesn't load. I created a class called .thankyou with a simple H1 tag.

  9. #34
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    The thing you put in your meta is the FILE it's in.

    How is the server going to know which class it is on your server if it doesn't know where to look?

    Also, you can't reference a class like that, only IDs.

  10. #35
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The thing you put in your meta is the FILE it's in.
    I know the HTML file is in the meta !?!?

    How is the server going to know which class it is on your server if it doesn't know where to look?
    The class is on the same page ?

    Also, you can't reference a class like that, only IDs.
    Oh ok I'll change it to an ID.

  11. #36
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    Change the class to an ID and you can add #id-name at the end of HTML in the refresh, so you get something like:
    http://www.mysite.com/mypage.html#my-id

  12. #37
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It worked, but it didn't load within the ID I specified.

  13. #38
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sam, adding the ID after the HTML is not working in the Location ?
    Code PHP:
    header('Location: thank-you.html#Contact');

  14. #39
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    Does it redirect you to the page at all?

    Are you sure the ID is set on what you are trying to go to (and that it's not a class or something)?

  15. #40
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It redirects me to the HTML page but it doesn't place the HTML page within the ID which is correctly placed !

  16. #41
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    The underlying problem is that the areas of your page that are hidden and revealed by clicking the menu items are not directly accessible by URL, nor do Back and Forward buttons allow moving between them.

    It's not caused by PHP. More javascript/jQuery scripting is needed to enable this, something like jQuery hashchange event. If you encounter difficulties with this, try the Javascript forum.

  17. #42
    Non-Member
    Join Date
    Jan 2008
    Location
    N43 44.4824', W079 13.9408
    Posts
    2,220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the heads up that it wasn't related to PHP, but rather the scripts in the page. I will head over to the Javascript forum to peruse this problem


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
  •