The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

2 Pages V  1 2 >  
Reply to this topicStart new topic
> Using target='_self' in JSON query
Harindra
post Jul 25 2014, 05:07 AM
Post #1


Newbie
*

Group: Members
Posts: 10
Joined: 25-July 14
Member No.: 21,310



Hi, I have a generic base target blank call in my blog. However, I want to also make a "Self" call for some functions. I have managed to work this out for most of the HREF links by using target='_self' but could not manage to solve it for "RECENT POSTS" and "CATEGORIES" in the navigation menu [please refer code below]. I have retained the coding which I have inserted which is not working.

May someone kindly let me know the solution to this issue.

My blog ID: http://indianautonet.blogspot.in/

The code I am currently using:

[code]
<nav id='nav'>
<ul>
<li><a expr:href='data:blog.homepageUrl' target='_self'>Home</a></li>
<li><a href='/' target='_self'>Recent Post</a>
<ul class='submenu subrecentpost'>
<div id='mini-gallery'><script src='/feeds/posts/default?max-results=20&orderby=published&alt=json-in-script&callback=showrecentposts'/><div style='clear:both;'/></div>
</ul>
</li>
<li><a href='/' target='_self'>Categories</a>
<ul class='submenu subcategories'>
<script src='/feeds/posts/summary?max-results=0&alt=json-in-script&callback=showLabels'/>
</ul></li>
<li><a href='/' target='_self'>Comments</a></li>
</ul>
</nav>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 25 2014, 06:29 PM
Post #2


.
********

Group: WDG Moderators
Posts: 8,253
Joined: 10-August 06
Member No.: 7



What does JSON have to do with this? unsure.gif

Anyway the links targets seem to work for me. For example, if I go to http://indianautonet.blogspot.in/search/label/TopList and click its RECENT POST link, then the page http://indianautonet.blogspot.in/ will open in the same window. On the other hand, if you go to the Toplist page from the home page, then the Toplist page will be opened in a new window. If you then click the RECENT POST link in that new window's page, then the next page will open there too. Is that really what you want?

Personally I'd avoid force-opening new windows. Let the user decide for himself instead.

BTW you may want to fix the HTML errors: http://validator.w3.org/check?uri=http://i...et.blogspot.in/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 25 2014, 08:08 PM
Post #3


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,449
Joined: 9-August 06
Member No.: 6



If it is to any comfort I didn't understand what the problem is either or where JSON comes into it. I think we need a little more information or explaining.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Harindra
post Jul 27 2014, 05:26 AM
Post #4


Newbie
*

Group: Members
Posts: 10
Joined: 25-July 14
Member No.: 21,310



QUOTE(Christian J @ Jul 26 2014, 04:59 AM) *

What does JSON have to do with this? unsure.gif

Anyway the links targets seem to work for me. For example, if I go to http://indianautonet.blogspot.in/search/label/TopList and click its RECENT POST link, then the page http://indianautonet.blogspot.in/ will open in the same window. On the other hand, if you go to the Toplist page from the home page, then the Toplist page will be opened in a new window. If you then click the RECENT POST link in that new window's page, then the next page will open there too. Is that really what you want?

Personally I'd avoid force-opening new windows. Let the user decide for himself instead.

BTW you may want to fix the HTML errors: http://validator.w3.org/check?uri=http://i...et.blogspot.in/


Hi,

Thank you for the response. I have managed to solve some of the issues. Apologies, I am Zero in HTML/CSS/XML coding. Hence, I couldn't convey the problem correctly and the confusion with JSON.

Let me explain the problem once again, I presume it would be easier for you to comprehend as you have already visited the blog.

1. Currently in the Navigation Menu, except "Recent Posts" all other items are opening in the same window.
2. I want "Recent Posts" menu item also to open in the same window. Right now it is opening in a new window and I am unable to solve it.

Trusting this conveys the problem in a better way. Please do let me know if you may need further information.

Thanks
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Harindra
post Jul 27 2014, 05:27 AM
Post #5


Newbie
*

Group: Members
Posts: 10
Joined: 25-July 14
Member No.: 21,310



QUOTE(pandy @ Jul 26 2014, 06:38 AM) *

If it is to any comfort I didn't understand what the problem is either or where JSON comes into it. I think we need a little more information or explaining.



Thank you, please refer my reply to Mr. Christian J with regard to the problem I am facing.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 27 2014, 07:07 AM
Post #6


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,449
Joined: 9-August 06
Member No.: 6



If the menu items I checked only HOME, Recent Posts and Categories are links. The others are constructed as the below example. I guess JSON does something with them.
CODE
<div class='portfolio-subtitle'>
BMW
</div>


If the three real links I found the two others have target="_self". The Recent Posts one has not. So add it.

CODE
<a href='http://indianautonet.blogspot.in/' target='_self'>Home</a>

CODE
<li><a href='/'>Recent Posts</a>

CODE
<a href='/' target='_self'>Categories</a>


Also, to require JavaScript for links to function isn't a very good idea. All the "links" should be real links.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Harindra
post Jul 27 2014, 07:35 AM
Post #7


Newbie
*

Group: Members
Posts: 10
Joined: 25-July 14
Member No.: 21,310



QUOTE(pandy @ Jul 27 2014, 05:37 PM) *

If the menu items I checked only HOME, Recent Posts and Categories are links. The others are constructed as the below example. I guess JSON does something with them.
CODE
<div class='portfolio-subtitle'>
BMW
</div>


