Dynamic Menu Bar In A Frame - Controlling Frames In Php?
I have been using in a lot of websites a script that creates a menu bar but
avoids that the button to the current page can be clicked.
I am rather satisfied with it (although suggestions for better ways of doing
things are welcome, the script follows below FYI)
No there is a a problem that for a new site (www.orkestbasic.nl/nieuw) the
menu with the links has to be placed in a separate frame because the right
part of the page must be scrollable. So the check wether a button has to be
a link or not cannot be done anymore with checking PHP_SELF as I am used to
do.
I am thinking of making all the links to something like <a href =
"main.php?content=songlist">
then main.php would be a frameset with something like <frame name =
"content" src = "<?php echo "$content.php"?>">
In the left frame I could do a similar thing with a small modification to
the createlink function (see below) I often use.
But I would like to know if there are more elegant suggestions for it. Could
not find really good tips on google. Thanks for any help
FYI This is the function I have been using until now.
function mvwMaakLink($omschrijving, $verwijzing, $separator = "",
$aHrefClass = "", $noHrefClass = "")
{
$locatie = $_SERVER['PHP_SELF'];
//link to the current page, no need for clicking on
it
//echo $locatie;
if (strstr($locatie, $omschrijving))
{
$beginTag = "";
$slotTag = "";
if ($noHrefClass != "")
{
$beginTag = "<span class = "$noHrefClass">";
$slotTag = "</span>";
}
echo "$beginTag$verwijzing$slotTag";
}
else
{
$beginTag = "<a ";
if ($aHrefClass != "")
{
$beginTag .= "class = "$aHrefClass" ";
}
$beginTag .= "href = "$omschrijving">";
echo("$beginTag$verwijzing</a>$separator");
}
}
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
PHP & Frames; Why Is The Full PHP Code Displayed In Frame?
Having completed a whole stack of PHP files, tested them (worked fine), I now have to let these pages be displayed in my client's website. But said client has done his website in frames. When I put in code like: <frame name="main" src="myphpfile.php" > what get's displayed in that frame is the full php code Example: echo $name instead of the actual name so the browser is not sending the code to PHP first, it seems. How do I fix this? I presume it's not a matter of, you can't have frames in a PHP/MySQL site.
Frames To Display Menu Options
I am just starting web development after a long break (6 years). Last time I was developing frames were often used to display menu options on the side of the page. I was wondering as frames seem to be no longer used how would a menu bar on the left hand side of the website and possibly a bar along the top would be achieved in a php site?
Dynamic Menu CSS
I am trying for a long time now, to find a way of creating a dynamic drop down menu. I have the CSS part ready and working and also I have the first level of the menu working. the problem I have is how can I submit the id from the first level menu in order to make the query and create the second level and so on menu. I am trying to avoid Javascript but I can't see another way at the moment... What I want to achieve is to produce the menu on HOVER if that is not possible on click will be ok as well. Do any of you have an idea ? This is the code I have : ********************************************** <div id="menu"> <ul> <li><h2>Products</h2> <ul> <?php do { ?> <li><a href="?cat_id=<?php echo ($row_product_categories['prod_category_id']); ?>"title="<?php echo strtoupper($row_product_categories['prod_category_name']); ?>"><?php echo ucfirst($row_product_categories['prod_category_name']); ?></a></li> <?php } while ($row_product_categories = mysql_fetch_assoc($rs_product_categories)); ?> <ul> <?php do { ?> <li><a href="index.php?id=<?php echo ($row_products['prod_id']); ?>"title="<?php echo strtoupper($row_products['prod_name']); ?>"><?php echo ucfirst($row_products['prod_name']); ?></a></li> <?php } while ($row_products = mysql_fetch_assoc($rs_products)); ?> </ul> </li> </ul> </li> </ul> </div> **************************************************
Mysql Php Dynamic Menu
I am trying to write a script that will create dynamically a menu from MySQL database. The database table is a product categories table and it has the folowing filed: category_id, parent_category_id, category_name (some other fileds are there as well but these are enough to figure out the logic) I know that I have to store all the product_categories records in a temp array and then some how go through them and store the level of each record in the menu.... If you have done something like that I suppose you know what I mean and I would much appreciate to give me a hint here ... I had a look in the phpLayersMenu from sourceforge but it is really advanced OO code and I cannot understand the logic.... My target is to create a Tree menu with no pre - defined number of records...
Dynamic Navigation Menu
I need to build a dynamic menu that will include certain links depending on what variables are in the URL. This is doable - right? For example: catalog.php?product=widget&color=green Menu would look like: Green Widgets Brand 1 Green Widget Brand 2 Green Widget Brand 3 Green Widget etc. Any help would be greatly appreciated!
Dynamic Select Menu
I am trying to populate a select menu with data from a mysql db. I get the select menu, but no content or errors. The two fields are id and websites. Here is the code:
Dynamic Drop Down Menu
I'm having difficulties displaying the MakeModelID for a row selected from a drop down menu I've populated from a table combining three attributes (Make, Model and Specification - for example Ford Transit LWB 350 HR). What I require is to capture in a variable, such as $MakeModelID, the ID for that record selected. Code:
Creating Dynamic Drop Down Menu
I have a mysql database called Auditions with a table called Sept7. The table has two columns Time and Name. I want to create a dynamic pull down menu and populate it with items pulled from the table based on a query. Code:
Dynamic MySQL Nav Menu Sorting
I have this dynamic menu and I want to change the order of the menu items... I added a column in the database wich has an integer value for ordering the menuitems. But the only way is by hardcoding them into the database. I would like a way to sort them with drag-and-drop or with up/down arrows. Do you think that except PHP & MYsql I will need Javascript as well ? Any ideas how to do that ?
Dynamic Message Board Menu
Here's an issue I've spent the last 8 hours trying to get my head around, I'm pretty sure the answer is simple enough, but I just cannot work it out, any help would be much appreciated...even just a function name or something... I have a very simple message board setup. The browse menu will look end up like below, all dynamically fed from a database, which is currently setup as: [articleID] [articleDate] [articleText] 23 2007-07-18 Lorem ipsum dolor.... The 'articleDate' field is a DATE type, formatted yyyy-mm-dd. All posts should be sorted ascending, latest first. I want nothing to be hard coded, so there could be 2 posts in any month, or 200, or there could be no posts in any year. 2007 June - #1 - #2 August -#1 September -#1 -#2 2008 January -#1 . . . . . So on and so on. So far, I've toyed with array_unique(), as well as multi-dimensional arrays, but I'm really not sure if this is the right approach. I'd post code but I'm not sure there's any point, what I'm really looking to find out is the method to use, rather than code snippets, so if anyone has achieved this, how did you do it? I'm happy as to teach myself whatever I need to know, problem is I don't know what I need to know...
Unexpected Order On Dynamic Select Menu
I've got a directory called 'potm' (picture of the month) that contains: 02.jpg 03.jpg 04.jpg I'm dynamically constructing an 'archive' select menu that contains all the available pics. For some reason the select menu reads: April February March I've tried to sort the array, but it made no difference. PHP Code:
[PEAR:QuickForm] Dynamically Change A Dropdown Menu According To Another Menu?
I've been using QuickForm for a few months now and I am now given a new challenge: I've got a search form with a dozen of dropdown menus, the first dropdown menu being "Brand". If you select either Brand A, B, C, D... Z, the second dropdown menu "Model" must be dynamically changed to model AA, AB, AC, AD..., according to the models manufactured by the brand selected in the first box. I've seen that done on quite a few sites, but never found if QuickForm had a quick & clean way of doing that.
Controlling Navigation With PHP
I got a set of pages which must be navigated in a strict manner. Let's just say the pages are named A, B, C, and so on. I got no problem with forward navigation, but I want to disable the client browser's back button. More specifically, if the user is currently at page D, the back button doesn't bring the user to page C, but page A instead (assuming consecutive navigation, from A to B to C and so on). How can I achieve this with PHP, assuming both the server and the client are behind strict firewall (both referer and cookies disabled), and use of client-side javascript are avoided as much as possible (or even considered disabled as well, either by the firewall or the browser's setting)?
Controlling Content
I want to control the content that displays on certain days and times.. so example on monday-friday between 7 am and 10 am I want certain content displayed.. but later that day between 5 pm and 8 pm i want other content displayed.. and on weeekends between 7 am and 10 am i want to display different content than on m-f.. I know I need to probably use date() but I dont know how to specify the if statements.
Controlling Download
I have a few files on my server that can be downloaded by usig the url. but since these are not html or php files i cant really put a counter on them or some php script on them. is audio clips. and the user accesses tehm from a link i sent them by email. how can i now find out if this file has been downloaded and how many times?
Table Controlling...
I met some troubles, i want to create a html table by php and it would arrange the data from mysql as below that shown <tr><td>DataRow0</td> | <td>DataRow1</td></tr> <tr><td>DataRow2</td> | <td>DataRow3</td></tr> <tr><td>DataRow4</td> | i have tried to use looping but failed, can anyone give me a lesson.
Controlling Row Color With Mysql Output
I cant figure out how to control the <tr> color when mysql outputs a query. I want the rows to alternate color (e.g. white, grey, white, grey...) Any thoughts on how I can achieve this?
Controlling Frequency Of A Banner Display
I want to display a banner at the top of our comprehensive information site, inviting readers who haven't made a donation to do so. I am new to PHP, but learning fast, and would appreciate comments/help from more expert readers. My aims are: 1) To totally hide the banner from readers who have made a donation. 2) To show the banner on increasing frequency depending upon usage of the site (starting at, say, every 5th page and increasing to every page for heavy usage). I accepting the constraints of cookies, but envisage that the frequency with which the banner is shown will be controlled by both the number of page impressions in the current session and with previous sessions (assuming cookies enabled on the readers site).
Controlling User Flow With Forms
I have a screen where I ask the user their payment type. Once they select the payment type either check or credit card, I would like them to go to a seperate checkout page. How can I write a bit of code to make .php re-direct them to the proper page? (I considered doing this with Javascript, but would rather keep it all in .php)
Controlling The Copying Of Images From A Site
Is there a way to prevent users copying a full size image from a web page. Displaying the image with a smaller width and height only affects the image as viewed, the actual full size image file is still downloaded. I know I can get around it by having two versions of an image, the full size one and a smaller on for display purposes. but is there a way around having to have two images and use the full ssize one and stop it being copied or if copied will only be a thumbnail?
Html Form Controlling Mysql Query
im trying to have the user choose an album from an html drop-down menu, submit the choice to a php page which runs the mysql query based on the choice. the code:
Cookie In Frame
I have this login that works fine when the page is presented as-is, but I want to allow other site owner to put any page from my site in a frame in their own site. The thing is that when the page is called from a different domain, the cookie is not sent to the server.
Frame Redirection
"Web redirection : Pointing of certain domain to certain folder or elsewhere. Bought 123.com and forward it to www.abc.com/123 Bought xyz.com and forward it to www.abc.com/xyz This is done not from the DNS level but using scripts or frame redirection." I am not sure if i am posting in the right forum but this is what I want to achive. Does anyone here know anything about frame redirection?
Is There A Way To Redirect To A Frame?
I know that with javascript you can do this window.parent.left.location = "http://www.site.html" that redirects a frame named left. I know that in php you can do this header( 'Location: http://www.site.html' ) ; But how can i make php load that page into the frame named left?
Inline Frame
Can PHP control an Inline Frame? I have an Inline frame in my page And I have this PHP code which displays links: $q = "SELECT * FROM rent ORDER BY Date DESC LIMIT 100;"; $res = @mysql_query($q); while($r = @mysql_fetch_array($res)) { echo "<a href='/results/flats.php?P={$r['ID']}'>{$r['Title']}</a><br />"; } I want these links to Open in the Inline Frame (not the whole page) The Inline-frame name is 'Frame' What should I add to my code.
Load Url Into A Frame
I have a database with url's in it, and I want to load one at random into a frame, when a link is clicked I want to load a new random url into the frame I can do everything except load the new url into the frame, how would I do that?
Designating Which Frame To Print To
say i have a page with 3 frames on it..... what would a php statement look like that would print to a specific frame... is there a way to set the default frame to print to once without having to refer to it each time?
Targeting Specific Frame
Hi I have used frames a while ago but not since going with PHP Is there anything special with frames and PHP I seem to be having trouble with targeting a different frame I have 3 frameset "top", "side" and "main" in the side frame I grab some info from a database and create a simple anchor tag with some variables loaded into into and I want to when the anchor tag is clicked have the information loaded into the "main" frame. the link does not appear to be created correctly here is the actual code for the anchor tag.
Inline Frame And Sizes
I have: echo "<iframe name="whatever" src="".GetURL("somepage.php" )."" width="600" height="400" scrolling="no" frameborder=0></ IFRAME>"; The point: I have a fixed height and width. Is there a way to set it to max. E.g. for frames by setting withd=* it will use the size, but not for inline frames?
Cookie & Frame From Another Domain?
I have a feature that is hosted on a different domain from the primary one in a frame, and need to retain values in a cookie. example: A web page at one.com contains a frame which has a page hosted at two.com If I view the frameset from one.com in Firefox, all works well with the content from two.com. But if trying to view this using IE (with standard security settings), the cookie set by two.com is not accessible. Have been tinkering with the domain setting in the setcookie function to specify the domain: have tried one.com and two.com, but have not been able to get at the cookie value.
Regarding Top 10 Php Based Frame Works
I new one for this group .Now am working php for last 2 years.I want learn and use php based frame works .Please tell me top 10 good and famous php based frame works.
Printing Current Frame
I have a php script which pulls data from mysql and displays it in a frame At the moment I have to right click and select print from the menu to send this to my laser printer I would like a button in the frame to call up the printer dialog rather than right clicking
Header - Target Frame
how can i point this thing to the main top window. 'cause now it is inside the frame, tried using target=_top, but causing error header("Location: profiler_login.htm");
Picture Of First Frame Of A Movie
Can any one let me know how can I capture or save the picture of the first frame of a video movie. Actually I want if some one uploads a video to my website then I also want to show the thumnail of that movie so want to show the image of the first frame of that movie....
Including A File In Another Frame
I've the following code: mainpage.php ---------------------------- <FRAME name="framesuperior" src="framesuperior.php?a_caller=inicio"> <FRAME name="framecatalogo" src="frameinferior.php?a_caller=inicio"> ---------------------------- framesuperior.php ---------------------------- $a_caller = $_GET['a_caller']; $a_dhn = $_GET['a_dhn']; if ($a_caller=="menuprincipal"){ //this file could be called from another files include("menusecundario.php"); //this line will update framesuperior.php ***** Here I need to include "file.php" but in "framecatalogo" frame }
'scanning' Html In Frame?
Is it possible to scan the html or plain text of a frame? I would like to load a remote page into a frame, then 'scan' the html for specific content. Preferably, I would like to check for specific strings of text so that I can call my own functions depending on the content of the frame.
Black Line Over Frame
I'm having trouble with the frame i am creating.... for some reason there is a black space over the frame, sort of like a line. Here is the frame script: <frameset id="fMain" rows="530px,*" border="0"> <frame src="Main.php" name="Main" scrolling="no" style="border-rorder="0"> <frameset id="fBottom" <frame src="Bottom.php" name="Bottom" scrolling="no" /> </frameset> </frameset>
How To Destory Session In A Frame?
I have my program in php - on one of the pages I have a frame which contains another program which means that in this case I now have like two sessions being created one for my main program and one for the program called within the frame. I can destroy the session created in my main program when I log out but I don't know how to destroy the session created by the program which runs in the frame. Note that not all my pages have frames and its only on one page where I've enclosed the external program in a frame. Is there any way to destroy the session in the frame like when I navigate away from teh page which has the frame or so...
Reading The Contents Of A Frame From Another
I want to create a frames page where one frame is a php script (triggered by a form button) which reads the content of the other frame. The script will look for certain patterns, eg images, links, etc.
Frame Auto Refresh-how?
im using frames in my php script (no comments XD) i got a top frame that contains the logo and links, and then the bottom, bigger frame that displays the pages that the links are linked to. the thing is-i want the top frame to refresh every time a link is clicked how is this done?
Search Using Google With Top Frame
I want to have a search box on my website that searches the entire internet. However, after submitting the search I want there to be a top frame or banner where I can include the search box again for additional searches and a link back to my website. I have made a form below and replaced what I am not sure about as "...?". Code:
Get A Video File's Frame Size?
I know you can get an image's size and I thought I've seen examples of getting a video's frame size (width, height). I checked the manual but didn't see a function for this. Is this possible?
Refreshing A Frame With The Correct Content
I have a frame.html which will call navigator.php in headerFrame and main.php in mainFrame. The problem that i am facing now is whenever a user refresh the pages, the frame will load the default main.php in mainFrame although the user may be looking at other pages. i've tot of using sessions to track the page that the user is currently viewing. from there, i can call the right file upon refreshing frame.html. however, what if the user had openned two windows? how can i make refreshing with the right page possible?
I-frame Wont Properly Load
im making a personal site with 3 sections. home (news), design, and code. in the main design i setup an iframe which includes page.php. page.php contains this code PHP Code:
Automatically Loading A New Page In A Frame.
the basic idea here is that I want a web page that is made up of frames to redirect automatically to a frame depending on an if statement... if($1 == $2) { load url1.php in frame "main" }else { load url2.php in frame "main" } The frame "main" is an <iframeif that makes a difference.
Displaying A Pdf Coming Out Of A Mysql-db In A Frame
I have a mysql-database with some pdf in it. I can send them to a webbrowser using this script: <?php //output.php4 $sql = "SELECT * FROM tbfiles WHERE tbfiles.ID={$id}"; $result = mysql_query($sql); $dateien = mysql_fetch_object($result); $daten = $dateien->Inhalt; $name = $dateien->Dateiname; $groesse = $dateien->Groesse; $typ = $dateien->Typ; header("Content-type: $typ"); header("Content-length: $groesse"); header("Content-Disposition: attachment; filename=$name"); echo $daten; ?> My problem is that I get a download dialog where I want to save the pdf but I want to open it in a fram or iframe like this: <iframe src="./output.php4?id=129" width="100%" height="400" name="outputbox"> where id=129 indicates my document. I get the correct result in Internet Explorer (but not in Opera) if I change the script like this: header("Content-type: image/jpeg"); header("Content-Disposition: inline; filename=$name"); Does anybody know a solution for Opera? Then I could provide different scripts depending on the browser. Or even better a solution working in all browsers?
|