The error I got in Google Chrome is following when clicked on the linked element.
n-f22j6yycycwkqttwlgfk5eezyixnbwfyfih4bba-0lu-script.googleusercontent.com refused to connect.
Html element is this ->
<img style="margin-right: 16px;" id="img1" height="200px" class="img-rounded" width="47%" src="https://drive.google.com/uc?export=view&id=16RE0CGxrEsXB9bBFj_Nq5jwTb5c8IMgU" alt="Image1">
Note, "this.href" part has value empty. while url is variable stored the webApp Url.
Anyone has witnessed this problem and found how to fix it? It will save my day. Thank you.
The problem arises from using location.href in Apps Script
Use instead window.top.location.
<img style="margin-right: 16px;" id="img1" height="200px" class="img-rounded" width="47%" src="https://drive.google.com/uc?export=view&id=XXXXXXXXX" alt="Image1">
works for me.
Related
Hello so I just made an html site that I was thinking could be hosting from my computer for my home where I can stream music and share files but this line of code doesnt work.
<h3>Spotify Mod apk</h3>
<a href="Downloads/Spotify.apk" Download>
<img src="pictures/Spotify.png" alt="Spotify.apk" width="100" height="100">
I've been scrolling around for about 15 minutes and cant find any solutions the link and img src is correct but it doesnt work.
neither does this work.
<h3>BG player</h3>
<a href="Downloads/BG Player.apk" Downloads>
<img src="pictures/Bgplayer.png" width="100" heigh="100">
thanks for any help in advance please redirect this sub if I placed it wrong.
I generated a report through a website and I am trying to click on a link which exports the data into a csv file.
The element is:
<span class="x21">
<a style="color:#0000FF" href="javascript:JCRTYP('https://www.merchantconnect.com/CWRWeb/download.do?','CRCRDTYP','1','9507508464','01-FEB-2015','28-FEB-2015','14','2350','67156','WINN DIXIE 0283 S91','ALL','COMT');">
Comma Separated Value (CSV) </a>
</span>
What I have now is to switch to the iframe and click it by the xpath. However, it throws a error "Unable to locate element". I even tried without switching to the iframe.
driver.switch_to.frame(driver.find_element_by_tag_name("iframe"))
driver.find_element_by_xpath("html/body/table/tbody/tr[1]/td/table/tbody/tr[7]/td/span[4]/a").click()
The iframe source is:
<div class="iframes">
<iframe style="width: 100%; height: 500px" name="FRAME1" src="/CWRWeb/nova/jsp/reports/running.jsp" align="middle" frameborder="no" height="500px" width="100%"></iframe>
</div>
Any suggestions?
Thanks
Switch to the iframe by name:
driver.switch_to.frame("FRAME1")
And locate the link by link text:
driver.find_element_by_partial_link_text("Comma Separated Value (CSV)")
I found the answer, I was in the wrong frame!
I have an Html page where I have a image tag,I want to display an image which I have deployed in an external webApplication.When I browse that link in a browser it is working but when i add that link into an img src its not working
<img id="empPic" alt="" src="http://xyz/emp/displayImage.jsp?empId=7" width="90px" height="100px" style="border-radius: 12px;">
src="http://xyz/emp/displayImage.jsp?empId=7"
The Serversscript have to give you the data of image and not a reference to the image.
If the jsp gives you only a reference, you have to received the reference first and set it in the src-attribute
I'm using this jquery plugin which lets you scrub through images:
http://thespiral.ca/jquery/scrubber/demo/
I'm trying to add a link to each image, like this for example:
<div id="basic">
<img src="images/beach1.jpg" width="200" height="200" alt="Beach1" />
<img src="images/beach2.jpg" width="200" height="200" alt="Beach2" />
<img src="images/beach3.jpg" width="200" height="200" alt="Beach3" /></div>
But something in the script seems to be blocking links, and no matter what I do the image have a "#" link.
Can anyone help?
Update:
I put up a jsFiddle: http://jsfiddle.net/qdGXZ/
The problem may be in jquery.cycle.all.min.js. There is a code in it that may cause this kind of behaviour. Here it is:
else{a=''+(i+1)+"";}
Comment it and see what happens. This was the only piece of code in the given example that could cause this.
To fix this you need to pass href attribute defined by you to the else case and do something like this:
else{a=''+(i+1)+"";}
I don't know if this will help. Just can't do much. Now you know what is the problem and what you should do to fix it. The rest is up to you.
I do not understand why the images on my site shows up as broken, if you could have a quick look at: http://www.lamcallum.com Is there someone that can solve this mystery? Any replies would be appreciated...
UPDATE: Issue is resolved.
Give your <img src="1pixelsquare1.gif"> //grey color image then it will work perfectly fine.
Your Code for each box
<div class='fade' onMouseOver="JSFX.fadeIn('button')" onMouseOut="JSFX.fadeOut('button')">
<img name="button" class="imgFader" width="100" height="100" border="0">
</a> //extra coded - remove it
</div>
Every box Img should have the "src" like this
<img name="button" class="imgFader" src="1pixelsquare1.gif" width="100" height="100" border="0">
It appears that on initial load, your images do not have a source. Which would explain why they are broken. Once mouse-over-ed they do.
ETA: More detail. The image tags do not have anything in the src property. Either in code behind, the html you have coded or js. If you post your original code I can help more.