HTML Dropdown Menu Selections within URL - html

I'm not really sure how to ask this question, or whether it's even possible. I have previously built an android app that searched for data within a specific webpage and returned the data to the app. This app worked perfectly for over a year until the website in question performed a site wide session of prettying itself up, and in doing so, inadvertently breaking my app.
Within the new designed website, a dropdown menu has been added, which has several selections:
'Show20News',
'Show50News',
'Show100News',
'Show250News',
'Show500News'
The default selection is 'Show20News', and what I want is to make a selection of 'Show500News' instead. However, I want to append the selection to the URL, rather than manually selecting it. I have contacted the websites web team who just can't seem to understand what I am asking for, hence my visit here.
The website link:
https://www.londonstockexchange.com/news?tab=news-explorer&results=500&indices=AXX&sources=RNS&period=daily
What I'd like to achieve is adding the 'Show500News' selection from the dropdown menu to the end of the above URL, to avoid the manual process of getting the same results.
If you take a look at the source code of the link above, you will notice that there is no code that represents the possible selections. It is this that has me stumped. If possible I'm hoping that someone maybe able to nudge me in the right direction, or at least tell me if and why it's not possible. Thanks.

Related

Use a specific part from another website and implement it to my own

This might sound like a very strange question but I'm wondering if it's possible to take only a small part of an original website and use that part on a new website without having the direct access to the database?
The site displays latest entries of items added to a database and it contains a lot of stuff that is unnecessary which I want to get rid off. The new site should supposedly only display the div with the id "content" and everything in it. Here is the site: link to site
I've tried to inspect the elements on the site and copy the html code but the problem is that it converts all the added items to string instead of loading it directly from the database.
The reason why I want to learn how to do this is nothing more than an interest in how it can be done that could be helpful later on.
What you can do is two things. If you want to get the data from a website that doesn't provide an API you can write an HTML parser to grub the desired data. Note that this is likely to break in the future, if the original site makes any changes to the html.
If you want to display a part of the website as it is you can use an iframe to embed the original site to your site and then use js to hide what you don't want to show. See here for more info.

Hyperlinks (to Sharepoint) in MS-Access tables not behaving as expected

