Get a value from extern webpage | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Get a value from extern webpage

I want to get the value of a hidden input element,which is on a extern webside. it has no id just a name. is there a possibilty to get that? if yes how?

23rd Dec 2018, 8:04 PM
jack
jack - avatar
12 Answers
+ 1
Yes it is possible just do the following: var a = Document.GetElementByTagName("input")[?]; // At the ? put the Number position of the input ex if you want to get the top input ? is 0 and if you want the middle one of the three it should be 1. a.value; // gets the value from a ex if we have a Number input and the input is 298 then a.value is 298.
23rd Dec 2018, 8:56 PM
Vanessa Nilsson
+ 1
Search around for it and I Hope I helper!
23rd Dec 2018, 10:19 PM
Vanessa Nilsson
0
And where do I direct to the extern website and does it matter that the input element is inside a form element (it's preset so no user input )
23rd Dec 2018, 9:50 PM
jack
jack - avatar
0
No it doesnt matter that the input is in a Form and wdym With "Where do I direct to the extern Website" I didnt quite understand ?
23rd Dec 2018, 9:53 PM
Vanessa Nilsson
0
the elemnt is on a webside www.example.de and from there i need the elements value on my own Website so i can work with that
23rd Dec 2018, 10:12 PM
jack
jack - avatar
0
I dont Think that is possible I could be wrong
23rd Dec 2018, 10:16 PM
Vanessa Nilsson
0
i think it is
23rd Dec 2018, 10:18 PM
jack
jack - avatar
0
Helped*
23rd Dec 2018, 10:19 PM
Vanessa Nilsson
0
yes you did in case of the id problem thx a lot for that
23rd Dec 2018, 10:25 PM
jack
jack - avatar
0
No problem
23rd Dec 2018, 10:29 PM
Vanessa Nilsson
0
found sth like a xml request ill test it now
23rd Dec 2018, 10:32 PM
jack
jack - avatar
0
ok
23rd Dec 2018, 10:32 PM
Vanessa Nilsson