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
Firefox, Chrome, Safari Have Grey Background For Mp4 Html5 Video
Any video (that I can make) with a white background becomes…
Red Border Still Appears On Inputs After Resetting An HTML 5 Form Firefox
I have an HTML 5 form! Great, I'm excited! I decide to …
Svg Animation And Firefox
I'm struggle with SVG animation drawing, which is work …
How To Save Html5 Geolocation Data To Python Django Admin?
Is it possible to save the javascript html5 geolocation lat…
How To Hide/show Tabs Using Jquery
I have four tabs.On loading only the first tab is opened an…
Form To Iframe Submission - How Do You Reset The Form After File Upload?
I have a form that submits the results to an iframe. The su…
How To Limit The Html Table Records In Each Page
I am populating a table in my jsp which has more than 20 re…
How To Display A Python String As Html In Jupyter Notebook
In IPython notebook, I used to be able to display a python …
How To Add Placeholder Field?
I've been trying to add placeholder in input type='…
Bounce Animation On A Scaled Object
What is the best way to have an object scale and then perfo…