Link to home
Start Free TrialLog in
Avatar of totallywastedtoo
totallywastedtoo

asked on

URGENT -- How do I display a URL within my frameset?

Hi Everyone,

I want to display an external URL (http://mysection.mydomain.com/?user=username) within my parent frame. I've tried specifiying target=_parent, target="framename" but a popup comeup saying my browser is not setup to accept cookies. Note that it works when I do target=_top and target=_blank.

Thanks is advance!
Avatar of Zyloch
Zyloch
Flag of United States of America image

Hi

Can you explain a bit more by parent frame? Is it named, or is it just the top frameset?

Regards,
Zyloch
Avatar of totallywastedtoo
totallywastedtoo

ASKER

Hy Zyloch,

It's named; I have a header and the other one's named "main". Main frame is where I the external link to appear.

I'm sorry, wasn't too clear on my last post; I have two framesets, header and main. I want to have the URl appear in main.
So the <a href="blah">Link</a> Is on your header and when you click it you want it to open up in the main Frame?
<a href="blah">Link</a> is in the main frame
But if that's in the main frame, and you want the window to open in the main frame, you don't need a target. By the way, I checked out the page and it doesn't seem to have any framebreaking code I could see--just a bunch of Dreamweaver code that's unreadable for some rollover thing.
Having no target at all gives me the same thing...

That was just a sample you can check this out: http://products.danahermotion.com/?danaher=ServoMotors2
What is the same thing? Which link are we looking at on the site you posted?
That URL is the one that I want to appear in my main frame. If I do a target="main" or "_self" or no target at all, an error comes saying my browser is not setup to accept cookies. But it does work if I try to open that URL in a new window.

My question is: how do you force http://products.danahermotion.com/?danaher=ServoMotors2 to appear in a frameset?
One possible solution is to use an <iframe src="http://products.danahermotion.com/?danaher=ServoMotors2">
Or you could use something like:
<SCRIPT LANGUAGE="JavaScript"><!--
      parent.<name of your frame>.document.location="http://products.danahermotion.com/?danaher=ServoMotors2"
//--></SCRIPT>
I have a link that a user has to click on (also located in the main frame) to have this URL show up. Where should I place this <iframe tag>?
What happans if you just have your link look like this:

<a href="http://products.danahermotion.com/?danaher=ServoMotors2">Click here</a>

Where does the link open? Any error messages?
I was able to reproduce your problem. You get the cookie message if you try what I said in my last comment?
It seems that if you click OK on the cookie message it works. I mean it takes a bit but your URl gets displayed eventually in the main frame.
Hmmm...that massage is comming from the URL itself. There must be some check in that code.
If you use any other URL it works. Do you have access to the code of the URL you are trying to link to?
If we look at that maybe we can figure out what's going on.
No, when I click on OK, the original page where the link is located is displayed, not the URL. I'm sure it's a frameset issue but I don't know how to address it.

Please do let me know if you need more details. Thanks!
Just try with another url like www.yahoo.com

That works just fine.
So the problem is with the link your trying to link to not your code.
It does, for some reason the frameset is rejecting the "?danaher=ServoMotors2". Any workarounds?
It looks like there is something in the index.asp file which prevents you from stripping out their header frame.
frames are evil. go for accessibility.

people have been prosecuted for deep-linking - essentially "stealing" content and attempting to re-brand it as their own.

take care

Mike
Hi Mike,

I know how evil frames can be...but given the setup of the site were working on, which has more than 150K links and 6000 products, it's the most sensible thing to do. As for "STEALING" content, we actually hold the rights for all the things you see on the link that I am trying to work on. Thanks for the info anyway.
did not read all other posts, so sorry if i repeat someones post.

assuming you have to frames A (menu) and B (mainpage)
if you like to open the external page in your own frameset:

to open in B from A: <A HREF="yoururl.com" TARGET="B">bla</A>
to open in B from B: <A HREF="yoururl.com">bla</A>
do not care about the cookies. all other surfers have settings different to yours. so no problem.

last thing i saw in your question:
<A HREF="yoururl.com" TARGET="_BLANK">bla</A> opens yoururl.com in a new window.
_parent does not work this way, because the window is meant.

take a look at the following pages:
http://de.selfhtml.org/html/verweise/definieren.htm#beispiele
http://de.selfhtml.org/html/frames/verweise.htm

http://de.selfhtml.org/javascript/objekte/index.htm
@ kolpdc

"<A HREF="yoururl.com" TARGET="_BLANK">bla</A> opens yoururl.com in a new window.
_parent does not work this way, because the window is meant."

you're right, having target=_parent reloads the URL in the window as it is without my frames. but this isn't what I'm looking for.
did you take a deep look at the source of the page created? i think, they ran an obfuscator to get the code unreadable. they use cookies to remember the users choices. seems like http://products.danahermotion.com/?danaher=ServoMotors2 is only a part of a complete page. perhaps they control if there is a frame around.

there is a technique to prevent crawlers from collecting email-adresses that makes use of javascript-stringfunctions like eval or replace. take a look at the source - there is a big amount of this.

i think, if they have an obfuscated way to prevent foreign framesets, someone will require much time to reconstruct a readable sourcecode. if so, probably you'll find that there is no possibility to break it or almost no possibility. the could prevent using client-side-scripting or client-side combined with server-side.

the cookie-error could result from following (i do not know exactly!): they use another entrypoint where a script, for example, registers a session. then they change the script to other ones only accessing the sessionvars without the ability to create a new session. the session they store via cookie at the clients computer. so if you receive that unknown cookie, an error is raised. (i am not sure. only an idea. reconstructing would take too much time. sorry)
The path=/ won't allow the frame to read the cookie...

<html>
<script type="text/javascript">
      var tmpcookie = new Date();
    chkcookie = (tmpcookie.getTime() + '');
    document.cookie = "chkcookie=" + chkcookie + "; path=/";
    if (document.cookie.indexOf(chkcookie,0) < 0) {
            alert ("This website requires cookies to be enabled. Please enable your browser to accept cookies and try again.")
            history.go(-1)
    } else {
            document.location.replace('defaultpage.asp?danaher=ServoMotors2')
      }

</script>
<body onload=document.location.href='defaultpage.asp?danaher=ServoMotors2'>
</body>
</html>
ASKER CERTIFIED SOLUTION
Avatar of Fahdmurtaza
Fahdmurtaza
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry This is for all in here!(The last link in the above answer was)

http://www.geocities.com/fahdi2k/demo2.zip
(not demo3.zip)

relatin to,.......
This problem only causes when you link this page otherwise you never get such a error. Like you can see my .....
Thanks for all the help!
I liked to work for you as it was one of my first two solutions got accepted.