UK Post Code returns all possible addresses - api

On a website
https://bookings.royalmailsameday.com/acinet.dll/quote
I saw a feature.
Give a postcode to input field of Postcode, and click a button "Lookup Address".{test postcode value:CR0 3RL}
Then a list of addresses is populated in a box.
Please tell me how these website guys doing it,as I tried to find by console,but no AJAX call is going out.
On a website
https://bookings.royalmailsameday.com/acinet.dll/quote
I saw a feature,
Give a postcode to input field of Postcode, and click a button "Lookup Address".
Then a list of addresses is populated as dropdown in input field.
Please tell me how these website guys doing it,
as I tried to find by console,but no ajax call is going out.

They are using an hidden iframe at the bottom of the page:
<iframe src="https://bookings.royalmailsameday.com/acinet.dll/address_lookup?addressno=XXXXX&postcode=XXXX&nocache=XXXX" style="display: none;"></iframe>
They assign the query url to the iframe and than inspect the response.
Nothing fancy nor extremely efficient, in my opinion.

Related

Splunk submit button (submitButton) does not refresh dashboard if no inputs are changed

I have a dashboard with a submit button (submitButton). The search isn't run until the button is pressed which is exactly what I want (the search takes a long time). I don't want the search starting as the user changes the other dropdowns (time), environment (Prod vs. QA), etc.
HOWEVER, sometimes it would be nice to hit the submit button and perform the search again without changing any of the other fields (time, environment, etc.). In this case the submit button does nothing! I can tell the underlying data has changed via searches, but the dashboard is not updated. Simply changing any of the fields, doing a search, and then changing them back and searching again solves the problem, but surely the submit button should just work w/o this workaround?
Thanks
If "nothing" has changed, then Submit is supposed to "do nothing".
If you want to refresh the page with all the parameters as set, you should be able to click the URL bar and press return (so long as there are no hidden tokens, they'll all get set in the query portion of the URL).
Each panel in the dashboard should (automatically) have a refresh button you can click to refresh the display without changing inputs.
Unfortunately, this is intended behavior.
I also wish that the submit button would rerun dashboard searches. I opened a post on Splunk ideas about this issue:
https://ideas.splunk.com/ideas/EID-I-739
If you have a splunk.com account, you can vote for this idea.
I've browsed through Internet and found some solution that with some modifications worked for me fine
<form>
..
<html>
<style>
div.fieldset.dashboard-form-globalfieldset div.dashboard-element.html.dashboard-element-html {
display: inline-block;
}
</style>
Refresh
</html>
...
<form/>
so basiclu im refreshing page with all of its attributes and passing attributes values form current ones chosen using tokens. splunk code didn't like & so replaced it with & and it worked fine. <> - can be found in your splunk page address.

How can I use Algolia on Shopify to show accurate search results when I input more than one word in the search box?

I am using algolia app for my shopify project. When I tried to input two words in the search box, the autocomplete results are really accurate. The problem is that when I hit enter key to go to instant search page, the results are not accurate anymore. Is there any settings to help me fix this problem?
This is the screenshot on my problem:
If you already enabled Instant Search on your shop and still have the default Shopify search results page, it's most likely the provided CSS Selector is incorrect.
The Instant Search widget provided by our Plugin needs a CSS Selector in order to render the results in the search results page.
If you wonder how to find the proper CSS Selector value, please read this post that explains how to do it.

Big Cartel Contact Page - Captcha LIQUID Error

I changed a few minor things on my Contact page: I removed my address and phone number fields. Now, the Captcha is showing "liquid error" instead of loading.
I also copied the whole contact page and pasted into the Cart form. I'm trying to customize the site so there is no real checkout, but rather you can only contact me to place an order.
They both show the same liquid error instead of loading a captcha, and click through to an error page if trying to send an email.
Does anyone know how to fix this? Is it possible to work around, and keep the Cart as a clone of the Contact page? I wouldn't mind if I had to erase the contact form and just added a link on a simple page to email me.
Thanks very much.
The liquid error is a result of pasting the contact form fields into the Cart page - that will only work properly when it's used on the built-in Contact page, and not anywhere else in a Big Cartel shop.

Passing variables? wordpress

Hello all I'm very thankful for this community here, wouldn't know what to do without you all.
First of all, I'm not even sure if the title to this post is accurate; please read on. In a nutshell what I'm trying to do in Wordpress is create a 'reply' button that will be displayed on the individual post's page. When someone clicks on this 'reply' button it will take them to a different WP page that is using a private messaging plugin. On this page I would like the 'to:' field to automatically know who to reply to (author of the post).
Now here's my question. Is this accomplished by "passing a variable" from first page to the second or is there another way to do this?
I'm not asking for specific code help so please don't tell me to go talk with the plugin developer. I'm just trying to get a general idea of how something like can be accomplished so that I can do some research myself.
At the very least, If someone get give me a starting point for me to do some google research that would be all I need. Being fairly new I don't even know what phrase I should be googling for.
Yes, you can do that by implementing simple wp plugin. First of all you need to know that, there are lots of wp specific functions. You can use the_content for putting your reply link after post content, and get_author_meta in order to get post's author email for putting it in your custom link. I know, you don't want to talk about code, but I can give you sample example; In order to apply this functionality on all post, you can simply implement a plugin.
Edit: For redirecting to Private Messaging plugin's send page with prepopulated recipient field, I have updated get_the_author_meta('email') with get_the_author_meta('user_login'). Now, you can go to mail send page, by clicking Reply link
add_filter('the_content', 'add_custom_link');
function add_custom_link($content) { // You can think that $content => individual post
if(is_single()) {
$content .= 'Reply to this post';
}
return $content;
}
Save this code in a php file and zip it.Then, upload it to your wp site as plugin. And you will see your custom link at the end of your posts. Do not forget to update variables in plugin according to your needs(for example reply url domain)
Here is a working plugin demo: http://huseyinbabal.eu01.aws.af.cm/?p=1
Create a form that posts to the secondary page.
Use a hidden form field to pass the post ID
Make sure you prefix the form fields so your $_POST variable doesn't conflict with any other core/plugin variables
On the secondary page: make sure you sanitize that user input before you do anything else
with it
use the sanitized post id to look up the post's author, without
having to expose the author's email in the url.
Your Form should look something like so:
<form action="url-of-page-2" method="POST">
<input type="hidden" name="myprefix_id" value="<?php echo get_the_ID();?>">
<input type="submit" value="reply">
</form>

Sitefinity 4.4 - Dynamically change page title and description at runtime

Does anyone know how to dynamically change the page title in Sitefinity from a regular user control?
Our scenario is simple. We have a real estate website with a search feature. On the search results page we have a control showing the search results, but we need to be able to change the Page title, description and keywords based on the search performed.
We posted on Telerik, but they gave vague answers and pointed us to incorrect objects or objects that didn't actually work.
?
Regards,
Jacques
The way I've usually done this in the past is by using an external widget template.
By mapping your widget template to an external file, you can use a full User Control (.ascx file) which means you can also run code behind.
From there it's just a matter of running something like
Page.Title = "whatever";
For more info on using an external template for Sitefinity Widgets, check out this post: http://www.sitefinity.com/blogs/joshmorales/posts/11-05-10/mapping_external_templates_for_sitefinity_4_widgets.aspx
Hope this is helpful!