html

How to append the img alt to an li

Hey guys, me again, I know I asked something similar a little while ago, but the function that i need for this it is slightly different, this time I have an ul element with img tags embedded inside a tags. What I need is when the image is clicked to populate an li element, but is the next or last image is clicked I need the same li eleme...

swap yes and no images when either is clicked in html

I have two images yes and no, which change color when clicked, they get highlighted. When clicked on yes_unselect, it needs to change to yes_select and change the id of no to no_unselect. I am facing two problems. 1. When once clicked the yes_unselect is changing to yes_select but clicking on that again is not changing back to yes_unsele...

jquery add <br> to h2 if h2 contains this word

if the h2 has the word ply i want to add a break. the titles are dynamically called, the site is html so i can't use php on anything. heres the h2 11/400-5 4 PLY EXPERIMENTAL TIRE AIRCRAFT TIRE want it to look like this 11/400-5 4 PLY EXPERIMENTAL TIRE AIRCRAFT TIRE so any title that has the word PLY in it will add a break right af...

Does Zend have something like {strip} in Smarty?

Smarty has a {strip} function: {strip} <table border='0'> <tr> <td> Hello world </td> </tr> </table> {/strip} Which outputs: <table border='0'><tr><td>Hello world</td></tr></table> I also want to do this in Zend (to reduce the amount of bites send on each request), without installing Smarty. However, I don't want to add ...

using php to generate html and javascript - quote/doublequotes

This php statement works, but is there a more readable way to express it, in terms of quotation marks. $pCode = $row['SIZIP']; echo " <a href='#' onClick='jfFn(\"".$pCode."\");return false;' > " . $pCode . "</a>"; ...

Two divs; left should be fixed width, right should fill rest of space.

Hi, I've got the following HTML code: <body> <div id="Frame"> <div id="Body"> <div id="Panel">Side panel, fixed width.</div> <div id="Content">The rest of the content, should be dynamic width and fill up rest of space horizontally.</div> </div> <div id="Foot"> <div>FooBar.</div> </div> </div> ...

How can I determine if it's ok to change this word... python script

The goal is to read through html files and change all instances of MyWord to Myword; except, must NOT change the word if it is found inside or as part of a path, file name or script: href="..." src="..." url(...) class="..." id="..." script inline or linked (file name) --> <script ...></script> styles inline or linked (file name) --> ...

Should I use heading tags in my navigation menus.

Hey Guys, Ive always wondered about this. I like to create super navigation menus. The website I am currently working on for example has a blog tab at the top, which has a drop down with latest blog posts and some other stuff. Should I use heading tags for Semantics and SEO? Here is my current structure: <li class="submenu superme...

IE7 DIV expands to fit TABLE, ignoring HEIGHT% directive

I'd really appreciate a hand getting my fixed-header table scrolling in IE7. In IE7, my tall data table is forcing its containing DIV to expand vertically, and preventing that DIV's scrollbar from showing. I'm using the excellent cross-browser (including IE7) scrolling, fixed-headers table layout solution from: http://www.sitepoint.co...

Find Minimum Value in a Column

I have an HTML table column containing integers. What's the most efficient way to get the minimum value using JavaScript or JQuery? ...

How to keep a url param across pages

I wan't developers who embed my webapp to be able to pass a param in the url like ?style=dark which will alter the css accordingly. Is there a better way to keep this setting as the user navigates than appending ?style=dark to all links? I've considered cookies etc. but if one user is viewing two pages which embed my app with different ...

category subcategory in drop down

Hi, Is possible to create category in the drop down menu using jquery? so it will be: Southern Suburb suburb1 suburb2 suburb3 suburb4 Nothern Suburb suburb5 suburb6 thanks ...

Mystery padding in table cells with image

I hate to admit this: I'm building a complicated, but gmail-friendly HTML email blast (inline styling). Anyway, it's a game of tables and split images, and I've seemed to have forgotten all my 1995 table mojo. http://www.highgatecross.com/development/tables/ <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><img s...

How do I add a local script file to the HTML of a WebBrowser control?

This seems really dumb. I've tried a bunch of different ways and it's just not working. I have a WinForms app with a WebBrowser control. If I try with a raw html file on my desktop using the same src string, the src I put together works fine. But plugging the same stuff into the WebBrowser control won't work. Here's my code: HtmlElemen...

HTML/CSS Popup Window Fade

Ive seen sites where things like a login box will apprear, and the rest of the page will fade, buit the box stays the same. How is this done? Can someone please give me an example? Thanks! ...

How to use a JavaScript variable as a XHTML attributes value?

I have tried: ... <script type="text/javascript"> var myVar = "some string"; </script> ... <input name="&{myVar};" ... /> ... But using FireFox the name is set to the literal string: "&{myVar};" instead of the value of myVar... UDPATE: I see this called JavaScript Entities and hasnt been supported for a long time - but there must b...

Telling jQuery to reload page when there is a server side event

I have a page with a div and the elements within the div get updated from the server side periodically. For example, I have a progress bar in it. Currently, I'm doing jQuery.load using setInterval to periodically refresh the div on the page (every 3 seconds). I was wondering if I could achieve this using an event-based method rather t...

Cross domain access permission denied in iframe

Hi, I am trying to embed OWA (microsoft exchange server 2010) in a web page within an iFrame but i get a javascript error on the OWA page saying Access Denied and then none of the controls within the OWA window work. I have to use OWA in web page , i read in the form that cross domain not work properly. Is there any other way by whi...

Refresh XML feed on click (jQTouch)

Hi there, I recently created an xml feed -> html javascript function for an iPhone app I'm developing in jQTouch. Original Tutorial & Code: http://bit.ly/cnNMKu I was wondering if someone would know a quick and easy way to refresh the xml data (grab the feed again) when a link is clicked. eg. in the code: <div id="btns"> <ul> <l...

Hide address bar and status bar in iphone using javascript and html

Hi, I want to hide address bar and status bar in iphone because of more space. I tried this code window.scrollTo(0, 1); but this is not working in iphone. Please help me. Thanks in advance. ...