I'm trying to use the values from an HTML dropdown menu to change the 'where' of the Google Spreadsheet query HTML table. Here's the dropdown as I have it so far:
Solution 1:
$('option').click(function(e){
var$item = $(e.currentTarget).attr('value');
updateIframe($('iframe'), $item);
});
functionloadIframe(iframeName, url) {
if ( $iframe.length ) {
$iframe.attr('src',url);
returnfalse;
}
returntrue;
}
CopySolution 2:
You can do this using javascript. First you need to add id to the selectSo change your list to<select id="myID"> <====== heres the change
<option value="volvo">Volvo</option>
<optionvalue="saab">Saab</option><optionvalue="mercedes">Mercedes</option><optionvalue="audi">Audi</option>
</select>
var value = document.getElementById("myID");
var selectedString = value.options[value.selectedIndex].value;
Copyhere selectedString contains the value to be added to the string in IFrame.var Url="https://docs.google.com/spreadsheets/d/*spreadsheet key*/gviz/tq?tqx=out:html&tq=select+A,B,D,E,F,G+**where+D+contains+selectedString+&gid=2105149734"Copyor use innerHTML
Share
Post a Comment
for "Change Link With Html Dropdown"
Top Question
Right Floated Element Disappears When Using Columns In Firefox
I am using an ol element with column-count and column-gap p…
Remove The Button Inside The Dropdownlist
Is there a way to hide or remove the arrow button inside a …
Adding Asterisk To Placeholder, Or A Nice Way To Mark Required Fields Via Placeholder
I'm looking for a way to style the asterisk in the plac…
Mystery Margin Or Padding On List
I cannot figure out where the padding is coming from the on…
Homepage Slow To Load
When I go to the homepage of my website after clearing my c…
How To Add Placeholder Field?
I've been trying to add placeholder in input type='…
Continuous Image Swap While Mouse Is Hovering
i have an idea but i'm not quite sure how to execute it…
3 Columns + 100% Height
I need same as in the http://blog.html.it/layoutgala/Layout…
Escaping & > Characters In Ng-bind In AngularJs
I have a use case, where we can have '&' and &#…
Align Div Element To Bottom Of Container
I am trying to bottom align one of three divs inside a cont…