Implementing 2 different google custom search boxes on same page - google-custom-search

I have implemented two different Google custom search boxes (GCSE) on my website http://theoff.info/: (1) gcse for website search (in header) (2) gcse for hotels in ladakh (after main slideshow in a column Search Hotels in Ladakh). But both deliver search results of the second gcse because both search box codes assign unique gcse codes to same variable cx.
I changed the cx and gcse to cx1 and cx2 and gcse1 and gcse2 in widget area of my website as suggested at How to have multiple Google Custom Search field on the same page. The search boxes disappeared from page http://theoff.info/. So I have reset cx and gcse. I am getting same results from both gcse boxes.
Could you tell me how to rename var cx and gcse in the code?
Or
any other easier method to force the two different engines to produce two different kinds of results?
Thanks

Related

How can we get the sum of the current page rows/data and how do we know new page is being added in multipage widget?

How to find sum of all the rows in a particular page. I am using Multipage widget and my data (rows) span across multiple pages. So i want to achieve the below.
End of the every page i want to show, sum of number of rows printed in this particular page.
I show the data by grouping the category. for ex, if i take the classic example of invoice page that was given in dart-pdf package in the below screen shot, it shows 10 detail record rows in this page. so in the footer record for this page, i want to show total number of row = 10 and total $ amt = 955.82. This is one problem i am facing. Footer callback function is being called after all detail records are painted and hence i assume i can't use this callback. but i can try store the detail records count in some global variable and can use this in footer call back but the problem is how do i know this is last row is being written in this page. I am unable to find out any call back to say new page is added or end of page etc. if i know this is end of the page then i can count how many rows written so far. similarly if we have any callback explaining new page is being added when data span across multiple pages that would be nice to achieve.
Another use case is, assume that your invoice page (above screen shot) is given for one category (in other words group by category) and if this category span across to next page then in next page first row, i should say this "same category invoice records are continued in this page". In order to show this, i need to know whether new page is being painted or not. is there a way to achieve this?
my widget tree is pdf.addpage -> multipage -> Table -> tablerow -> other widgets.
Appreciate the response. Thanks!

Trying to Message User which option was selected from content control dropdown list

So basically I have a content control dropdown list called "Letterhead", and I'm trying to make it so when the user exits letterhead the name of the quick part selected is displayed. My code right now (below) displays the name "Letterhead" rather than say "Mesa" which is the name of the letterhead inserted.
MsgBox "The user selected a file, specifically: " & ContentControl.Tag
And here is the result
The content control contains images for 4 cities, and each one is a quick part with a name, i.e. "Toronto" or "Mesa". These Names are within the Letterhead category, and the AutoText Gallery, so the dropdown menu allows users to select one of the images from the letterhead category, I am just trying to figure out the code that would state the name of the image (i.e. Mesa for the Mesa letterhead)

How to fill webpage (Google) values using excel VBA

I'm trying to fill Google account registration form values using excel vba. I'm getting errors while filling below fields. Kindly advise.
Webpage Link - (Google Registration Page)
https://accounts.google.com/SignUp?service=mail&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F&ltmpl=default
1) Month Combobox
2) Gender Combobox
The code that I'm using to fill above fields is
wb.Document.GetElementById("HiddenBirthMonth").Value = 1
wb.Document.GetElementById("HiddenGender").Value = "Male"
Where WB is the object of "WebBrowser"
Taking a look to Google's form page code you can notice both fields are dropdowns.
To customize the dropdown Google used a workaround making both Gender and BirthMonth hidden fields and giving them these ids:
HiddenBirthMonth
HiddenGender
You can use the send key to put the information or select options.
But while using send keys you should loose the focus from webpage.
Ti use send keys code first do manually and identify the sequence.

SSRS Report Builder - Only Show Header On First Page (With Page Numbers)

So I am running into the problem where my report header is being displayed on every page, but I only want to display it on the first page. The solution that people on this forum have given is to just put the header in the main content. The problem with this is that my header shows the page number + total pages (i.e. Page 1 of 3 pages). I cannot move my header to the body because I will lose access the page numbers. For some reason, Report Builder will only allow you to have access to the page numbers via the header. Does anyone have any solution to this problem?
Write an expression to hide the textboxes that hold the header information.
The expression would look like this:
=iif(Globals!PageNumber = 1, FALSE, TRUE)
To get to the expression property:
right-click text box >> text box properties >> visibility >> select "Show or hide based on expression" >> insert expression above
cheers
I had the same issue, where I only wanted the header to show on the first page. The solution I came up with was to stick all of my objects from the header into a rectangle, so it was now acting as a container. I then placed that container into the body. In the report properties, in the code section, I borrowed from this post Access Page number in report body In SSRS to create functions, which would allow me to pull the page numbers into the body section. Then in my rectangle/container, I set the visibility property to =code.PageNumber>1. I hope this helps!
I did this, just to make it easier the two functions you want to add to the Report that were linked above are,...
Function PageNumber() As String
Return Me.Report.Globals!PageNumber
End Function
Function TotalPages() As String
Return Me.Report.Globals!TotalPages
End Function

Syntax for SharePoint 2010 BCS URL Action to populate New form

Have seen several posts with solutions for native SharePoint lists, including the very useful SPUtility.js (only for native SharePoint lists). But nothing to pass a value from a BCS list to a new BCS list. The Query string filter will not connect on the New form (no web part to connect it to) and does me no good on the lists page (already have that working).
A "go write custom code for everything" is not a solution for me.
There should be a way to 1) pass the value in the URL (ideal - what's the syntax?) or 2) make some other simple change, perhaps to the select list for the item -- I just can't find it. Have seen quite a few posts with similar questions. The Microsoft documentation is not useful and there are more questions on the "social" topics than answers.
Here's what I have:
I have a BCS list (sends item) tied to a BCS related list (receives item).
I have an action on the related list (ECT) to create a new item. Works fine with no parameters. I get a blank new form. The new form allows me to enter two items and choose two items (exactly as intended).
What I would like to have is the necessary ?something=something string so that my user does not have to select one of the choice items (MNumber - set as a key / required value)
User selects "New" from Actions.
Form Opens
MNumber is automatically filled in based on the MNumber of the current item displayed in the BCS related list.
The string I supply is accepted. Does nothing.
/intake/Lists/ContactsList/NewForm.aspx
/intake/Lists/ContactsList/NewForm.aspx?MNumber=1234
The string I supply is rejected - cannot be saved or insufficient values.
/intake/Lists/ContactsList/NewForm.aspx?MHICNumber={$MHICNumber}
Have also tried passing a string to one of the text fields (instead of the select field). Can't get that to work either. I've spent quite a few hours with the various boards. Nothing helpful.
Would also be nicer if I could set the New form to display in a pop-over window (as it does when I select New from the list view). Opening a new browser window is hokey and replacing the existing one is a navigation pain for the user.
Have this working ... Thanks to Kit Menke!
Created an Action on the External Content Type in the BCS....
/intake/Lists/ContactsList/NewForm.aspx?IDnumber={0}&Source=/intake/scheduling.aspx
where
parameter property 0 is the IDNumber from the ECT
The NewForm.aspx was edited to add a hidden content editor web part with references to three scripts Kit wrote - two supporting and one that sets the values.
http://site/list/NewForm.aspx?toolpaneview=2
User selects the Action on the displayed ECT list
Action uses the URL to go to the New page with the data
Kit's script adds the data to the form and puts in the date and time.
Note: The ID field needs to be a text field. Cannot be a selection list.