Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

On a webpage, there is an image, on clicking on it leads to another page. However, when I looked on the source (or Inspect Elements), I did not see any link there. Here is the source of that particular line:

HTML
<input type="image" name="main_0$contentleft_2$btn_Next" id="main_0_contentleft_2_btn_Next" vspace="10" Border="0" src="../../Images/button_next.gif" style="height:23px;width:71px;"/>


My question is: where is that link? I want to scrap the link using python.

Thanks.

What I have tried:

I googled but found no clue. As far as I know, there must be a link (href) to the image. Click on the image leads to another page but I could not find any link to image on the source page.
Posted
Updated 28-Jul-16 19:33pm

The
HTML
<input type="image">
is a graphical submit button. You must use the src attribute to define the source of the image and the alt attribute to define alternative text. The height and width attributes are used to define the size of the image in pixels.
It will just post the form
It is similar to
HTML
<input type="submit">
with an image into it.
 
Share this answer
 
v2
Comments
Member 12659127 29-Jul-16 9:29am    
Thanks. How do I get the link to the page which is obtained by clicking the image?

Alternatively, how do I get the page (source) after clicking the submit button?
Karthik_Mahalingam 29-Jul-16 9:33am    
it will do a post back, the redirection url code might be written in the server side..
Member 12659127 29-Jul-16 9:43am    
Ok thanks.
Karthik_Mahalingam 29-Jul-16 9:44am    
does it help?
Member 12659127 29-Jul-16 13:00pm    
Well, I am trying to scrap the page that is loaded by clicking that image, but I do not have any idea how to click that button in python.
Here is your link
src="../../Images/button_next.gif"

it is the source path for the image.

HTML Tutorial[^]
 
Share this answer
 
Comments
Member 12659127 28-Jul-16 21:16pm    
Well, it is the link to the image file, not the link to the page. if I open this link, it will open the image, not the next page.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900