![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
|
[SOLVED] link doesn't open in the same window
Hello everyone!
I have a problem here and I hope someone will help me http://mylocalmove.com/problem.html If you pay attention to the bottom right corner - I have an iframe script that loads a different page everytime. For not I have these three pages to load: http://mylocalmove.com/frames/testimonials/1.html http://mylocalmove.com/frames/testimonials/2.html http://mylocalmove.com/frames/testimonials/3.html In the future those three pages above will contain different success stories, but for now I have these simple examples to try on. Basically every time you reload a page a new success story comes up. All of those success stories have a link at the bottom "Read more..." Problem: When I click that link browser doesn't jump to that page, instead it loads a page inside of that iframe. What do I need to do in order to make browser load a new page when I click on a "Read more..." page? I will greatly appreciate anybodies help. Thanks in advance...
__________________
http://img206.imageshack.us/img206/1...ridezj1ig3.png |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Registered User
Join Date: Feb 2008
Posts: 325
OS: Vista
|
Re: link doesn't open in the same window
replace target="iframenamehere" with target="_blank"
also, its MUCH better to do that in PHP $num = rand(1,3); if ($num = '1'){ blah blah blah } elseif($num = '2'){ lolol } else { hi } |
|
|
|
|
|
#3 (permalink) | |
|
Registered User
|
Re: link doesn't open in the same window
Quote:
What was the PHP part and how do I use it? I am not too familiar with it, can you help me with some more details? Thanks...
__________________
http://img206.imageshack.us/img206/1...ridezj1ig3.png |
|
|
|
|
|
|
#4 (permalink) |
|
Registered User
Join Date: Feb 2008
Posts: 325
OS: Vista
|
Re: link doesn't open in the same window
Yeah, just get a PHP enabled host and create a file that ends in php (or just rename your .html file to .php. Don't worry it still parses html) and add this code where you want the random text to appear:
<?php $num = rand(1,3); if ($num = '1'){ text 1 } elseif($num = '2'){ text 2 } else { text 3 } ?> Replace text 1 2 and 3 with whatever you want it to say. |
|
|
|
|
|
#5 (permalink) |
|
Registered User
|
Re: link doesn't open in the same window
Hmm, I have a problem here. I added that part, and it still doesn't work.
Look, go to this page: http://mylocalmove.com/problem.html in the footer I just made a new frame that displays: "Home | Sitemap | F.A.Q. | My Local Move © 2008 | Privacy Policy" the code is <IFRAME src=http://mylocalmove.com/frames/footer/footer.html width=900 height=20 target="_blank" align="center" frameborder=0 marginwidth="0" marginheight="0" scrolling=no> </IFRAME> I added a line that you mentioned, but links still open in that iframe, instead of loading a new page. Am I doing something wrong?
__________________
http://img206.imageshack.us/img206/1...ridezj1ig3.png |
|
|
|
|
|
#7 (permalink) |
|
Design Team Member
Join Date: Feb 2008
Location: Deming, NM
Posts: 312
OS: XP SP2 & Vista
|
Re: link doesn't open in the same window
Hey there,
Open http://mylocalmove.com/frames/footer/footer.html file. add target="_top" to each of your links. This will open it within the same tab/window and not just the iframe. use target="_blank" if you want it to open in a new tab/window. Hope that helps! Example: <a href="http://mylocalmove.com/" target="_top">Home</a>
__________________
|
|
|
|
|
|
#8 (permalink) |
|
Registered User
|
Re: link doesn't open in the same window
Thanks to Jaxo and Slapshot,
both of you guys helped me. I used both _top and _new in my footer on the website. I really appreciate your help... www.mylocalmove.com PS: I am marking this topic as "SOLVED"
__________________
http://img206.imageshack.us/img206/1...ridezj1ig3.png |
|
|
|
![]() |
| Thread Tools | |
|
|