Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About rodb

  • Rank
  1. Thanks for the help. Did not even think of the properties in the image tag. Just trying to make things harder than they are. Rod
  2. Sorry for not being to clear. Basically if the image is large (say 460 by 480) or larger, I would like to display it as a 180 by 200 (for example). I have no control over what size the image supplied by users will be but would like display them in a fix area on the screen. Hope that explains things better.
  3. Thanks for the reply. The image does show as indicated. However, what I am trying to do is restrict the area where the image is to show. That is why I was using the plugin which is to resize the image to the desire container. In this case want to limit the width to 2 columns wide. I may have to come up with a may to insure the image does not exceed a specific width. Is there a way to have the image to display in a restricted area? Rod
  4. I am trying to set a panel height to display an image. The section of code being used is : <div class="col-md-2"> <div class="panel panel-default"> <div class="panel-body"> <img class="scale" data-scale="best-fill" data-align="center" src="<?php echo $imagedir . '/' . $person['image'] ?> "> </div> </div> </div> I am using a jquery plugin (image-scale.min.js) to resize an image to be displayed in the panel. However the panel has a width of 'col-md-2' but I can not seem to set a height. When the image is displayed the panel is only one row in height therefore I can only get the very top of the image. I have tried creating some css styles to set the height but must be doing something wrong: example of css. .image-container div{ height: 200px; width: 200px; border: 1px solid black; } and it is applied as follows: <div class="panel-body image-container"> help would be greatly appreciated. Rod
  5. I have not found the issue with tab controls. I am using the Toggable/Dynamic Pills example from Bootstrap. From what I see the code appears to be working. When I click any of the pills the proper panel appears and data can be modified (mainly working on the pReceipts panel). When the add new receipt button is triggered the data is added to the database. After the update the main screen appears and the other pills can be selected with proper panels being displayed. So I guess I do not see what you have seen. I do pay attention and try to verify code anytime the experienced members spot something. I am learning and may not find the issue as quickly as liked. I responded to each reply as soon as possible. I am continuing to look for the tab problem Rod
  6. The redirect function is in my library and defined as: function redirect($url, $permanent = false) { if (headers_sent() === false) { header('Location: ' . $url, true, ($permanent === true) ? 301 : 302); } exit(); } Is there a tutorial on dynamically outputting the class as active and changing the default active link as not active. I am trying to learn more on making the app user friendly. I think I will have to do more in javascript based on the command when the page opens. The current page will have at least four panels that are access through the nav-pill navigation. It works with basic functionality by clicking on the various nav-pill options. However, after the user makes changes on one of the panels and submits the changes, I would like the user to automatically see the changes on the panel.
  7. I appreciate the inputs however I am getting the same result. Still shows the default form vs the pReceipts form. I replaced the redirect command with the header command with the appropriate bookmark.
  8. I have tried the page.php#bookmark approach but still do not get the desired results. Here is the command that I am using: redirect('edit_project.php?id='.$project['id'].'#pReceipts', false); which evaluates to edit_project.php?id=1#pReceipts still returns to the active defined nav-pill option #pData
  9. I am using Bootstrap to setup navigation. I have setup a menu scheme on the page that will display different forms for data entry. The nav-pill is a button that causes a specific section (form) to be displayed. After the user enters data (new entry or updates) and submits the data to the database I would like to refresh the page in the specific form so the user would see the changes in the data (verification). Currently when the redirect command is executed the default view is displayed. Thus the user would have to re-select the appropriate button to re-display the edited form. Hope that explains what I am trying to do.
  10. Good morning & Happy New Year. I am fairly new to PHP and am having issue. The issue is trying to redirect back to current page to a specific nav-pill after adding a new record to the associated MYSQL table. My nav-pills are defined as follows: <div class="container"> <ul class="nav nav-pills nav-justified"> <li class="active"><a data-toggle="pill" href="#pData">Project Data</a></li> <li><a data-toggle="pill" href="#pReceipts">Project Receipts</a></li> <li><a data-toggle="pill" href="#Tasks">Tasks</a></li> </ul> </div> After posting a new receipt I would like to redirect back to #pReceipts pill to show the new entry. I think I need some js to handle the redirect but can't seem to get it. The current redirect command is if($result && mysqli_affected_rows($con) == 1){ $session->msg('s',"Receipt Added "); redirect('edit_project.php?id='.$project['id'], false); } else { if (!$err_num) { $session->msg('d',' Error adding receipt!'); redirect('edit_project.php?id='.$project['id'], false); } else { $session->msg('d',' Error adding receipt!'); redirect('edit_project.php?id='.$project['id'], false); } } This works but always show the active defined nav-pill. Not sure how to redirect to a specific nav-pill. Are there any good examples to accomplish the desired effect? Trying to to refresh or redirect to the currently displayed view. Rod
  11. Thanks everyone, I found the problem. Typo in first line of comments of js file, missing '/';
  12. I am trying to hide and show fields based on the value of the "age" field. The idea is when the user selects an age of less than 13 then the "parentPermission" fields will display and will hide if age is 13 or above. I just noticed that I attached the wrong "showhide" file. The correct one is listed here. =================================== ** * File: js/showhide.js * Author: design1online.com, LLC * Purpose: toggle the visibility of fields depending on the value of another field **/ $(document).ready(function() { toggleFields(); //call this first so we start out with the correct visibility depending on the selected form values //this will call our toggleFields function every time the selection value of our underAge field changes $("#age").change(function() { toggleFields(); }); }); //this toggles the visibility of our parent permission fields depending on the current selected value of the underAge field function toggleFields() { if ($("#age").val() < 13) $("#parentPermission").show(); else $("#parentPermission").hide(); } ===================================== I am trying this code as a test for experimenting prior to trying the same approach in my main application. The main app will not use age put using an "id" field to determine what additional information is needed from the user. Thought it would be better to put js script in separate files that would be included in the header or footer php files. Rod
  13. I am new at using javascript files. Currently I am trying to test a concept but can not seem to get the system to call the jscript functions. Attached is the main PHP file (Test Hide/Show Fields) and the js file (showhide.js). If I embed the js file in the main php things appear to work but when separate they don't. The extension of js file has been changed to txt to allow upload. TestHideShow.php showhide.txt any suggestions would be greatly appreciated. Rod
  14. Thanks for the reply. I am using notepad++ but get confused with the left bar indicating the start and stop of a segment. Went thru code and laid it out with consistent tabs which helps ( but the red line on the left does not match. WIll not rely on it in the future.
  15. I am building a page that has multiple tabs for entering data about a person/employee. Currently I am using 4 tabs(pills) which for the most part appears to work with a small issue. When the page is initially displayed the personal data page, everything looks correct. When the Social Media tab is selected the personal data screen is cleared and the social data is displayed. However, when the Tasks page is displayed it is displayed below the page (either Personal data or Social Media) the is currently displayed. Can not seem to locate why the screens are not cleared and only showing the selected page. Another minor issue if close the container (line 89 ) at line 96 the display is full width; however, if closed at the end of the tab-content section the display is narrow. Any suggestions would be greatly appreciated. Rod edit_person-new.php
  • 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.