Skip navigation
Currently Being Moderated

Url parameter flips to other tabbed panel

Jun 21, 2012 6:22 AM

Tags: #php #dreamweaver_cs5 #tabbed_panels

I have a url parameter that fills in form fields in an update record form to be edited. The URL parameter and form are in the same tabbed panel. But when the url is clicked it jumps to the default tabbed panel. The url parameter is linked to the form ID which is #updateRTM.

 

here is the url -

 

<li><a href="insertRTM.php?Property_id=<?php echo $row_rsSelectProperty['Property_id']; ?>#updateRTM"><?php echo $row_rsSelectProperty['property_name']; ?></a>

          </li>

 

I am not a programmer so rely on dreamweaver to perform most tasks

can anyone help?

 
Replies
  • Currently Being Moderated
    Jun 21, 2012 11:56 AM   in reply to Steve Joiner
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 5:33 AM   in reply to Steve Joiner

    please supply a link to your site.

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 9:43 PM   in reply to Steve Joiner

    I have had a look at the markup and apart from the fact that #TabbedPanels1 is not required in the link, I do not see a problem. The resultant URL should look like

    insertRTM.php?Property_id=XX&tab=XX

    Personally, I would go a different way to show the data and that is to use SpryDataSet's. That way you do not have to refresh the page whereby there is no issue at all. Another advantage is that the data will only be retrieved once, saving band width.

     

    The idea is to read the data from the database, convert that to XML (or HTML if this is more convenient), create a SpryDataSet and use that data in your web page. A similar process is used here http://ncca.com.au/index.php?mod=events.

     

    This http://linecraft.com/spry_data_utils/index.php is a nifty tool that can help you.

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 24, 2012 6:51 AM   in reply to Steve Joiner

    I still do not have the SQL file, but if you go the SpryDataSet way you will be pleasantly surprised.

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 24, 2012 7:54 AM   in reply to Ben Pleysier

    In lines 335-338, remove the highlighted because these are already included in $currentPage

    <li><a href="<?php printf("%s?pageNum_rsSelectProperty=%d%s", $currentPage, 0, $queryString_rsSelectProperty); ?>&amp;tab=1#TabbedPanels1">First</a> </li>

    <li><a href="<?php printf("%s?pageNum_rsSelectProperty=%d%s", $currentPage, max(0, $pageNum_rsSelectProperty - 1), $queryString_rsSelectProperty); ?>&amp;tab=1#TabbedPanels1">Previous</a></li>

    <li><a href="<?php printf("%s?pageNum_rsSelectProperty=%d%s", $currentPage, min($totalPages_rsSelectProperty, $pageNum_rsSelectProperty + 1), $queryString_rsSelectProperty); ?>&amp;tab=1#TabbedPanels1">Next</a></li>

    <li><a href="<?php printf("%s?pageNum_rsSelectProperty=%d%s", $currentPage, $totalPages_rsSelectProperty, $queryString_rsSelectProperty); ?>&amp;tab=1#TabbedPanels1">Last</a></li>

    The same goes for lines 280-283.

     

    The site looks and feels good!

     

    When you give me the OK I shall remove all files from my system.

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 24, 2012 8:59 AM   in reply to Steve Joiner

    In addition to the above, add the highlighted in lines 268-269

    <li class="TabbedPanelsTab" tabindex="0"><a href="<?php echo $currentPage ?>?tab=0" onclick="window.location=this.href;return false;">Insert Property</a></li>

    <li class="TabbedPanelsTab" tabindex="0"><a href="<?php echo $currentPage ?>?tab=1" onclick="window.location=this.href;return false;">Update Property</a></li>

    Gramps

     

    PS You also need to get rid of the anchor (#TabbedPanels1) to stop the page from jumping around

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 24, 2012 9:29 AM   in reply to Steve Joiner

    Line 331

    <li><a href="insertRTM.php?Property_id=<?php echo $row_rsSelectProperty['Property_id']; ?>&amp;tab=1#TabbedPanels1"><?php echo $row_rsSelectProperty['property_name']; ?></a> </li>

    Gramps

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points