/    Sign up×
Community /Pin to ProfileBookmark

Targeting a frame

Hi

I need to set a PayPal auto return page to a page within a frameset (mainFrame). Can anyone tell me how to include this in a URL. I seem to remember it being something like…

[url]http://www.whatever.com/some.htm?target=_mainFrame[/url]

or something. Does this look right?

TIA

Russ

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYJan 13.2006 — <i>
</i>&lt;a href="http://whatever.com" target="mainFrame"&gt;http://whatever.com&lt;/a&gt;


don't forget to set your doctype to frameset

or to add a frameset doctype if your don't have any

http://www.w3.org/QA/2002/04/valid-dtd-list.html
Copy linkTweet thisAlerts:
@Digital_PimpauthorJan 13.2006 — Thanks LiLcRaZyFuZzY

I know this method but I did't make myself clear. In Paypal you can set a return URL once a customer has made a purchase. You must enter the URL in a text field which doesn't give me the choice of a destination frame...only a URL (http://www.whatever.co.uk/success.htm). I want it to return the customer to the success page WITHIN the frameset.

thanks anyway

Russ
Copy linkTweet thisAlerts:
@jalarieJan 13.2006 — You could even shorten it to:

http://www.whatever.com/some.htm?mainFrame

Within the "some.htm" page, use 'onload="ReFrame();"' on the main frameset tag to set off the "ReFrame" function. Include a default "src" for the target frame just in case the user doesn't have Javascript. The function could look like this:

function ReFrame() {

Par=document.location.search.substring(1); // get the page name

window.frames['target_frame_name'].location=Par;

}
Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYJan 13.2006 — ok, you might have to use a server side language for this

even better, you could use server-side include and drop the frames
Copy linkTweet thisAlerts:
@Digital_PimpauthorJan 13.2006 — Thanks all

Will try the Javascript solution Jalarie.

Thanks again LiLcRaZyFuZzY but the frame is there because there is a music player in it. Frames is the only way to have the music playing without being interupted other than opening more browser windows or using popups.

cheers

Russ :¬)
×

Success!

Help @Digital_Pimp spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.12,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...