Reputation: 6262
I have a problem in which a website presents me with a list of several thousand pages of 50 items available per page. Unfortunately they did not offer a way to "jump" pages.
For example, if I am on page 1 and I want to go to page 2500 out of 5000 my only option is to click the highest page number displayed on the screen (in increments of 5). This will advance me 5 pages at a time until I get to page 2500. As you can imagine this takes an enormous amount of time.
I noticed at the bottom when I hover over the page number I see "javascript:handleSubmit(6);" where 6 represent the page number I am hovering over.
If I could somehow just replace this 6 with 2500 I think I would be in business. I did some searching on injecting javascript into a webpage and from what I read I should be able to simply type my statement in the address bar without any http:// or other info... just javascript:handleSubmit(2500);
Unfortunately this isn't working. Is there something else I need to know? How can I accomplish my objective?
Upvotes: 0
Views: 4958
Reputation: 117499
While puttig JS into firebug as many suggest will work fine, you don't actually need firebug.
Putting
javascript:handleSubmit(2500)
into the URL bar of your browser and clicking Go / pressing Enter should work.
Incidentally, most bookmarklets work on the same principle.
Upvotes: 0
Reputation: 9811
Other way, Firefox and Greasemonkey
(alert with input number of page u are would like to be and after it javascript:handleSubmit(x)
... should work, but i don't have any experience with monkey :)
Upvotes: 0
Reputation: 8739
The easiest way to inject javascript is to use the firefox firebug console.
Although on the address bar
javascript:handleSubmit(2500)
should work if handleSubmit is a global function
Upvotes: 1
Reputation: 24480
You can do this with firebug... Put a breakpoint on the code. Step into the call, but then modify the value of the parameter in the watch dialog before it is used. Alternatively, add "handleSubmit(2500)" as a value to watch in the watch menu (that will evaluate the expression, with side effects).
Upvotes: 3