tags:

views:

298

answers:

5

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?

+3  A: 

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).

Frank Schwieterman
This isn't working either. I get a message in the console "Reference Error: handleSubmit is not defined".
radesix
Actually... this DOES work after I figured out how to use FireBug! Thanks for the tip guys!!!!
radesix
+1  A: 

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

Ryu
This isn't working either. I get a message in the console "Reference Error: handleSubmit is not defined".
radesix
+1  A: 

Use javascript:void(handleSubmit(page number here));.

Eli Grey
This doesn't work. At least not in Internet Explorer
radesix
A: 

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 :)

Rin
A: 

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.

levik
For whatever reason... on the website at issue... this doesn't work.
radesix