Hello StackOverflow community,
I've just started having an issue with hyperlinks stored within an MS-Access table not behaving as expected.
I have a small database which, among other things, records links to documents hosted on a company Sharepoint site. Until a few days ago, all was working fine with both the database and the hyperlinks.
For some reason, within the last few days, whenever I (or any of my users) click on these hyperlinks through an Access form (or me clicking directly from the tables), I am getting strange behavior:
Clicking the link does open a new instance of the default browser, as desired. And that browser does navigate to the company Sharepoint site. But none of the links actually open the specific document that they are intended to point to.
Instead, all links are bringing up a general file/folder menu within the Sharepoint site. It is almost as if these links point to a non-existent file within an existing folder.
The very strange part is, if I "edit" any of the hyperlinks in my database, and simply select and copy the "address" text from within the edit hyperlink window, I will always immediately pull up the correct desired document if just paste the address directly into a new browser window.
I would have thought that this type of cutting/pasting would necessarily be equivalent to simply clicking the link. But that is obviously not the case.
I feel like I can safely rule out the possibility that any changes to the Sharepoint site itself would be causing my issue with simply clicking the links (otherwise cutting/pasting the addresses would not bring up the correct documents), but I have to admit I am simply stumped as to why just clicking the hyperlinks directly used to work, but no longer does.
I don't believe there is any code or other relevant information that might be helpful that I am neglecting to include, but would be eager to provide any clarifications/etc if anyone has any idea as to what might be happening here.
Thanks in advance for any thoughts or suggestions!
~JQN
EDIT: I had deleted this question because the issue described above had simply stopped happening. I was unable to explain why, but was also unable to reproduce the issue again after a certain point within a day or two of making the original post.
Since then, the issue has returned. I've been able determine the following:
As described in my note below, when I am getting this odd link behavior, I do NOT get the standard warning from MS-Access indicating that hyperlinks may be harmful, etc.
Strangely, simply opening up a file dialog/file picker and then navigating through that dialog to any location on the (sync'ed) Sharepoint site seems to make the problem go away. I do not need to actually select or open any location on Sharepoint, simply navigating within the sync'ed folder structure seems to do the trick.
Once this happens, all links behave as intended again (ie. they open the correct linked file directly instead of landing on the root folder page). They MS-Access hyperlink warning returns as well. The file/link behavior will remain in that state for several days. Only after, I'd estimate, a week or more of inactivity since the file dialog was last run will the issue return.
FURTHER EDIT: New update...Enough time has passed so that the issue is recurring again. As suspected, links to pages outside of Sharepoint are not affected, and open as expected without issue. Once again, the standard Microsoft hyperlink warning dialog is not coming up for any links.
Obviously, now that I've found the work-around with the file dialog, it's easy enough for me to fix the issue when it arises. I'm hoping that this rings a bell with somebody, though, and perhaps one of you could point me in the right direction for a more complete fix for my users.
Thanks again for any help with this!
YET ANOTHER EDIT: Ok....based upon all the things I've learned in the last couple of weeks (as captured in this post and the comments below), I was about to delete this question and re-post it as "Why is Sharepoint redirecting my URL requests from MS-Access?" As I tried to search the forum to make sure that that question hasnt already been asked, I stumbled across some info that I think gets at the underlying issue:
It looks like this is related to the (very opaque) way that Office processes URL requests. It apparently doesn't simply open the document at the specified link, it first "pre-tests" (I suppose that's the right word) the URL by sending a "Microsoft Office Protocol Discovery" request first.
Apparently, it is possible for Sharepoint to somehow not like the particulars of that MOPD request, and if that happens, then Sharepoint redirects to the file directory page -- and that directory page ends up being opened in the browser instead of the intended link/document.
Again, this only happens sometimes and not others. When it does happen, I've found a clumsy workaround that will correct the issue for about a week or so. I can't reproduce the issue during that week, I just have to wait for the workaround to expire (I obviously don't fully understand why my clumsy workaround works).
It doesn't seem possible to manipulate the particulars of the MOPD request. If possible, I'd love to be able to dispense with MOPD entirely, since I want all the files I'm linking to via Access to be opened as read-only anyway. Unfortunately, I don't think that that is possible either.
I've found some info on this in another SO thread HERE. I still am not quite at the point where I feel I'm ready to submit an answer to this question, but I have some ideas as to what sorts of things may function as an acceptable workaround.
It would be helpful if anyone had any ideas as to how I might be able to reproduce the issue on demand, rather than simply waiting another week for whatever keys/cookies/settings/etc to expire again. I'd need to implement any possible solutions entirely on the Access side of things if possible, rather than on the Sharepoint/server side. Thanks again for any suggestions!
I'm posting this as an answer now, but will avoid accepting it until I've had a chance to verify that it actually works.
I am inserting some code that will run on DB startup. It will open a (an invisible) form that has an Access WebBrowser control included. I'll have that control navigate to a specific file on the Sharepoint site. I believe that it is actually this action that somehow causes the link problems to resolve for a week of so.
This form will run silently in the background, navigate to the sharepoint file location, and then close. This should hopefully refresh whatever characteristics of the MODP request that are present when the links work properly (and are absent while they aren't working properly).
In essence, I'm hoping this approach will have the effect of resetting my (approximately) one week window of desired link functionality to start anew each time the database is opened. In other words, I'm thinking that this will work, although I still don't fully understand why.
Wish me luck!
;)

View Source Information for Dynamic Tables

I have a vb.net web project that contains some dynamically filled tables. I recently changed how this data is calculated, and now it is not being displayed properly. There are many web tables being nested inside of each other, and I suspect that I messed up something with how those tables are being nested. I'm still quite new to web development, so I'm having some trouble tracking down where the issue is originating from.
I've learned that I can view the source code for my webpage while I'm debugging it in a browser by right clicking in the browser and selecting something like 'View Page Source'. This is very helpful for visualizing how various tables are nested inside each other, and has helped me fix a couple issues already. However, I've noticed that the dynamically created content doesn't seem to appear in this source anywhere.
For example, if I make a web table that loads usernames from a sql table and displays them, searching for a given username in the source will return 0 matches, even if I can see that username on the screen in the debug session I'm currently running.
A couple questions:
Why does my dynamic data not show up in the source?
Is there a way I can make it show up?
If not, what other ways are there to examine how the different tables are nested at runtime after I've filled my tables with data?
UPDATE:
I did some more research, and it looks like any code that is run on the server isn't visible in that piece of source that I mentioned above. I do have runat="server" set for my table, so maybe this answers my first question. I'm still lost on the other two though - and those are probably the more important questions in terms of helping me fix my problem I'm having.
Look into using a devloper console in your browser. Chrome's is good - just right-click a control on the page and 'inspect element' or press F12 and use the magnifying glass at the top left of the console to select the area of interest. Firefox also has one, and I think modern versions of IE do too. Makes it a lot easier to investigate styling, contents, etc. and may help you locate your usernames. If they're on the page then they'll definitely be in some source code somewhere, just possibly not in an obvious place.

How can I find out the POST form sent to an ASP page?

There is an online dictionary I would like to add to my search engine list in Google Chrome. The problem is, the website in question does not show the form used in the address bar, so I can't just substitute the search term with %s in Chrome like other search engines.
I know barely anything about developing web pages or web scripting languages, so I'm not even entirely sure that POST is the correct term for what is going on here.
Here is the website I am talking about. If you type a word in the English-Basque box and, "dog" for example, and hit Search, it just shows http://www1.euskadi.net/morris/resultado.asp, obviously not containing "dog". I've inspected the sources of both the HTML page of the first link and the ASP page of the results page, but don't see anything blindingly obvious, but then again I don't really know what I'm looking for.
I use this dictionary a lot, so being able to add it to Chrome and use a simple keyword for it, I can just use the keyword and a search term in the omnibar instead of having to load the page every time, saving much time. :)
If anyone can point me in the right direction for how to figure this out, I would greatly appreciate your help. Thanks!
Someone else seems to have found a workaround for your problem;
It consists of writing a FORM using javascript instead of a URL in Chrome.
A cleaner alternative would be to write a proxy page; a page that you write in asp/php/whatever that can take querystring parameters coming in, and then POST these parameters to the euskadi.net pages, returning the results.
This will require you to have a server or hosted page somewhere online though.

Android: How do I retrieve problematic data from a specific webpage?

I have used .NET and ShDocVw for years to grab data off webpages without any issues I couldn't overcome. This website has me beat though. It seems like such as easy task to grab the titles and other information off a library search page, but I can't see the data to be able to grab it. Usually, I just look in the DOM, but the data wasn't there. I did a view source, but the data wasn't there. I am so confused.
I am learning Android right now and that is how I would like to solve my problem, but if .NET would be easier... Right now I will take any help, in any form.
The URL is http://catalog.kcls.org/opac/en-US/skin/kcls/xml/rresult.xml?if=&it=h&bl=&lf=&a=&la=&cl=&d=1&l=1&s=pubdate&sd=desc&adt=ml&tp=&t=bibcn%3ADVD%20FIC%20ON%20ORDER&av=&rt=multi
For this specific website, if you disable javascript in your browser, you will see they give you a link to a plain html search portal
http://catalog.kcls.org/opac/en-US/extras/slimpac/start.html