I’m trying to make simple blog increaser on my counter, well with HTTPSockets i dont know working yet and i tried but not increasing page count on live webcounter, so i get idea to make htmlviewer and load it there.
So what I’m trying to do is to tell my app to load my website blog BUT first it have to go throught the google search and by looking my tags i set in textfield, going after to the textfield2 final destionation my blog url.
So I have:
TagsField.Text
URLField.Text
HTMLViewer
GoButton
HTMLViewer1.LoadURL("https://www.google.lu/search?q=" +TagsField.Text and URLField.Text)
But this doesnt work
So again the steps IF IT’S possible:
I hit GO and it will go to google search and type and show the “TAGS” what i enter in app to the “TagsField.Text” and then once it load in HTMLViewer1, it will go to the URLField.Text (my blog url)
Thanks for any help or topic where could i found more info.
PS: Please as i saw many laughing on me here, note i’m just a very beginner and i want to learn, so i do appreciate more explication if you will take your time.
Difficult to exactly explain what is going wrong for you. Could you come up with a real example (real URL + tags) from a web side. You don’t have to use your own Web site.
If you test you own example in a web browser (“https://www.google.lu/search?q=” +TagsField.Text and URLField.Text) do you get the right result ?
Well i have a error, but when I delete urlfield.text, i get results in htmlviewer1 the tags i type in textfield, so it show up but with following in browser search: “tags+https://www.google.lu/search?q”
And real example? Well ijust said I have 2 textfields where i enter 1. URL and 2. Tags. Which will do and simulate that visitor to my blod/site comes from TAGS search from google. Thats i wanted to make.
So if my blog is music blog and i would like to get in statistics that visitors comes not direct but from search on google, i type in filed my website tags: “exmple: how ot make xojo app” and htmlviewer will show first the search results and then he go to url ,my blog (this i type in url text field)
Thanks
It doestn work
Ok lets again what i want to make is this following:
1. I type in TagsField.Text my tags i want it search after hit start 2. I type in URLField.Text my final destination url ,after the search tags will be found in HTMLViewer1
SO when i PRESS START/GO button what happes is the HTMLViewer go and search in google the tags I enter in TagsField and once it find and load it in HTMLViewer he go to URL i type in URLField.
that all
thanks for help
My actual code under the StartBtn is this (but not working):
If TagsField.Text = "" Then
msgbox("Please Enter Some Tags")
End if
If URLField.Text = "" Then
msgbox("Please Enter Some Valid URL")
End if
HTMLViewer1.LoadURL("https://www.google.lu/search?q=" +TagsField.Text + ", " + URLField.Text)
Try converting your string into a “URLComponent” String like
Dim text as String
text = “https…” + TagsField.Text+", "+URLField.Text and so on
then
text = ConvertEncoding(text, encodings.UTF8)
text = EncodeURLComponent(text)
dim url as string = "http://maps.google.de/maps?hl=de&q="+text+"&ie=UTF-8"
It doesnt load the URLField.Text only it load the TagsField.Text (tags in google) then it stays there and not going to url.
"
Christian Jung
is not verified 18 seconds ago Hannover
what Rick said is important - have u ever tested the String itself on your browser?" I dont know what you mean, im just beginer if u could more details.
Thanks
“set a breakpoint at HTML Viewer1.LoadURL url” ?
Sorry i dont know much expressions as i told im beginer
If you want help then write what to write exactly to each button.
I just put this code to StartBtn thats all:
Dim text, url as String
If TagsField.Text = "" Then
msgbox("Please Enter Some Tags")
End if
If URLField.Text = "" Then
msgbox("Please Enter Some Valid URL")
End if
text = TagsField.Text + ", " + URLField.Text
text = ConvertEncoding(text, encodings.UTF8)
text = EncodeURLComponent(text)
url = "https://www.google.lu/search?q="+text+"&ie=UTF-8"
HTMLViewer1.LoadURL url
then i dubugg and i enter tag and url in next field, but it load only google search tags i entered and stayed on that page in htmlviewer, not going to url i enter in urlfield; thats 2 url fields
i tried to put it also in htmlviewer document complete but it doest stay there and refreshing fast the URLField.
but it works.
under startbtn i enter loadurl tagsfield then it load googlesearch + tags but afetr it redirect to the urlfield all ok but as i said it keeps clicking and refreshign very fast, so i want it stay there
MY TAGS WHAT I TYPE IN HERE: TagsField.Text hiphop+blog MY URL WHAT I TYPE IN HERE: URLField.Text www.bloghiphop.com/
It is only example to tell htmlviewer if pressed StartBtn to load First: TagsField and after google search load with tags SECONDE : go to URLField final destionation. Thank you
ok, the first thing you have to get into functionality is the string in the browsers commandline. I assume you won´t get your idea of first and 2nd step in one single browserline flyin…
then you can use that “working string” inside xojo…