HTML - Cdata Alternatives
I am trying to pass some HTML code though XML but the browser is ignoring the HTML tags as oppose to turning them into HTML tags. In the example below, I want to create a link to Google with CData, but the browser outputs "<a href="http://www.google.ca/">Google</a>" as oppose to creating a link to Google.
Code: <![CDATA[<a href="http://www.google.ca/">Google</a>]]> Similar TutorialsWhat is the <![CDATA[ ]]> thing used for in HTML code? Hey guys.. im sure this is an easy one for you. I am trying to put an img tag into my html code... it's actually an xml file.. here's the code snippet Code: <greeting> <![CDATA[<IMG SRC="superdopetitle.png" ALT="SuperDopeTitle">]]> </greeting> but it just posts the "img src="super...." as text.. not the picture. Please help .. what am I missing? hi I have used this cdata like this <script type="text/javascript"> <![CDATA[ function change_palette() etc...... ]]> </script> but the javascript is not at all working in IE.. I use script's in between a lot so I want this to be valid in w3c....... I tried this also //<![CDATA[ //]]> but no use, can I know how to use this without effecting the functionality in any browsers? its urgent plse... Hi guys. I need some expert about an issue I'm having. Site: Zhentor Online The website content is loaded into an IFRAME (which you can see just below the advertisement box, below the part where it says "Zhentonian Time"). However, the website uses a dynamic IFRAME resizing script, which as you can guess, resizes the IFRAME to accomodate the contents, removing scrollbars. However, for this to work, the IFRAME needs to load twice. So you can imagine that can get a little annoying over time, having each page load twice... I load the contents into the IFRAME to prevent from loading the heavy graphics again and again. But I'm getting really annoyed with the double load issue, and would like an alternative, or a better script which only loads the IFRAME once. I'm looking for a scrollbar-free solution which is why I've neglected framesets. I also used another script a while back which loaded documents into a DIV but for some reason I was unable to submit forms through the DIV, which rendered it useless. JUST to make sure, the IFRAME I am concerned with is the 2nd bordered box from the top of the page. The first one holds advertisements, and the second one, which starts with the header "Zhentonian Time" is the IFRAME that loads all website content. If anyone has any ideas or suggestions please free to put them forward. A superior IFRAME resize script would be awesome, or any other way which might be suitable. Thank you. I am trying to make my code more standards compliant and use the "strict" DTD. But when I try to validate using the W3C validator, there are a few things that I'm having trouble with. Target: I was using <a href target="blank" ....> to open some external links in a new window, but this isn't allowed in HTML 4 strict or XHTML 1 strict. What is supposed to be the replacement? The only thing I could find on a web search was a javascript, which I know little about. Is that the only alternative? (Seems a bit silly if it is, as this must be a commonly used feature.) Align: I used this to centre graphics, but this isn't allowed either. Are we supposed to set up different image classes in the CSS to allow centering, left, etc? br: Use of the <br> tag is allowed in HTML 4 strict, but there seem to be some paces where it isn't allowed. Does anyone have a reference to the rules for this? Thanks I think it was Pegasus who gave me this code for vertical alignment: Code: <div style="vertical-align: middle;"> But it doesn't work for what I'm tryin' to use it with.. I'm tryin' to vertically align some google adsense advertisements on an image. I got the ads to show up on the image correctly, thanks to the people here.. but I can't get'em to align vertically for some reason. Are there any alternatives for vertically aligning something?? Heyas, I'm creating a project at the mo that needs a rather large number of tables. The whole project so far is CSS, but with the amount of data that needs to be displayed (with up to and beyond 150 on some pages) I think the div option is out as nesting them correctly would probably be a nightmare. On attempting to validate my html with a strict doctype, the only error I'm getting is that td width="###" isn't allowed. So is there any other alternative, or some other way to specify cell widths that will validate? Getting everything to validate properly was a bit heavy on the workload, and if possible I'd like to be able to stick with strict and not have to migrate to transitional. Also just to add that the tables are pretty simple. E.g. Table set one is 2 columns wide. Column 1 and column 2 stay the same width throughout an unlimited number of additional rows. E.g. Table set two is 5 columns, and once again, these width are constant throughout an unlimited number of rows. In short, is there any alternative to using td width that will validate as a strict doctype aside from creating and nesting 400 divs? Cheers, Mopy I'm in the process of making a page where the menu/navigation is on the left, and to the right of it is the content area. I'm planning on using an iframe like I have in the past, so that the only place that reloads every time you click a menu option is the content area. The thing is, for the first time this website will have more content than my others, in which case a scroll bar would appear for just the content iframe ... is there any way around having this scroll bar appear? I would rather the height of the iframe just continue to extend as far down as the actual content goes, then stop. This way, the only scrollbar that appears on the webpage is the main scroll bar on the side of the browser. Is this possible with the iframe? if not, is there a better alternative?? please help!! EDIT: Edit: Okay, so I found a script that actually works but now I have another tiny problem. This is the code I found that works: http://www.milonic.com/mfa/2005-Apri...djustment.html But see on the javascript code it has a section that says "//extra height in px to add to iframe in FireFox 1.0+ browsers" ... this code actually does add extra unwanted space at the bottom of the iframe... extends it further than necessary. But I can't find the part where I can adjust/remove this? Could someone help me out with this?? I'm working on an application where the user will be able to build a page made up of several unrelated blocks of information. Since I'd like to generate some ad revenue from these pages, I'm concerned the disjointed nature of the information will tend to confuse ad networks (e.g. AdSense), leading to sub-optimal ads, fewer click-throughs, and less money. It would be very easy for me to create each block of information as a separate page ("sub-page"), containing its own ad code, and then pull them (and their ads) all together in the user-created pages using frames or iframes. Based on my (limited) understanding of how the ad networks work, it seems this would enable better-targeted ads based on each of these sub-pages. If I'm right, the only problem is the frames and their associated headaches. 1. Am I making too much of the ad relevance issue? 2. Is there a non-frame solution that will achieve the same results? 3. Are the benefits of frames worth the problems? Thanks. Involute I've made a site (http://sketch.uk.com) that hides and displays divs according to the browser size. However, ideally I'd like to prevent the hidden divs loading their content until they are visible. A good example is the index page of the above link. There is an iframe for the flash animation that changes to a static picture when you resize to a smaller window. If you were to open the site on the smaller window (such as a tablet or mobile for example) it would be better that the iframe were never loaded at all. Any suggestions? |