<div class="pb_ft clearfix" style="width:500px;clear:both;margin-top:50px;">
<div class="turn_page" id="list_navigator" style="margin-left:200px;">
<ol style="width:980px;">
<li style="width:100px;border:0">12129 Pages</li>
<li class="turn_pre">Last Page</li>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li class="turn_next">Next Page</li>
</ol>
</div>
<!--Next Page-->
</div>
It uses a href = "#" and then a function "PageContext.PageNav.go(2, 12128).
It appears that 12128 total pages are loaded by calling a JavaScript function.
What is the best way to navigate through these webpages? Should I better simulate a button click or I could invoke the website's function to make it flip pages.
Jsoup is an HTML parser and isn't a browser. With that being said, it's still possible to look at what is being returned in the url after you've clicked on a menu option.
If it's something predictable you can append the needed params to the URL to grab with Jsoup. If not, you're going to have to use something like Selenium to cycle through the menu then parse each page with Jsoup.
You could also try and disable Javascript in your browser to see how the website handles it. It could take you to a nav that doesn't use js. It's worth a shot.
Related
I am using webforms with Umbraco 7.6.3 I have simple menu(not using template) on my master page (/masterpages/Master.master) like this:
<li class="dropdown">
Home
<ul class="dropdown-menu">
<li><a runat="server" href="https://sub1.test.mywebsite">Home</a></li>
</ul>
</li>
if I don't add www In href Umbraco replace hostname/subdomain.
Am I missing any setting?
Uhm. You have to have a protocol, like http or https, in front of your link. So https://www.google.com is a valid link.
You need write code like this:
<div>
<ul>
<li><a>Home</a></li>
<li><a>aboutus</a></li>
<li>Search</li>
</ul>
</div>
I'm building a page using ":target" pseudo-selectors linking to different content and resulting in bookmarkable hash-marked "pages"
For example:
<ul class="menu">
<li>Home</li>
<li>History</li>
<li>News</li>
</ul>
<div class="pages">
<div id="home">...</div>
<div id="history">...</div>
<div id="news">...</div>
</div>
I'm wondering how this affects page hits and search engine ranking, compared to links to unique pages. I assume as long as the href is to content on the same page, it only counts as one hit. True?
You still need to call _trackPageview if you want to register these as different page hits. Google Analytics will not automatically capture these events and will treat it as a single page otherwise.
I have a menu in my Site.Master file whose code is as follows;
<nav>
<ul id="css3menu1" class="topmenu">
<li class="topfirst"><span>Home</span>
<ul>
<li>Employee Login</li>
<li>Customer/Distributor Login</li>
</ul>
</li>
<li class="topmenu"><span>Products</span>
<ul>
<li>Page1</li>
<li>Page2</li>
<li>Page3</li>
</ul>
</li>
<li class="topmenu"><span>Investor Info</span>
<ul>
<li>Quarterly Filings</li>
<li>Press Releases</li>
<li>Investor Updates</li>
<li>Company Presentations</li>
<li>Management Team</li>
</ul>
</li>
</ul>
</nav>
When I go to the sites login page BUT do not login and try to go to any of the links in the menu I get a 404 error page which says I'm trying to redirect to /Account/Page1.aspx.
Why is the "Account/" getting inserted into that path when the path from the Site.Master is clearly only Page1.aspx. I've tried changing the href to ~/ and ../ infront of the page name but that produced different types of errors ALTHOUGH it did properly redirect ONLY when in the login page (which is in the Account folder)
When you access Login.aspx page It will in 'Account' Folder directory. When you try to access other links in menu, it will first check in current 'Account' directory if page is exist it will display page otherwise it throws error.
I suggest you require dynamic menu for this. when You access 'Account' directory page it will change the menu as per the 'Account' directory and link.
You can use literal control and Literal1.Text = 'HTML Menu Code'
Better practice to use the tilde symbol instead of a relative path but with this you will need to use the
runat="server"
in the tag.
what were the other errors you got with that approach?
edit
<li><a runat="server" href="~/Account/Login.aspx">Employee Login</a></li>
It was far easier, and much more practical solution to use Page.ResolveURL("~/Account/Login.aspx"). I used Page.ResolveURL for all the links in the menu and now it works seamlessly
What is the quickest way to test validity of any xhtml css code snippet (not whole page} in W3C validator? and give link of that test in forum/question/discussion.
code snippet like this
<ul>
<li>Item one</li>
<li>Item two</li>
<li>Watch, you can easily nest list items: This item has some sub-items</li>
<ul>
<li>Sub-item one</li>
<li>Sub-item two</li>
<li>Shall we do a 3rd nested list?</li>
<ul>
<li>OK</li>
<li>Your browser should automatically use different bullet styles for each level.</li>
</ul>
</ul>
</ul>
Look at the extra options in the validator, there is one to validate a HTML fragment. Bookmark this to jump straight to it: http://validator.w3.org/#validate_by_input+with_options
You can't post a link to the validation output, because validating by direct input uses POST (through form submit), not GET (though URL). The only way to "share" the validation is to validate by URI.
You could keep a "template" HTML file on your computer with a doctype and <body> tag (look at what the fragment validation I mentioned above adds to your code), upload that file to a folder in your web space and share the validation link for that.
I am using jquery tabs(First,Second,Third) in multiple asp.net pages (First.aspx, second.aspx,Third.aspx) in my asp.net website and in each page i am writing the ul,li code.
For example in the First.aspx page I am writing the following code inside the 'ul' tag
<li class="current">First tab</li>
<li>Second tab</li>
<li>Third tab</li>
Similarly in the second.aspx,Third.aspx pages i am using the Class="current" to highlight the selected tab.Recently we have planned to move to Master pages.So the master page should contain the ul,li code for the tabs.But the problem is that I do not understand how to apply the class="current" to the selected tab,in the case of the master page.Could someone please help?
Thanks in advance.
Write a javascript function in your master page to set the current class on a tab. Each page can then call that function when it's loaded to set the current page.
Something like:
<li id='tab1'>First tab</li>
<li id='tab2'>Second tab</li>
<li id='tab3'>Third tab</li>
function setCurrentTab(selectedTab) {
$('li').removeClass('selected');
$('[id=selectedTab]').addClass('selected');
}
and in Second.aspx, for example:
setCurrentTab('tab2');