If the three real links I found the two others have target="_self". The Recent Posts one has not. So add it.

CODE
<a href='http://indianautonet.blogspot.in/' target='_self'>Home</a>

CODE
<li><a href='/'>Recent Posts</a>

CODE
<a href='/' target='_self'>Categories</a>


Also, to require JavaScript for links to function isn't a very good idea. All the "links" should be real links.


Hi,

Thank you for the quick response. I tried as per your suggestion but it did not work. I presume the author of this template must have coded this in the CSS variable declaration section. I am unable to figure it out. Let me know if you require to view the template as an attachment, if this is not a bother for you. Would appreciate the help.

Thanking you
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 27 2014, 07:47 AM
Post #8


.
********

Group: WDG Moderators
Posts: 8,253
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Jul 27 2014, 02:07 PM) *

If the three real links I found the two others have target="_self". The Recent Posts one has not.

I recall the "Recent Posts" link had it too before (like in the code example in the OP).
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 27 2014, 07:49 AM
Post #9


.
********

Group: WDG Moderators
Posts: 8,253
Joined: 10-August 06
Member No.: 7



QUOTE(Harindra @ Jul 27 2014, 02:35 PM) *

I tried as per your suggestion but it did not work.

Right now there is no target="_self" on the web page's "Recent Posts" link.

QUOTE
I presume the author of this template must have coded this in the CSS variable declaration section.

No, CSS is just for styling HTML. It can't affect link targets.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Harindra
post Jul 27 2014, 09:05 AM
Post #10


Newbie
*

Group: Members
Posts: 10
Joined: 25-July 14
Member No.: 21,310



QUOTE(Christian J @ Jul 27 2014, 06:19 PM) *

QUOTE(Harindra @ Jul 27 2014, 02:35 PM) *

I tried as per your suggestion but it did not work.

Right now there is no target="_self" on the web page's "Recent Posts" link.

QUOTE
I presume the author of this template must have coded this in the CSS variable declaration section.

No, CSS is just for styling HTML. It can't affect link targets.


Hi,

I removed it because it was anyway not working, however, I have added this element now in the "Recent Posts" menu, but it still does not work.

Thanks
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 27 2014, 10:30 AM
Post #11


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,449
Joined: 9-August 06
Member No.: 6



It works fine. You probably view a cached copy of the page. Refresh your browser.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Harindra
post Jul 27 2014, 12:19 PM
Post #12


Newbie
*

Group: Members
Posts: 10
Joined: 25-July 14
Member No.: 21,310



QUOTE(pandy @ Jul 27 2014, 09:00 PM) *

It works fine. You probably view a cached copy of the page. Refresh your browser.



I cleared all history data in my Chrome browser as per your suggestion, but still "Recent Post" menu item is opening in a new window rather than in the same window.

Thanks
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 27 2014, 01:11 PM
Post #13


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,449
Joined: 9-August 06
Member No.: 6



I don't think clearing history helps. Click the Reload icon at the same time as you hold down Shift or Ctrl. Don't know which it is in Chrome.

I refuse to install Chrome, but Iron, which should be the same except the spying features, doesn't open a new window or tab.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 27 2014, 01:26 PM
Post #14


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,449
Joined: 9-August 06
Member No.: 6



https://support.google.com/chrome/answer/95582?hl=en
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Harindra
post Jul 27 2014, 02:04 PM
Post #15


Newbie
*

Group: Members
Posts: 10
Joined: 25-July 14
Member No.: 21,310



QUOTE(pandy @ Jul 27 2014, 11:56 PM) *



Well, I tried everything but still its determined to hound me sad.gif

Thanks
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Harindra
post Jul 27 2014, 02:18 PM
Post #16


Newbie
*

Group: Members
Posts: 10
Joined: 25-July 14
Member No.: 21,310



QUOTE(Harindra @ Jul 28 2014, 12:34 AM) *

QUOTE(pandy @ Jul 27 2014, 11:56 PM) *



Well, I tried everything but still its determined to hound me sad.gif

Thanks


I have started downloading SRware_Iron browser, I will use it in the future since it eliminates usage tracking and other privacy compromising functionalities that Chrome includes. Thank you for the suggestion. BTW, I tried using my blog with IE 11 also but it gives the same result. Really perplexed though!

Thanks!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 27 2014, 02:46 PM
Post #17


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,449
Joined: 9-August 06
Member No.: 6



Strange. Works in everything I've got. Don't have a recent IE though. How did it go with Iron?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Harindra
post Jul 28 2014, 06:38 AM
Post #18


Newbie
*

Group: Members
Posts: 10
Joined: 25-July 14
Member No.: 21,310



QUOTE(pandy @ Jul 28 2014, 01:16 AM) *

Strange. Works in everything I've got. Don't have a recent IE though. How did it go with Iron?


Apologies for the late reply! The same result in Iron also.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 28 2014, 06:49 AM
Post #19


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,449
Joined: 9-August 06
Member No.: 6



Well, I'm stumped.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Harindra
post Jul 28 2014, 07:04 AM
Post #20


Newbie
*

Group: Members
Posts: 10
Joined: 25-July 14
Member No.: 21,310



QUOTE(pandy @ Jul 28 2014, 05:19 PM) *

Well, I'm stumped.


I guess I have to live with it. Anyways, thanks a lot for your patience and help.

Regards
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

2 Pages V  1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 8th December 2019 - 07:14 PM