This is a forum where members new and old can come to ask questions and get info and opinions. It is not a place to advertise your business or have other forms of advertising, whether it be in your posts or signature.

All links in the forum will not be indexed by Search Engines and any unapproved forms of advertising or spam will be dealt with accordingly, deleted, and that member's account banned.

Forums

Overview » Ajax & JavaScript » opening links in parent html page
Reply

opening links in parent html page

Donnelle Dabreo
Member



Since: 23 Aug 2007
Posts: 1
Posted 23 Aug 2007 12:16:53

Hi,

I've been stuck on this for the last few days and was wondering if you could help me. I'm not even sure if using javascript is the best option to do this, but if you could help me anyway that would be great. My dilemma is I'm designing a website which has several links in the left hand navigation bar. But at the moment, the links open in a new window. I don't want that. I want them to open in the main area of the parent window. Normally if i'd used frames, opening the links within that same page wouldn't have been a problem because I could just use the target attribute.

But I didn't use frames, I used CSS layouts but when I set the target attribute to _parent, the links open up across the whole page rather than just in the main section. Should I include javascript to open the links in the main section (called mainContent) in the parent page? If so, could you provide some code to point me in the right direction of how to do this?

Hi,

I've been stuck on this for the last few days and was wondering if you could help me. I'm not even sure if using javascript is the best option to do this, but if you could help me anyway that would be great. My dilemma is I'm designing a website which has several links in the left hand navigation bar. But at the moment, the links open in a new window. I don't want that. I want them to open in the main area of the parent window. Normally if i'd used frames, opening the links within that same page wouldn't have been a problem because I could just use the target attribute.

But I didn't use frames, I used CSS layouts but when I set the target attribute to _parent, the links open up across the whole page rather than just in the main section. Should I include javascript to open the links in the main section (called mainContent) in the parent page? If so, could you provide some code to point me in the right direction of how to do this?
srinivas kondareddy
Member



Since: 20 Nov 2008
Posts: 1
Replied 20 Nov 2008 15:49:46
Hi

Did anyone got the solution to this problem... I am also struck in the same scenario. Someone please help me to sort it out this issue.




<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi,

I've been stuck on this for the last few days and was wondering if you could help me. I'm not even sure if using javascript is the best option to do this, but if you could help me anyway that would be great. My dilemma is I'm designing a website which has several links in the left hand navigation bar. But at the moment, the links open in a new window. I don't want that. I want them to open in the main area of the parent window. Normally if i'd used frames, opening the links within that same page wouldn't have been a problem because I could just use the target attribute.

But I didn't use frames, I used CSS layouts but when I set the target attribute to _parent, the links open up across the whole page rather than just in the main section. Should I include javascript to open the links in the main section (called mainContent) in the parent page? If so, could you provide some code to point me in the right direction of how to do this?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Alan C
Total freaking Member



Since: 04 May 2006
Posts: 473
Replied 21 Nov 2008 11:01:45
Hi Guys,
I don't know if this is the answer or not, but it's worth consideration.
I have just been reading an AJAX book, to decide whether or not there are opportunities to use some of the techniques on my sites. It sounds really interesting. The bit of interest to you is that Javascript (or other languages) can access the whole of the page using the Document Object Model (DOM).

My understanding is that the access is somewhat like selectors in CSS, but only loosely so. The author referred to it as DOM scripting, I did a quick search on it but most of what came up was books rather than techniques or detail. In essence it allows you to access the document (your page) and change it. The access is by id, that's where my suggestion of being like css comes in, but you can also access by tag.

It does not look easy, looking at the examples I would say it's not for Javascript novices, or indeed coding novices, but it looks like it will do what you want.

My experience so far is limited. I would be interested to know if you go this route and how it turns out.

Reply to this topic

Message
Reply
Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency