I'm trying to use Google's Chart API to display a chart in an infowindow.
https://www.google.com/fusiontables/DataSource?classic=true&docid=1z614mo0DPw19PX00IFsW7g0S-yilCmUTQaKLjiw
I've created the following img using the chart wizard:
What I want to do is tweak it so I can pass in parameters, but it doesn't appear.
Here's the code of the original (which appears above):
<img src="//chart.googleapis.com/chart?chxl=1:|2008|2009|2010|2011&chxr=0,0,5000|1,-5,100&chxs=0,676767,10.5,0.333,lt,676767|1,676767,11.833,0.167,l,676767&chxt=y,x&chs=300x173&cht=lxy&chds=0,5000,0,5000&chd=t:-1|111,122,1685,4699&chdlp=b&chls=3&chma=|2,4&chtt=Tickets+issued+in+xxx&chts=676767,11.833" width="300" height="173" alt="Tickets issued in {Road}" />
Here's my effort, which doesn't work.
<img src="//chart.googleapis.com/chart?chxl=1:|2008|2009|2010|2011&chxr=0,0,5000|1,-5,100&chxs=0,676767,10.5,0.333,lt,676767|1,676767,11.833,0.167,l,676767&chxt=y,x&chs=300x173&cht=lxy&chds=0,5000,0,5000&chd=t:|{2008},{2009},{2010},{2011}&chdlp=b&chls=3&chma=|2,4&chtt=Tickets+issued+in+{Road}&chts=676767,11.833" width="300" height="173" alt="Tickets issued in {Road}" />
What am I doing wrong?
The reason it didn't work was because there wasn't an 'http:' at the start of the img src bit.
Related
I'm new to a-frame and created this project in Glitch.
Here is my code.
<a-assets>
<img id="image" src="arrow.png" crossorigin="anonymous">
</a-assets>
<a-image src="#image" width="2" height="0.8"></a-image>
There is no error with the path of arrow.png because I don't get 404 error in console. If I change spelling in "arrow.png" I get a 404.
The image appears as a black box.
But if I use an online resource instead, it displays correctly.
<a-assets>
<img id="image" src="https://i.imgur.com/wjobVTN.jpg" crossorigin="anonymous">
</a-assets>
I created a GET endpoint in the express server that returns the image.
// Return arrow
path = `${__dirname}/views/arrow.png`
app.get('/arrow', (request, response) => {
response.sendFile(path);
});
When I go to the endpoint from my browser, the entire screen is black.
EDIT
Glitch project link
https://glitch.com/~quickest-catshark
Looking at your project structure on Glith, you need to move the arrow.png to your public folder.
Remixed glitch: https://glitch.com/~scalloped-lemongrass
New to Svelte here and playing with the reactivity concept. This first example works, the file input field correctly shows the selected file.
<script>
let files = []
</script>
<input type='file' bind:files />
This second example (only swapped the input attributes) does not. As can be easily tested in the REPL.
<script>
let files = []
</script>
<input bind:files type='file' />
It complains with "Value being assigned to HTMLInputElement.files does not implement interface FileList." and I don't understand why... do the bindings always have to go last in Svelte?
As #RichHarris explains above... this is a bug in Svelte. For now simply add the bindings to the end of the input element until it has been fixed.
See the Github issue for more info.
UPDATE: This has been fixed in November 2019 (see pull request #3849).
I have a model class Registration in which I have a photo property which is saving the URL of the photo, my photos are saved in the images folder onto the root.
Now when I am trying to show the images it is not showing the image I have cross verified that the image is present there.
I have tried <img src="#item.Photo" width="100" height="100" />
#*<img src="#item.Photo" width="100" height="100" />*#
also I have tried
<img src="#Url.Content(#item.Photo)" height="25px" width="50px" />
my path becomes /imges/previous theme.jpg even adding ~ in start it is still not showing the result, I have images folder onto the root and inside that I have previous theme.jpg file
It should show the result as image, even after removing the url.Content
<img src="#item.Photo" />
is also not working.
#Url.Content(#item.Photo) is likely the binary representation of your image. An img src= tag must contain a url to the image, not the binary representation of the image itself
i think you should press F12, in the console tab you can see your wrong path image, and you can fix the path base on it.
Razor has been changed a little with ASP.NET MVC 4 beta.No more #Url.Content.
Now, instead of
<img src="#Url.Content("~/path")">
you can use
<img src="~/path">
Kindly check what you are getting in the console. check the path is correct.
I have a primefaces p:media component
<p:media id="youTubeMedia" value="#{graffiticontroller.selectedYouTubeURL}" width="405" height="144" player="flash" />
the generated html is
<object height="144" width="405" data="http://www.youtube.com/watch?v=yY0PBoDlHMI" type="application/x-shockwave-flash">
the problem is that when the url is like http://www.youtube.com/watch?v=yY0PBoDlHMI , the youtube video does not show up . I just see a white box.
but if I alter the url to be http://www.youtube.com/v/yY0PBoDlHMI the video shows up.
Please help
I resolved it reading this post http://forum.primefaces.org/viewtopic.php?f=3&t=346
I copied the top link of my youtube video and applied some format.
For example if this is the original link of your video https://www.youtube.com/watch?v=fJ9rUzIMcZQ.
The first thing you need to do is to replace "watch?" by "/" also you have replace the following "=" by "/" at the end you append this text to your link:
&hl=en&fs=1&
At the end you will get a link like this:
https://www.youtube.com/v/fJ9rUzIMcZQ&hl=en&fs=1&
And now you can use your p:media
<p:media value="https://www.youtube.com/v/fJ9rUzIMcZQ&hl=en&fs=1&" width="600" height="" player="flash"/>
put url in this way http://www.youtube.com/watch/v/yY0PBoDlHMI It will work...
In my requirement i want to change the background image of a link for hover,mouse out and active in my master page i tried a couple ways but it is not giving a right solution for me .Kindly any one guide me to get the solution and my format is like the below
<a href='<%: Url.Action("ListTask", "Task") %>'>
<img id="taskImage" src='<%: Url.Content("~/Content/Images/MasterPage/TaskMenuNormal.png") %>' onmouseover="this.src='../Content/Images/MasterPage/TaskMenuHover.png'"
onmouseout="this.src='../Content/Images/MasterPage/TaskMenuNormal.png'" /></a>
the above code will work fine and here i need to fix the hover image at the active of the link and not to be changed at the time of active view(MVC) in the master page.(This code will be in the master page).
can anyone provide solution in javascrip or jqery.
Thanks.
you could do:
$('#taskImage').hover(function(){
$(this).attr('src','../Content/Images/MasterPage/TaskMenuHover.png');
}
$('#taskImage').mouseout(function(){
$(this).attr('src','../Content/Images/MasterPage/TaskMenuNormal.png');
}
Use the hover function. The first parameter is used on mouseover, the second on mouseout.
HTML
<img id="taskImage" src="<%: Url.Content("~/Content/Images/MasterPage/TaskMenuNormal.png") %>" />
jQuery
$('#taskImage').hover(
function() {
$(this).attr('src','../Content/Images/MasterPage/TaskMenuHover.png');
},
function() {
$(this).attr('src','../Content/Images/MasterPage/TaskMenuNormal.png');
}
);
Personally, I'd amend your markup to include the image in the A tag as a background in CSS. then you can use A:hover, and A:active CSS states to amend your link. This then means no javascript needs to be used.