I am doing semantic searches via Special:Ask: [[Has home::Barcelona]]. However, I would like Barcelona to be an input variable by any user from a textbox. In other words, Barcelona might be Madrid, Rome, or New York. When clicking Search, it would appear the results.
I've found extensions like the extension InputBox, but it seems that it is not what I want. Do you have any idea how could I obtain this?
Related
Im failing to find the correct terms for what I'm looking to do. I'm not a coder but I can get it done If I get pointed in the correct direction.
I have a network of sites. A main website, a blog, and 3 different woocom stores (international legal reasons all 3 need to be completely separated) I need to be able post a link to a product,let's say "www.--.com/product-x", on the main site the blog or a stand alone link in maybe a Facebook post. Once a potential customer clicks on that link I want them to be sent to a region select page of which there are 3 options. But I don't want them to just be sent to the landing for the woocom store of there selection I want them to be sent to "na.--.com/product-x" or "eu.--.com/product-x"
If it were just 4 or 5 products I would just duplicate the region select page but this isn't realistic. I'd like to compile the "/product-x" part of the URL from where they clicked from,and the "na." And "eu." Part of the URL from there selection.
I'm willing to do some possibly cumbersome .htaccess upkeep or add the pathways individually each time a new product link gets made of that keeps things simpler but aibjust don't want 100 region select pages.
I am aware of Geo-redirects but I'm just not there yet. I for the world can not type the correct thing into Google to find any help on this, and it's not conceivable to me that this is an original idea.
What is this called?
I am using the Google Maps API autocomplete. When I type in an address, I get suggestions. Valid results are bold, but invalid results are not. So, I might get an item in the drop down where the street name is bold, but the number is not:
So, if the users chooses 829 Wakely Terrace, I call getPlace and populate my address fields. But since its not a valid number, it looks like the number get stripped out. This is a confusing experience.
Can I force autocomplete to not do this?
Concersely, do I need some kind of "Did you mean this address?" functionality? Can anyone point me to an example of where this is handled well (Not for code, but UX purposes)?
I have a sort of answer. We were using the autocomplete widget from Google. Is till find it weird the whole bold/not bold thing, but if you use the AutocompleteService, you get the raw suggestions as JSON from Google. So, you need to do some more work to make the front end work, but you have a lot more control and con handle the situation as you see fit.
I am using google map API to show our locations in a website
The problem:
I search something opening google.com and navigate to map, it is same as the locator on the website. It gives the same result.
When google is opened in local and navigate to map and do the same search, it will navigate to same place however the name is different. Please note it is not that name is in English and French that's the reason it is different. Basically this region on question is disputed over the countries.
Description:
When client opens google in his locale e.g. https://www.google.fr/ and navigates to google map he gets a different result, the name is different for the same place in google map as the place is in the border of 2 countries .
If you open by google.com it will show the widely accepted name whereas if you open google.xx and then open the same location the name will be different.
The locator by default is showing the global name in the website which the client does not want, he is asking for showing the name as displayed when opening from their region.
Is there a way I can set something like a data source or something to show google map based on some particular region.
Help will be appreciated.
Regards
Take a look here.
You can add an optional language parameter to the <script> tag when including the Maps API JavaScript code, specifying the language to use. For example, to display a Maps API application in Japanese, add &language=ja to the <script> tag.
I am relatively new to Codeception and am trying to perform acceptance testing of a form using it and Selenium WebDriver with Firefox. The form (available at http://www.brighton-hove.gov.uk/content/parking-and-travel/parking/find-your-parking-zone ) consists primarily of a text box and an auto-populated which is inserted into the DOM in the event that the input into the text box results in multiple matches; each field also has a submit button.
The issue I am experiencing is that, when tested normally in Firefox the behaves as expected and is auto-populated in cases where the initial, textual search returns multiple matches (for example, entering any Brighton postcode, although the particular scenario is to search for 'Brighton Town Hall, Bartholomew Square', which returns 3 results). However, when attempting to test via Codeception (either running a complete test or attempting each step via the console), the gets inserted into the DOM but never appears to be populated with real results (the only element it contains being 'Please select your address...').
My test steps are as follows:
$I->amOnUrl('http://www.brighton-hove.gov.uk/content/parking-and-travel/parking/find-your-parking-zone');
$I->fillField('Enter your postcode or house number and street','Brighton Town Hall, Bartholomew Square');
// XPath is used here as the form elements' 'id's, 'class'es and 'name's are auto-generated (the one above just happens to have a label).
$I->click("//div[#id='achieveform']/form/div/div/div[1]/div[1]/div/div[3]/div/input[#type='submit' and #value='Search'])";
// I've also tried using 'submitForm(...)' here, rather than just clicking the button.
// Wait an unnecessarily long amount of time in the hope that the dropdown appears and is also populated...
$I->waitForElement("//div[#id='achieveform']/form/div/div/div[1]/div[1]/div/div[7]/div/div[3]/div/div[1]/span/select", 5);
// The first option is there...
$I->seeElementInDOM("//div[#id='achieveform']/form/div/div/div[1]/div[1]/div/div[7]/div/div[3]/div/div[1]/span/select/option[1]");
// ...but it doesn't have 4 options, as expected.
$I->seeNumberOfElements("//div[#id='achieveform']/form/div/div/div[1]/div[1]/div/div[7]/div/div[3]/div/div[1]/span/select/option", 4);
Although the test I am looking to perform is essentially black-box my next course of action is to attempt to look into tracing the form submissions and DOM updates, even though that level of knowledge of the underlying structure of the system should not be necessary. Am I overlooking something simple? Any pointers would be appreciated.
Apologies, it turns out it wasn't anything to do with Codecepetion after all: the issue was partly to do with the backend logic behind the search form (which doesn't seem to like the comma) and partly due to me for not noticing that the behaviour with the empty dropdown did actually also occur when performing the same actions outside of Codeception.
Moderators: this thread can be closed/removed (as the issue was a non-issue within the context of Codeception) now.
Seems you are not filling value in the right field or the text input field of the search box:
instead of:
$I->fillField('Enter your postcode or house number and street','Brighton Town Hall, Bartholomew Square');
Use:
$I->fillField('.dataelr input', "Your Value here");
Hope it helps.
I'm instantiating a google maps Autocomplete box, as such:
autocomplete = new google.maps.places.Autocomplete(input, options);
Now, when a user begins typing and the list of suggestions appears, if a user simply presses Enter I want the number one prediction to be used as the search term.
For example, when a user searches: London, I want to pull out and send London, United Kingdom - simply by the user pressing Enter.
I can pull out that prediction using (with the latest V3.11):
autocomplete.gm_accessors_.place.Gc.predictions[0].wg
However, this obviously relies on the "compiled" object names, such as Gc and wg which will change as Google updates their codebase.
What is the correct way of doing this? Is it supported by the Autocomplete API?
Notice
Please star this issue on Google to get a solution:
https://code.google.com/p/gmaps-api-issues/issues/detail?id=4945
there is no correct way when using places.Autocomplete, it's not implemented so far.
What you can do: the API creates the dropdown, a div with className "pac-container", and within that div for each prediction a div with the className "pac-item", you may use the text of the first .pac-item as value for the input.
A correct way would be to request the Places Autocomplete Service , but then you need to create the dropdown on your own.