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:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* 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
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
LinkBack Thread Tools
Old 10-03-2008, 04:52 AM   #1 (permalink)
Registered User
 
Join Date: Apr 2007
Location: Los Angeles, CA
Posts: 218
OS: Windows Vista Ultimate SP1

My System

[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...
ervand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
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

Old 10-03-2008, 02:40 PM   #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
}
Slapshot is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-03-2008, 03:45 PM   #3 (permalink)
Registered User
 
Join Date: Apr 2007
Location: Los Angeles, CA
Posts: 218
OS: Windows Vista Ultimate SP1

My System

Re: link doesn't open in the same window

Quote:
Originally Posted by Slapshot View Post
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
}
Thanks...

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...
ervand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-03-2008, 07:23 PM   #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.
Slapshot is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-06-2008, 03:36 AM   #5 (permalink)
Registered User
 
Join Date: Apr 2007
Location: Los Angeles, CA
Posts: 218
OS: Windows Vista Ultimate SP1

My System

Re: link doesn't open in the same window

Quote:
Originally Posted by Slapshot View Post
replace target="iframenamehere" with target="_blank"
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?
ervand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-06-2008, 02:04 PM   #6 (permalink)
Registered User
 
Join Date: Feb 2008
Posts: 325
OS: Vista


Re: link doesn't open in the same window

try _new

i havent coded in a hella long time
Slapshot is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-07-2008, 12:25 AM   #7 (permalink)
Design Team Member
 
Jaxo's Avatar
 
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>
Jaxo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 10-07-2008, 04:07 AM   #8 (permalink)
Registered User
 
Join Date: Apr 2007
Location: Los Angeles, CA
Posts: 218
OS: Windows Vista Ultimate SP1

My System

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"
ervand is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 07:38 AM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85