Title in img tag
I wish there was a field for title in the img tag like there
is for the alt. As it is, when I want to put a title on an image, I
have to do it in the code view.
For those who don't know, the title tag will create a
"tooltip" when someone hovers over an image, either in IE or
FireFox. Works well, and better than using the "alt" for a tooltip.
I'd rather use "alt" for a description of the image for screen
readers.
Tag inspector panel has it.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Malcolm N_" <[email protected]> wrote in message
news:[email protected]..
> On Thu, 19 Jul 2007 18:20:30 +0000 (UTC), "typist"
> <[email protected]> wrote:
>
>>Well, I have to admit I hand code quite a bit,
Michael. But I insert
>>pictures
>>using design view because it will include the height
and width for me.
>>
>
>
> Well if you hand code the
> img src="/img/test.jpg" alt="test" />
> that's fine
>
> If you then select the above code in code view - go to
the properties
> panel - click on the W ( width ) and H ( height )
letters - DW puts in
> the width and height info for you :-)
>
> I only discovered this by accident after using DW for
about 6 years !
>
> Not sure how to add the title in a similar way - I agree
the
> properties panel should have it.
>
>
>
> --
>
> ~Malcolm N....
> ~
Similar Messages
-
Getting img tags to work in sub page using jstl core import tag
Am trying to bring disparate system page reports together under one web app. This means using the jstl core import tag (I dont want to redirect as I want to hide the urls, this web app provides better security than those it calls).
Use of the import tag works to a degree but any resources (ie. img tags) don't load.
Have created a much simplified example that demonstrates..
So heres the jsp...
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<h3>Delivery Performance Report</h3>
<c:url value="http://localhost/mycontext/subpage.html" var="myUrl"/>
<c:import url="${myUrl}" />and a simple sub page (note plain html, no jsp, this mimics my project as the other systems are hidden source, non jsp)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>sub page</TITLE>
</HEAD>
<BODY>
This is the sub page<br>
<img src="images/banner_image.jpg" />
</BODY>
</HTML>While I dont get any errors what I do get is ..
Delivery Performance Report
This is the sub page
...but image fails to load.
If I redirect instead of import it works, but as I said I need to hide the url from the user as security is an issue.
Any help appreciated, really pulling my hair out with this final stage of something that will make a real difference to us!
regards,
G.Thanks for the answer but Im afraid thicko here doesnt get it.
The img src is relative to the sub page, and I have tried it with an absolute address (ie. http://localhost/.....) with the same result.
If I call the sub page direct (get with browser) the image tag works. Its just if the sub page is imported with the jstl core import tag.
I've not tried a base tag. The real project always returns pages containing absolute urls... http://ourReportServer/reports?....plenty of params so dont belive relevant, please correct me if Im wrong here though.
thanks, G. -
Unclosed meta/img tag. Output method= xml / xhtml / xml
Hello,
Im trying to parse from a Document to an String, in the usually way, as follows:
public static String parseDocument(Document document) {
try {
if (document== null) {
return null;
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
DOMSource source = new DOMSource(document);
StringWriter sw = new StringWriter();
StreamResult result = new StreamResult(sw);
transformer.transform(source, result);
String xmlString = sw.toString();
return xmlString;
//TODO: error handling
} catch (TransformerConfigurationException ex) {
return null;
} catch (TransformerException ex) {
return null;
} catch (Exception ex) {
return null;
}Ive maked a test that creates a Document:
public static Document createFromDoc(){
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
DOMImplementation impl = builder.getDOMImplementation();
Document doc = impl.createDocument(null, null, null);
Element root = doc.createElement("html");
doc.appendChild(root);
Element head = doc.createElement("head");
root.appendChild(head);
Element meta = doc.createElement("meta");
meta.setAttribute("http-equiv", "Content-Type");
meta.setAttribute("content", "text/xml");
meta.setAttribute("charset", "UTF-8");
head.appendChild(meta);
Element title = doc.createElement("title");
head.appendChild(title);
Element body = doc.createElement("body");
root.appendChild(body);
Element div = doc.createElement("div");
div.appendChild(doc.createTextNode("Created with docs."));
body.appendChild(div);
return doc;
} catch (ParserConfigurationException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
return null;
}Well, you can see the test method "prueba1". Y:
public static void prueba1(){
Document doc1 = Main.createFromDoc();
//String doc2 = Main.createFromString();
String doc1Str = GestorXMLDoc.parseDocument(doc1);
return;
}Why my method public static String parseDocument(Document document) adds this extra meta tag when it transforms a Document to an String:
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
and modifies the other meta tag as follows (I mean, unclosing it):
<meta charset="UTF-8" content="text/xhtml" http-equiv="Content-Type">
You can see the full String result:
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8" content="text/xhtml" http-equiv="Content-Type">
<title></title>
</head>
<body>
<div>Created with docs.</div>
</body>
</html>I tried parsing with a fake XSLT Template with output: XML, and it doesnt works. I tried changing the meta content data with "text/xml".
This method makes the document not compatible with XML, because it doesnt close the meta tag. I need work with this XHTML doc as a valid XML document, not as a HTML (W3C allows set meta/link/img tags unclosed) to add new nodes.
Thank you ppl =)First of all, what you are trying to do is transforming, not parsing. Parsing is converting an XML document into an internal form, and you already have the XML in the internal form (org.w3c.dom.Document).
Anyway, XSLT has special rules for transforming a document whose root element's name is "html". It looks like those rules are being applied in your case. If you don't want them to be applied (which you don't if you are producing XHTML) then you have to tell the transformer you want XML as your output and not HTML.
If you had an XSLT document you would use <xsl:output method="xml"/>, but you don't have one in this case. So you do it like this:
transformer.setOutputProperty(OutputKeys.METHOD, "xml"); -
How can I get a parameter back into a servlet invoked from an IMG tag ?
I'm using a servlet to create several graphical plots per JSP i.e. per HTML page. Each graph is supposed to be different, according to a parameter which I want to pass back from my JSP. I'm getting several plots but they're all the same!
I've tried setting an attribute in the session object before each IMG SRC= , but all I get is each plot the same! In fact, my debugging efforts show that the servlet is only called once despite 3 calls, each with a different session parameter value. I'm not sure the session parameter values are getting used properly.
I just can't find a way of getting a parameter back into my servlet which is invoked from the IMG tag (i.e. SRC= "servlet name").
Can anyone tell me the best way to pass a parameter back into a servlet which is invoked from an IMG tag? Can the request object be used? I can't, at the moment, see how it could be used?
I'll certainly be very grateful if anyone can help with this - could even be useful for others as well!You said that, "by moving a copy of Mobile Docs back to the Library, from which I had moved it, my documents reapperared in Cloud." That says that you actually moved it. Obviously, I can't tell exactly what you did, but it sounds like you may have thought you were just putting it in the sidebar, but you actually put it somewhere else. The sidebar is not a location to put things, just a way to create a quick shortcut to access a file or folder, so you can't put things "back" from there.
-
XSLT problem with img tag in Saxon
Hi,
Iam getting a problem with <img> tag when transforming a document using Saxon transformer. In the input XSLT I have proper closing tag for <img>, but the output of the transformation is not well formed as the closing tag for <img> does not appear. I need to feed the output to a FO object to generate a print preview, but the output is not well-formed.
Kindly help to resolve the issue.
Kind Regards,
AbhinandanPerhaps that is because you are generating HTML as your output? As I recall, <img> tags don't have to be closed in HTML. So try generating XML instead if you need XML.
-
IE problem with img tag calling stored procedure
I have an img tag in my JSP which looks like this (it has a very long src value):
<img src="http://www.enetrix.com/cores/net_charts.display_temp_chart?vChartDef_in=ChartType%20=%20DIALCHART;Chart
. . . and so on and so on . . .
26,%2075.0);&vChartType_in=PNG&vChartURL_in=http://333.333.33.333/j2ee/servlet/chart"/>
In short, the img calls a stored procedure and passes it a servlet among many other things. The procedure passes back an image to the browser.
The image shows up in Firefox but not IE 7. I don't think its an issue with the stored procedure but I can't understand why IE doesn't show the image. Is there something I'm missing? I've tried both jpeg and png.
Thanks
EricAs the related posts suggest, you will need to use direct JDBC code for this.
Also I'm not sure JDBC supports the RECORD type, so you may need to wrap your stored functions with ones that either flatten the record out, or take OBJECT types. -
Generate image with CFIMAGE - but need to use img tag to serve the content
I create a new image with cfimage, that already works without
any problems.
But instead of using the action="writetobrowser" I need to be
able to use the script inside a img tag:
Example: <img
src="myscript.cfm?somedata=iwanttheimagetocreate>
I found one webpage that deals with that problem (
http://www.webdevelopernews.com/2007/09/14/serving-up-cfimages-via-image-tags/)
but the image served to the browser, when using the code below, is
of a very low quality and another point is that you can't serve
.gif's to the browser.
<cfcontent type="image/jpg"
variable="#ImageGetBlob(backgroundimage)#">
Any suggestions/solutions?
Thanks,
PhilIn that entry Raymond mentions:
"The WriteToBrowser action actually generates HTML that points
to a ‘magic’ URL to serve the image.". ie <img
src="/CFFileServlet/_cf_image/_cfimg-12345036853711072.PNG" alt=""
/>
Perhaps you could create a function that captures the
generated html by using <cfsavecontent>.
<cfsavecontent variable="imageTagHTML">
<cfimage action="writeToBrower" ..>
</cfsavecontent>
Then uses a regular expression to extract and return the url
portion only. ie
"/CFFileServlet/_cf_image/_cfimg-12345036853711072.PNG"
<cfset ExtractedURLHere = SomeFunction(arguments...)>
<cfoutput><img
src="#ExtractedURLHere#"></cfoutput>
Though you could also use the entire html string directly
<cfoutput>#imageTagHTML#</cfoutput> -
How to display JPEG in JSP w/o IMG tag?
I have a working application where a jpeg image is ecoded on the server via a JavaBean. The bean is then forwarded to a JSP, which gets the unique jpeg filename from the bean and displays it with an html <IMG> tag. All's fine and well, but I'd like to get away from having lots of image files laying around on the server and just display the image encoded in the current request. I tried creating a custom tag to encode and display the jpeg using the com.sun.image.codec.jpeg.* package in this manner:
ServletResponse res = pageContext.getResponse();
OutputStream os = res.getOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
encoder.encode(imageRef); //-- imageRef is instance of BufferedImage
and in the JSP:
html, other tags, etc.
<graph:image imageRef='<%= imageBean.getImage() %>'/>
The image displays, but nothing else in the JSP (ie. html, other custom tags). In all other tags I've written, JSPWriter is used for output, but I need an OutputStream for the createJPEGEncoder() method.
Can anyone tell me if what I want to do is possible? I'm chasing my tail at the moment.
TIA MarkWould this work for you:
Create the IMG tag in the JSP with the SRC as a servlet.
Also, add any parameters you may need to tell the servlet what image to send back.
Something like this:out.print("<IMG SRC=\"/servlet/ImageProducerServlet?WhichImage=");
out.print("MySpecialImage");
...The ImageProducerServlet can be setup to send back the JPEG image file. -
Img Tag in textfield adobe air problem help :(
Hi there,
i ve got a textfield on the stage and wanted to give it a img
tag.
If i am using flash 9 in publishing, it is no problem.
if i change to adobe air. There is no img in the textfield.
Is this a bug???I've had the same problem. Using an img tag in a dynamically
generated text field does not work the same published for AIR as it
does published for Flash Player. If I use a relative path for the
image or the class name of a symbol in the library in Flash it
works perfectly, but neither work if the same code is published for
AIR. Is there a solution to this that anyone knows of?
Here's an example:
var optionFont:Font = new UniversBold();
var optionFormat = new TextFormat();
optionFormat.color = 0x27318b;
optionFormat.bold = true;
optionFormat.size = 38;
optionFormat.font = optionFont.fontName;
var field:TextField = new TextField();
field.embedFonts = true;
field.autoSize = TextFieldAutoSize.LEFT;
field.defaultTextFormat = optionFormat;
field.selectable = false;
field.htmlText = "Hi There <img src='GTE38'> Hi There";
field.wordWrap = true;
field.width = 200;
addChild( field );
UniversBold and GTE38 are classes in the library. This works
when published for Flash, but if republished for AIR, the image
does not show up. -
Img tag in TextField : a nightmare ?
After reading of the documentation about Flash TextField
class (used by Label and Text), I was expected a lot of this
component, especially about the
img tag.
I spent a lot of hours trying to make it working as the doc
says. Each time I have runtime errors.
Using link to jpeg or png files I have Error #1034 (I comment
a "resolve" bug in the JIRA adobe bug system).
Then I try to embed images with a link identifier to a
movieclip symbol (seams to be the only way to use embedded images).
After spending a long time to understand what that was meaning
(just ONE example should have save half day of work !!! may be the
Adobe guy should be advised that not all the Flex developpers comes
from Flash !), I was abled to use a swf file made with fresh
downloaded Flash CS3.
But that time if the first assignment to htmlText property is
ok, when I change the value I have error #2025 (DisplayObject must
be a child of the caller - translate from french).
So I am quite disappointed about Flex choice today...
I was abled to add a support for the missing <table>
tag but I don't know how to easily rewrite a complete TextField
which can insert images (embedded in swf).
If anybody has success with images in TextField, let me know
Thanks.I've had the same problem. Using an img tag in a dynamically
generated text field does not work the same published for AIR as it
does published for Flash Player. If I use a relative path for the
image or the class name of a symbol in the library in Flash it
works perfectly, but neither work if the same code is published for
AIR. Is there a solution to this that anyone knows of?
Here's an example:
var optionFont:Font = new UniversBold();
var optionFormat = new TextFormat();
optionFormat.color = 0x27318b;
optionFormat.bold = true;
optionFormat.size = 38;
optionFormat.font = optionFont.fontName;
var field:TextField = new TextField();
field.embedFonts = true;
field.autoSize = TextFieldAutoSize.LEFT;
field.defaultTextFormat = optionFormat;
field.selectable = false;
field.htmlText = "Hi There <img src='GTE38'> Hi There";
field.wordWrap = true;
field.width = 200;
addChild( field );
UniversBold and GTE38 are classes in the library. This works
when published for Flash, but if republished for AIR, the image
does not show up. -
I'm trying to display images within mx:Text components using htmlText. However, no matter what I try, I can't get an image to display. The application just displays whitespace where the <img> tag is. My current code looks something like:
<mx:Text id="test_html" width="100%" height="100%">
<mx:htmlText>
<![CDATA[
<p>Why can't I include an image =(</p><img src='assets/add_icon.gif' width='20' height='20' align='left' hspace='10' vspace='10' />
]]>
</mx:htmlText>
</mx:Text>
What I get displayed when I view this is:
I've tried essentially every permutation that I can think of -- setting the htmlText in actionScript, using all different paths (app:/assets/add_icon.gif, ../assets/add_icon.gif, add_icon.gif, embedding the image and using {<classname>.addIcon}). I have other images embedded in the application using the path "../assets/<image file>" and they work fine (they're not being used in htmlText).
Has anyone had this kind of trouble before? Any idea what might be going wrong?does anybody know anything? how long do i need to wait to see
if someone replies? I just need to know if it is possible or not. -
How to pass src value into img tag in ADF
Hi,
My Dev : 11.1.2.3.0
How to pass row values into <img> tag.,I used the below code but it's taking empty.,
I tried both ways like #{row.CdFilePath} and ${row.CdFilePath}
<af:iterator var="row"
value="#{bindings.xxx.collectionModel}"
id="i2">
<img src='/ShowImage?src=#{row.CdFilePath}' border='0' style="width:100px; height:100px; margin:5px;"/>
</af:iterator>
Please tell me any other option is there..
ThanksThis works if you use a normal table so I guess it should work here too.
Are you sure the el #{row.CdFilePath} return something?
Why don't you use the adf image tag <af:image source="/ShowImage?src=#{row.CdFilePath}".../> instead of the html img tag?
Should the src property not be enclosed with " instead of your '?
Timo -
I have a problem about writing <img tag in the xsl file. Below are the xml and xsl file.
**************************** XML file **********************************
<image>promo_banner_onecard.gif</image>
**************************** XSL file **********************************
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match = "test">
<td width="165" valign="top"><b>& l t ;img src="../images/<xsl:value-of select="image"/>" width="158" height="60" border="0"& g t ;</b></td>
The output can't interpret the <img src ....> but treat it as the text only and display it on the html page -- <img src="../images/test.gif" width="158" height="60" border="0"> So how can I make the img work? Thanks.Use an xsl:element block with xsl:attributes inside it to produce the img tag like this:<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="concat('../images/', image)" />
</xsl:attribute>
</xsl:element>Have a look at the other XSL tags you can use at http://www.w3schools.com/xsl/xsl_w3celementref.asp -
Html "img" tag impossible to delete
Hi!
I process .html files, and I want to delete all the tags. I do it with .replaceAll("\\<(.)*?\\>", " ")
It is rather successful, and all of the tags are deleted except for img tags. What could be a reason?
Thanks!For these problems, MULTILINE mode, which matches \nx with $^, is irrelevant.
You should consider using DOTALL mode for matching a regexp '.' with '\n'.
And you should consider which you are going to choose between greedy mode and
reluctant mode.
import java.util.regex.*;
public class TagRgx{
public static void main(String[] args){
Pattern patt1 = Pattern.compile("<[^>]*>");
Pattern patt2 = Pattern.compile("<.*>");
Pattern patt3 = Pattern.compile("<.*>", Pattern.DOTALL);
Pattern patt4 = Pattern.compile("<.*?>");
Pattern patt5 = Pattern.compile("<.*?>", Pattern.DOTALL);
String html
= "This is <b>a test</b>. <img src=foo.jpg\nwidth=1 height=1>. End test.";
System.out.println("1: " + patt1.matcher(html).replaceAll(""));
System.out.println("2: " + patt2.matcher(html).replaceAll(""));
System.out.println("3: " + patt3.matcher(html).replaceAll(""));
System.out.println("4: " + patt4.matcher(html).replaceAll(""));
System.out.println("5: " + patt5.matcher(html).replaceAll(""));
System.out.println();
String h2
= "Begin<!-- This comment doesn't terminate here > but rather here -->End";
System.out.println("1: " + patt1.matcher(h2).replaceAll(""));
System.out.println("2: " + patt2.matcher(h2).replaceAll(""));
System.out.println("4: " + patt4.matcher(h2).replaceAll(""));
System.out.println();
String h3 = "Begin<meta name=\"Random\" text=\"Look at the >\">End";
System.out.println("1: " + patt1.matcher(h3).replaceAll(""));
System.out.println("2: " + patt2.matcher(h3).replaceAll(""));
System.out.println("4: " + patt4.matcher(h3).replaceAll(""));
System.out.println();
} -
Hi,
I want to dynamically embed image url into the IMG tag as follows:
<jsp:useBean id="image" scope="request" class="mybeans.ImageBean" type="mybeans.ImageBean" />
<img src='<jsp:getProperty name="image" property="imagePath"/>' />The problem arises because of confusion with closing/opening tags getting mixed up.. How do I get this code to work if i'm using xml syntax in my jsp pages? Any solutions?
P.It would be complaining about using a tag as an attribute to another tag.
ie nesting a tag within the tag, rather than between open/close tags for it.
Solution? Don't nest tags like this. I'm figuring you have to use an expression of some sort.
either <img src='<%= image.getImagePath %>'/>
or using EL in a JSP2.0 container:
<img src='${image.imagePath}'/>
I can't say I have done strict xml stuff, so I might be a little off, but thats the general idea.
Hope this helps,
evnafets
Maybe you are looking for
-
How can I retrieve a forgotten password for my home wi-fi network?
I have a wi-fi network at home for my iMac, printer, phone and two iPads. On trying to connect a new device I discovered that the password I thought was correct will not work. How can I retrieve the correct password from one of the devices already on
-
PayloadSwapBean in recevier file adapter
Hi Experts, Mine is SOAP to File scenario. i'm getting attachemnts in SOAP channel, i'm using the payloadSwapBean to swap the main doc with this attachemnt in my receiver file adapter and the attachemnt content should go to the file. but i'm getting
-
Error message - Office365Service
This error message keeps on appearing and does anyone know what is the problem? file://localhost/Users/bburgess/Library/Logs/DiagnosticReports/Office365Service _2013-02-26-113612_Bills-MacBook-Air-6.crash
-
How to stop system from freezing when importing into iTunes (version 7)?
Since I have installed iTunes 7, I have been unable to import music into iTunes; my computer freezes after about 10 seconds and the only thing I can do is restart the entire computer. It is extremely frustrating and I can't seem to find anyone who ca
-
i can only use my photoshop serial code twice and need to deactivate it first before being able to instal on my new computer. Normally you'd do this yourself but i can't get into my old computers at all. how on earth do i get to speak to a rep