|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi there,
I'm running into this problem: I've got a page with navigation-categories on the left. which loads the content in the iframe ('content' for example) on the right. But there's also an index page, without this iframe. You can click from here to some content pages, but that means the source of 'content' iframe is not the default source. It depends on which link the user clicks. Can I give a variable with it or something like that? I don't want the make the left-navigation in every other page, because it's a lot of work to make changes in every single page... Who can help me out? Thanks a lot! |
|
#2
|
||||
|
||||
|
A possible solution to this could be to use a server-side language...
Have the index page pass a simple variable in the query string, then have the page with `nav & iframe` use that variable to determine what to put in the iframe's contents by default. Using PHP as an example: If your navigation contents are "Work - About Us - Something else", the links could be "nav.php?action=work", "nav.php?action=about_us", "nav.php?action=something" I would then put the following block of code at the very top of the page PHP Code:
And when you declare your iframe, do it as follows: <iframe src ="<?=$src;?>"></iframe> Notice, I've used PHP as an example. This is absolutely possible with most other web programming languages using the same technique (but slightly different syntax). |
|
#3
|
|||
|
|||
|
yeah I actually need a code in Java/html
|
|
#4
|
|||
|
|||
|
same problem
i am having a similar problem, we start the same, only i would like visitors to be
able to go to a certain page from, say an email, only i cant link directly to that page, or it will be lacking the 'border' that is usually around it... since said page sits in an iframe... is there a query that i can give the html like: www.mydomain.com/?'iframename'=newcontent.html ?? any help would be cool thanks |
|
#5
|
||||
|
||||
|
If you use JSP/PHP/ASP/whatever, it's all the same programming concept as my earlier post.
Send a variable, via the query string, and use the server-side language to decide what to do. Have a page that would sort of act as a Front Controller. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > iframes (load a page in an iframe in another page?) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|