Author Topic: iFrame redirect to new page  (Read 15588 times)

Offline hidden

  • Restricted
  • Posts: 4
iFrame redirect to new page
« on: June 02, 2011, 03:22:24 AM »
Thank you so much for your thorough iFrame tutorial but I still have some questions.
I have done a few websites for myself. I can read CSS but tend to use plugins and modules if I can!! (Just so you know my level of joomla knowledge) :help:
I have an iFrame on a page article to search some info and when you press submit I get the resulting iFrame (it works) but in the same page. I need it to direct to another page. I have worked on it for days!! :-\
I have created a top menu item that I have disabled and linked it to the new article that I have enabled
When people talk target=blank and that takes you to a new page no one explains how to get the iFrame to open up in a specific new page
When people give you the submit to link in the iFrame equation they don't tell you whether you are linking to the enabled article or the disabled menu item that will then link to the article.
I have done this in an iFrame plugin and this is what it looks like

{iframe width="700" height="150"}http://www.skiholidayextras.com?affiliate_id=172&submit_to=http://www.skihautesavoie.fr/results-lift-pass.html{/iframe}

This is the iFrame code I was given for the page it submited to

{iframe width="800" height="2000" frameborder="0"}

http://www.skiholidayextras.com/selection.php?"+unescape(window.location.search).subs
tr(1).split("&")+"{/iframe}


When I used the unfriendly URL format with ID number it kept redirecting to the home page and I was using the correct ID number (Home page ID1 and the page i wanted ID18)
This seems to ignore the submit to page and just send it back on itself!!
Hope you can help
Thanks so much
lisa



Offline hidden

  • Sami
  • Administrator
  • Senior Member
  • *****
  • Posts: 5924
  • Not a geek. Just a Nerd.
    • CSB Tutorials
Re: iFrame redirect to new page
« Reply #1 on: June 02, 2011, 04:32:27 PM »
Kinda working blind here without seeing your page so can only give you basic info...

Your iframe should be named to change the content.
Once you have named the iframe you can change the content of the iframe.
Can not point a link to that iframe until it has a name.  Then you can make a TARGET statement to LINKS to change the content of the iframe.

     Target="_blank" opens a new window.   (use inside or outside iframe for this result)
     Target="_top" replaces the current window  This will replace the page with the iframe (no longer see it)
     Target="_self" replaces just content of the iframe, IF the link is on a page INSIDE the iframe (content page).
     Target="FRAME1" is used on the page with the IFRAME.  Click the link and the Iframe will change contents.

Go back to the tutorial page: http://www.samisite.com/test-csb2nf/id43.htm
And scroll down to FRAME5 - TEST LINKS.  The green CONTENT page of that iframe has links that point to  _self and _blank .  Try them  see what happens.  Sometimes better than explanation

Be sure to only pull in pages that YOU have the RIGHT to pull in to your page.   :)

-Samantha
TNG: "Sometimes, you can make no mistakes, do everything right, and still lose" - Capt Picard to Data
(:turtle: In memory of Turtle: May 22, 1944 - Nov 24, 2007  GURU, mentor, and really nice guy! :turtleleft: )

Offline hidden

  • Sami
  • Administrator
  • Senior Member
  • *****
  • Posts: 5924
  • Not a geek. Just a Nerd.
    • CSB Tutorials
Re: iFrame redirect to new page
« Reply #2 on: June 02, 2011, 04:55:51 PM »
I have three samples.... Tell me which you want to do....
http://www.samisite.com/trash5/

1) Do you want to show the skiholidayextra page every time you open the page?
2) Or do you want to start with something else in that iframe window and CHANGE to the skiholidaysextra?
3) do you want the FORM to appear in your iframe.  Fill form and have result appear in iframe...  
Sorry.  I can not make this happen for you unless you have access to the RESULTS page coding and can define how that page should load.
Can't be specified from outside that page by me.  Many PHP pages/results pages do not allow themselves to load into other pages.
I have tried several variations of the code you provided... none worked.
The author/webmaster of that page may be able to provide the coding.

NOTE: #1 & 2:  the page you are loading into that iframe is HEAVY and takes HUGE amount of time to load after the webpage loads.
Definitely Not made to pull into iframe.
« Last Edit: June 02, 2011, 05:20:25 PM by Samrc »
-Samantha
TNG: "Sometimes, you can make no mistakes, do everything right, and still lose" - Capt Picard to Data
(:turtle: In memory of Turtle: May 22, 1944 - Nov 24, 2007  GURU, mentor, and really nice guy! :turtleleft: )

Offline hidden

  • Restricted
  • Posts: 4
Re: iFrame redirect to new page
« Reply #3 on: June 03, 2011, 10:50:31 AM »
Hi Samantha
Thanks so much for replying.
Maybe it would help if I gave you the page link!!
http://www.skihautesavoie.fr/ski-lift-pass (albeit the fact that code might be heavy and slow!!!   :-\
That page is perfect and exactly as I want. The info in the iFrame is also perfect. Its exactly as the supplier wants!!
When I press submit
The answer is also perfect. That is because it is submitting to the same page iFRame
I need it to submit to a new page iFrame which links to article results-lift-pass or to menu item results-lift-passaa not sure which one is used!!
This page would be set up with a longer height so scroll bars would not be necessary!!

This website does exactly the same as me!!
http://www.ifyouski.com/ski-extras/book-online/lift-passes.aspx
When you click search on this page he goes to a brand new page but a blank new page just with the answer in the iFrame!!
They have name="skiholidayextras" in the code. Do you think this is the iFrame name that you say I need!!

This is their source code
<iframe height="200" src="http://www.skiholidayextras.com?affiliate_id=9&amp;submit_to=http://www.ifyouski.com/ski-extras/book-online/ski-holiday-extras-results.aspx" frameborder="0" width="520" name="skiholidayextras" scrolling="no" align="center"></iframe></

I don't mind using this code as above rather than the plugin, I just have no idea how to fit it in to my html page and where to slot it in!!
 :thankyousign:
Lisa

Offline hidden

  • Restricted
  • Posts: 4
Re: iFrame redirect to new page
« Reply #4 on: June 03, 2011, 10:56:48 AM »
Hi Samantha
What is a little confusing  is that at this point there is not a lot of info as the seasons 2011/2012 ski season have not come through from the sources yet. If you search for something in Alps d'huez you get a small reply as there is some info that has been loaded!! That will give you an idea of what the answer iFrame will look like!!
 :oops:
Lisa

Offline hidden

  • Restricted
  • Posts: 4
Re: iFrame redirect to new page
« Reply #5 on: June 03, 2011, 12:32:09 PM »
Hi Samantha
link opens in the same window with target="_top"   
> Contact Sami <

That is want I need - The same window but a different page
In that page would be the iFrame with the results from the skiholidayextras webpage

I hope its making sense to you and I really appreciate your help!!