Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Is there a way to control elements inside a frame?
Old 09-13-2009, 12:57 PM Is there a way to control elements inside a frame?
Webmaster Talker

Posts: 626
Trades: 0
I have a site that I'm working on that is using a lightbox. The lightbox opens up a page to an e-commerce script that I bought which is a hosted solution (not on my server). I have no control of the source code on the page that I'm loading in the lightbox but I'm running into a problem.

When you submit the form in the lightbox, the results come back replacing the parent (whole page). Therefore the lightbox is gone and the user is actually on the other site which is nothing but the results.

I examined the code inside the page that I was loading within the lightbox and I think the problem is that there is a target="_top" element when defining the form:

<form action=resultspackage.cgi name=frm method=post target="_top">

Is there a way (maybe with javascript) to remove that target="_top" so that the results will come back in the lightbox instead of a new page?
jim.thornton is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-13-2009, 04:57 PM Re: Is there a way to control elements inside a frame?
Average Talker

Posts: 15
Trades: 0
You should use your own lightbox script, so that you would control the code.
motornature is offline
Reply With Quote
View Public Profile
 
Old 09-13-2009, 05:50 PM Re: Is there a way to control elements inside a frame?
Webmaster Talker

Posts: 626
Trades: 0
I have control of the lightbox script. It is the target page that I don't have control over. Imagine this:

- Mysite.com has a lightbox that when pops open displays google.com

- Now, imagine that google.com has a form on there that when you click "Search" it has a target set to "_top".

Basically what I want to do is take out the target attribute so that it goes to the iframe instead of a new page all together.

Do you follow what I mean?
jim.thornton is offline
Reply With Quote
View Public Profile
 
Old 09-13-2009, 06:53 PM Re: Is there a way to control elements inside a frame?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Any HTML that is served from a remote server you won't be able to manipulate. This is for security reasons, to prevent people from injecting scripts into remote pages while spying on its users. It would be easy to make an IFRAME look like a normal browser window, for example, and if you could monitor or change the attributes of what was in the IFRAME via JavaScript, you could create scripts to spy on users of that site.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 09-13-2009, 08:20 PM Re: Is there a way to control elements inside a frame?
Webmaster Talker

Posts: 626
Trades: 0
Shoot. I wish I could do this, now I'm going to be forced to use a pop-up, I was trying to avoid that for asthetic reasons.

Thanks for the help!
jim.thornton is offline
Reply With Quote
View Public Profile
 
Old 09-14-2009, 08:06 AM Re: Is there a way to control elements inside a frame?
Average Talker

Posts: 23
Name: Mary North
Trades: 0
Quote:
Originally Posted by wayfarer07 View Post
Any HTML that is served from a remote server you won't be able to manipulate. This is for security reasons, to prevent people from injecting scripts into remote pages while spying on its users. It would be easy to make an IFRAME look like a normal browser window, for example, and if you could monitor or change the attributes of what was in the IFRAME via JavaScript, you could create scripts to spy on users of that site.

As far as I read in SEO perspective, the use of IFrames does no good in site content because spiders or bots can't crawl into them but in that statement, It seems that Iframes is also essential.
__________________

Please login or register to view this content. Registration is FREE
marynorth21 is offline
Reply With Quote
View Public Profile
 
Old 09-14-2009, 08:10 AM Re: Is there a way to control elements inside a frame?
Webmaster Talker

Posts: 626
Trades: 0
In this particular case SEO is not important. This frame only contains a form for the purpose of generating dynamic content (a product listing). Therefore it isn't going to make a difference, but thanks for the input.
jim.thornton is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Is there a way to control elements inside a frame?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.76234 seconds with 12 queries