Frames And Links

free web hosting
Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

Frames And Links

kvarnerexpress
I don't often use frames and I am having a problem linking from page to page.
I am using php.

I have a link with goes:
<a href="results.php?results1" target="result1">result 1<a>

In results.php I create my frames and use 'if' queries to select a frameset depending on the variable passed in the link, so it goes:
if ($_GET['result1']) {
<frame src=results.php name=results1 id=results1>
else

...and so on.

My problem is this - when I use target="result1", a new window opens and loads the page the way I want it, but I don't want a new window to open.

If i put target="_self", then the page loads in the same window, but the page 'results.php' appears in the frame, so the page basically repeats on itself.

I tried declaring target="_self" and target="result1" in the same <a> tag but it either does one or he other - the last one declared in the tag.

Is there a way around this? I hope I have been clear enough.

 

 

 


Reply

splehati
Hmm... you are clear enogh but, i think the problem is in dynamic creating
framset, because when you click on link <a href=.... target="result1"> you
reffered to frame named "result1" that in that moment don't exist, why, because in
your php function after that you are creating frameset...
to solve problem post the code, because with this 3 line of code i don't get idea what you wanna do exacly...


QUOTE(kvarnerexpress @ Dec 24 2004, 01:02 AM)
I don't often use frames and I am having a problem linking from page to page.
I am using php.

I have a link with goes:
<a href="results.php?results1" target="result1">result 1<a>

In results.php I create my frames and use 'if' queries to select a frameset depending on the variable passed in the link, so it goes:
if ($_GET['result1']) {
<frame src=results.php name=results1 id=results1>
else

...and so on.

My problem is this - when I use target="result1", a new window opens and loads the page the way I want it, but I don't want a new window to open.

If i put target="_self", then the page loads in the same window, but the page 'results.php' appears in the frame, so the page basically repeats on itself.

I tried declaring target="_self" and target="result1" in the same <a> tag but it either does one or he other - the last one declared in the tag.

Is there a way around this? I hope I have been clear enough.
*

 

 

 


Reply

nancmu
You can not send variable on <a href="results.php?results1" target="result1">result 1<a> go to frame. i used to use but it didn't work. I think, it will be easy to use iframe if you want to send variable.
OR.. try to use frame without php code if it work you might change later.
for example

// main.html
<a href=results.php target=result1>

// frame.html
<frameset.......>
<frame src=results.php name=results1 id=results1>
</frameset>

Reply

SENV
I think you have a small typo.
<a href=results.php target=result1>
<frame src=results.php name=results1 id=results1>

You just need to delete the underlined s in frame's name.

And a small advice, use " in HTML. When you include it in PHP it will look like this.

if ($_GET['result1']) {
<frame src=\"results.php\" name=\"results1\" id=\"result1\">
else


Greetz!

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : frames links

  1. Frames Tutorial - (2)
  2. Links Help Please - :) (10)
    Okay i have links that work at my house but not at school where i am trying to edit the HTML, the
    site is www.gaming-alliance.net, the links arent set anywhere but it should still send me to a blank
    page if the link i sent it to does not exist. Could someone please check it out and see if its
    working on a different computer? because it works on mine at home heres the code... Gaming
    Alliance | Next Generation Of Gamers Today Thanks....
  3. Xhtml Strict Links Tip - A problem might accure (5)
    If you try to put a link that has an & in your xHTML strict page, you need to change & to & in
    order for the page to be xHTML Strict.. eg.. BAD LINK: CODE
    http://jasamza.korisnik.com/forums/viewtopic.php?f=19&t=7&sid=6c2e9120dcff6e0b83698c4aa7be929a
    GOOD LINK: CODE
    http://jasamza.korisnik.com/forums/viewtopic.php?f=19&t=7&sid=6c2e9120dcff6e0b83698c4aa7
    be929a copy pasted &...
  4. Frames - (4)
    I need help with frames... ok so this is what i have. A folder "Danny" Things Inside Danny:
    Index.html CODE <HTML> <HEAD> <TITLE></TITLE> <link
    rel="stylesheet" href="style.css" type="text/css"> </HEAD>
    <FRAMESET cols="15%, 85%">   <FRAME src="nav.html" Scrolling=NO
    NoResize FrameBorder="0" Marginwidth="100" MarginHeight="100">
          <frame src="home.html" noresize frameborder="0" name=Home>
          <frame sr...
  5. Image Links - (5)
    Ok...another question...may sound stupid, but we're all stupid...how'd I be able to create
    an image link. Uh...let me rephrase this: If I were to create an "Enter" image and wanted people to
    click the image to enter to a certain page, how would I do it without some sort of the famous "Blue
    Line" around it? Any help would be greatly appreciated... /unsure.gif"
    style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" />...
  6. Advanced Html Frame Tag - Frames and Tables (3)
    FRAME SYNTAX Frame syntax is similar in scope and complexity to that used by tables, and has been
    designed to be quickly processed by Internet client layout engines. CODE <FRAMESET>
    This is the main container for a Frame. It has 2 attributes ROWS and COLS. A frame document has
    no BODY, and no tags that would normally be placed in the BODY can appear before the FRAMESET tag,
    or the FRAMESET will be ignored. The FRAMESET tag has a matching end tag, and within the FRAMESET
    you can only have other nested FRAMESET tags, FRAME tags, or the NOFRAMES tag. ...
  7. Keyboard Shortcut For Links In Html? - (8)
    Is there a way to make use of the keyboard when togging html links? I'm doing a project and it
    would be nice if the user won't be too mouse-dependent. He will have the option of using the
    keyboard as well. I'm thinking if the user does a particular keypress (CTRL + LETTER maybe? )
    the link will be "clicked". This is probably a stupid question but if anyone knows a way it would
    be so fantastic! /cool.gif" style="vertical-align:middle" emoid="B)" border="0"
    alt="cool.gif" /> Thanks....
  8. Need Help With Frames - (6)
    Hey everyone, I need help with frames. Say I click a button/link, I want it to appear in a certain
    box of the template. My friend just made a template from a tutorial, and wants me to make a site for
    him. With some knowledge of HTML, I ended up doing mostly everything, except for the framing.
    Because I'm going to use a shoutcast radio, I don't want the page to refresh everytime they
    visit a new link, otherwise the radio will restart for them. Can someone please give me a tag so if
    I click a button/link, it will appear in a certain area? Thanks....
  9. Frames And Scrolling - (2)
    I am wondering if it is possible to have a frameset with frames on the top, left and right of the
    main content. The frames would all be non scrollable except for the 'main content' (center
    frame). The problem i am having is that when the 'main content' needs to scroll, it places
    the scroll bar between the 'main content' frame and the 'right frame'. I need the
    scrollbar to be at the right of the 'right frame' so that the 'right frame' is not
    visually apart from the 'main content' frame. Is it possible to somehow posi...
  10. Dynamic Links - (3)
    his may be a CSS question, but it's the XHTML not validating that's giving me a problem.
    I'm working with the most out-dated shopping cart software (Click Cart Pro) ever and I'm
    trying to get it to validate XHTML 1.0 Transitional. All the XHTML I've supplied is good and
    validates fine, but where I'm falling short at the moment is with the linking. ClickCart Pro -
    by default - spits out HTML from 1996, and the links are supplied with ampersands - not the XHTML
    character entity "&". Par l'exemple: Code: CODE <a href="http:...
  11. Trouble With Links On A List - i want to display it inline (7)
    I have a menu that i want to display inline, in the same row, something like this: CODE
    <style type="text/css">
    ul{float:left;width:100%;padding:0;margin:0;}
    a{float:left;text-decoration:none;color:white;background-color:red; padding:5px
    10px;} a:hover {background-color:blue} li {display:inline} </style> The
    only problem is that i want a custom img for showing as CODE list-style:
    url(img/bullet.gif) But seems that display:inline makes my bullet go away... could s...
  12. Update Navigation Links? - (2)
    One of the requirements for the site Im working on right now is to be able to update navigation
    links easily. Its easy to do with frames, which I want to avoid. If I have 8 different pages, and
    add another page or anything, I dont want to have to open 8 pages and make the change to all of
    them. Is there another way, like having some kind of external style sheet, and bieng able to update
    that and have it carry over to all the other pages? As far as I understand, you can only have CSS
    code in a external stylesheet, and all the link infomation is in the actual page itself....
  13. Dropdown Menus Links - IDK how to make them link (3)
    Ok its a big problem to me, i need to make my drop down menus options link to a web page. I know i
    can do it with a button, and i can get that to work but i need/want to have it link as soon as the
    option is selected........How do i do that?...
  14. Need To Learn Xml Quick - links or info on xml (8)
    I need to learn xml and would like links or anything on the subject. I've looked at some code
    and i still don't see the point to it at all. round ...



Looking for frames, links

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for frames, links

*MORE FROM TRAP17.COM*
advertisement



Frames And Links



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE