Using target='_self' in JSON query |
Using target='_self' in JSON query |
Harindra |
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> |
Christian J |
Jul 25 2014, 06:29 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
What does JSON have to do with this?
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/ |
pandy |
Jul 25 2014, 08:08 PM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 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.
|
Harindra |
Jul 27 2014, 05:26 AM
Post
#4
|
Newbie Group: Members Posts: 10 Joined: 25-July 14 Member No.: 21,310 |
What does JSON have to do with this? 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 |
Harindra |
Jul 27 2014, 05:27 AM
Post
#5
|
Newbie Group: Members Posts: 10 Joined: 25-July 14 Member No.: 21,310 |
|
pandy |
Jul 27 2014, 07:07 AM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 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. |
Harindra |
Jul 27 2014, 07:35 AM
Post
#7
|
Newbie Group: Members Posts: 10 Joined: 25-July 14 Member No.: 21,310 |
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 |
Christian J |
Jul 27 2014, 07:47 AM
Post
#8
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
|
Christian J |
Jul 27 2014, 07:49 AM
Post
#9
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
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. |
Harindra |
Jul 27 2014, 09:05 AM
Post
#10
|
Newbie Group: Members Posts: 10 Joined: 25-July 14 Member No.: 21,310 |
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 |
pandy |
Jul 27 2014, 10:30 AM
Post
#11
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
It works fine. You probably view a cached copy of the page. Refresh your browser.
|
Harindra |
Jul 27 2014, 12:19 PM
Post
#12
|
Newbie Group: Members Posts: 10 Joined: 25-July 14 Member No.: 21,310 |
|
pandy |
Jul 27 2014, 01:11 PM
Post
#13
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 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. |
pandy |
Jul 27 2014, 01:26 PM
Post
#14
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
|
Harindra |
Jul 27 2014, 02:04 PM
Post
#15
|
Newbie Group: Members Posts: 10 Joined: 25-July 14 Member No.: 21,310 |
Well, I tried everything but still its determined to hound me Thanks |
Harindra |
Jul 27 2014, 02:18 PM
Post
#16
|
Newbie Group: Members Posts: 10 Joined: 25-July 14 Member No.: 21,310 |
Well, I tried everything but still its determined to hound me 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! |
pandy |
Jul 27 2014, 02:46 PM
Post
#17
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 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?
|
Harindra |
Jul 28 2014, 06:38 AM
Post
#18
|
Newbie Group: Members Posts: 10 Joined: 25-July 14 Member No.: 21,310 |
|
pandy |
Jul 28 2014, 06:49 AM
Post
#19
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Well, I'm stumped.
|
Harindra |
Jul 28 2014, 07:04 AM
Post
#20
|
Newbie Group: Members Posts: 10 Joined: 25-July 14 Member No.: 21,310 |
|
Lo-Fi Version | Time is now: 23rd April 2024 - 06:08 AM |