Author Topic: [SOLVED] advforecast2.php won't go back to page  (Read 1413 times)

0 Members and 1 Guest are viewing this topic.

Offline swanriver

  • Member
  • *
  • Posts: 3
[SOLVED] advforecast2.php won't go back to page
« on: March 20, 2012, 05:30:24 PM »
Hello and thank you for an awesome script, specifically advforecost2.php. I am using it on a local harbormasters association website. I have it on it's own page within the site, specifically
Code: [Select]
http://(IP address)/~cihma/index.php?page=weather (apologies as I don't want to share the IP address with the entire world just yet).

Everything is working wonderfully, except for the drop down menu. When I select a different forecast from the drop down menu, the browser goes to:
Code: [Select]
http://(IP address)/~cihma/index.php?z=0, when I need it to go to:
Code: [Select]
http://(IP address)/~cihma/index.php?page=weather&z=0#advforecast
I can usually figure these types of problems out on my own, but I'm coming up short today. Searched this message board for a couple of hours, but still, sadly, nothing. I was wondering if anyone has had a similar problem, and how you may have handled it? I would truly appreciate any suggestions, as it seems I am having a major brain cramp.  #-o Thank you!
« Last Edit: April 13, 2012, 01:51:21 PM by swanriver »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: advforecast2.php won't go back to page
« Reply #1 on: March 20, 2012, 06:19:24 PM »
It's usually quite difficult to debug only using the description of the issue, but it seems you need a persistent page=weather argument on the URL to ensure it's return.

Try changing in advforecast2.php
Code: [Select]
     <form action="" method="get">
to
Code: [Select]
     <form action="index.php?page=weather" method="get">
and see if that fixes the issue.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline swanriver

  • Member
  • *
  • Posts: 3
Re: advforecast2.php won't go back to page
« Reply #2 on: March 21, 2012, 04:28:24 PM »
Hello Ken and thank you for your advice. I believe you are right on track. I tested this but unfortunately couldn't get it to work. I believe the problem is with my CMS system and the way that it handles the URL. However, I think I have a solution to the problem. Just need to test it and we certainly let you know the results.

Again, thank you. I am truly grateful.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: advforecast2.php won't go back to page
« Reply #3 on: March 21, 2012, 05:54:48 PM »
Yes, CMS systems can fiddle with the URL in unexpected ways.. good luck, and we await the results of your testing :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: advforecast2.php won't go back to page
« Reply #4 on: March 22, 2012, 06:21:48 AM »
What CMS are you using? I was going to try Contao but decided against it and just doing it on my own again...

Offline swanriver

  • Member
  • *
  • Posts: 3
Re: advforecast2.php won't go back to page
« Reply #5 on: April 13, 2012, 01:49:14 PM »
Back at it again after an extended break.

I was in development and wasn't using the domain name for the URL, but was using an address to the folder on my server. So, that threw everything off right there. Once I switched the name servers in the domain name account, and then changed the config settings within my CMS to use what is called "Pretty URLs", it came together nicely and worked fine.  :-)

For those not familiar with Pretty URLs: When using a CMS, sometimes the system will create an address that looks something like this:
Code: [Select]
http://domainname.com/index.php?page=mypagename.php (where "domainname.com" would be your domain name and "mypagename.php" would be the page. Obvious, I know, but I want to be clear.)

If you change some settings in the config file (and possibly the .htaccess file) your system will change the way it spits out the address so it will look something like this:
Code: [Select]
http://domainname.com/mypagename Hence the Pretty URLs name.

And to the person who asked what CMS I am using, it is CMS Made Simple for this particular website, but I also use WordPress. Both systems have their good and bad points, but I can usually get them to work the way I want.

Again, a great big thank you! I should have thought of this on my own but was obviously having some kind of brain cramp.  :oops:

Cheers!

 

anything