html

Easy way to drop XML Namespaces with JavaScript?

Is there an easy way, for example, to drop an XML name space, but keep the tag as is with jQuery or JavaScript? For example: <html:a href="#an-example" title="Go to the example">Just an Example</html:a> And change it to: <a href="#an-example" title="Go to the example">Just an Example</a> On the fly with jQuery or JavaScript and not...

How to handle HTML tags in servlet java program?

1) In my servlet program, I have a statement which will be printed using the code as follows, out.println("<b>This is servlet output</b>"); Instead of getting printed in bold, it just gets printed with the tag in the broswer itself. How to rectify the same? 2) Also, in the servlet page after the submission of a jsp form, I want...

parts of HTML static, others dynamic - PHP or HTML - best way to lookup database

I am creating a website for products. I am wondering: is it better to use a single dynamic page using PHP, or generate an HTML page for every product, updating the pages from a php template file in a cron job? Most of the material on the page (eg. basic product information) will not change over time , but other parts of the page will be ...

How to create large scroll web page ?

I will put 10.000 picture ordered like connected hexagons.But I can`t see pictures more than 140.They not fit in browser and also scroll bars not shows all elements.I want to make that on screen will be visible 100 image and if I will move mouse up,down,right or left and page will be scroll to that position. <div calss="userList"> ...

How can I handle errors in loading an iframe?

I have an <iframe> that other sites can include so their users can POST a form back to my site. I'd like to handle gracefully the cases where my site is down or my server can't serve the <iframe> contents (that is, a response timeout or a 4xx or 5xx error). I tried adding an onError to the <iframe> object, but that didn't seem to do any...

Regex: How can I remove whitespace within a style attribute only?

Hi, for the last hour I have been trying to figure this out myself but I am just not having any success and thought maybe you could help. Basically I am having a html email document that has a lot style attributes for inline styling of elements that look somewhat like <th rowspan="10" style="font-weight: normal; vertical-align: top; te...

FF Extension - Vertically Aligning Images Inside of Div's (Using max-height/max-width)

I know this question has been done to death, so I'm really sorry that I have to ask it again but despite all of the information out there, I have found nothing that works for my specific circumstance. I currently have a sidebar in FF for an extension. Within this sidebar, I have(for simplicities sake) 3 things. <div id="resultsDiv"> ...

Why scroll bars appears ?

I have the following simple code: HTML: <div> <img src='http://i51.tinypic.com/4kz4g5.jpg' /> </div> CSS: div { width: 260px; height: 195px; overflow: auto; background: #333; } The dimensions of the image are width=260px, height=195px, which is exactly like the dimensions of the div. My question is why the scr...

Do I encode ampersands in <a href...>?

I'm writing code that automatically generates HTML, and I want it to encode things properly. Say I'm generating a link to the following URL: http://www.google.com/search?rls=en&amp;q=stack+overflow I'm assuming that all attribute values should be HTML-encoded. (Please correct me if I'm wrong.) So that means if I'm putting the above ...

Detect Current Page

Is there a code snippet that can detect the current user's page and then add <a class="active"> to an item in a ul (my menu). I am making a tumblr theme and they do not allow PHP (I usually add <?php if ( $current == "home" ) { echo "class='active'" } ?> in my menu and $current = "home" on my pages) and they do not have a standard (such ...

Is there something wrong with this jQuery?

function insertParamIntoField(url, param, field) { var anchor = document.createElement('a'), query; anchor.value = url; query = anchor.query.split('&'); for(var i = 0, kv; i < query.length; i++) { kv = query[i].split('=', 2); if (kv[0] == param) { field.value = kv[1]; return; } } } ...

Want to develop a webapp for searching flights but dont know where to find the databases

Hi, i want to develop a webapp like this: http://www.flights.com/ where you find flights, now i see that are many sites likes this that makes me suppose that there are free databases that contains the data. Where can i find one? Thanks! ...

What is the problem with this HTML in my email?

I cant seem to get the email to display correctly in hotmail and gmail (see attached image) but it all works fine in my client. What is the problem with my code/Or is this an issue with gmail/htmail? How it does look: How it should look: code: <html> <STYLE> #header { top:20px; position: absolute; left:101px; widt...

HTML - Javascript form in form

<script> function(form) { form.submit(); } </script> <form action="do-1" id="frm1" method="post" > <form action="do-2" id="frm2" method="post" > <input type="submit" name="submit" value="submit" onclick="test(this.form)" </form> </form> someone tell me how to submit frm2 by js ? i click and it always submit fr...

CSS question: # sign

Some css selector has # in front of it, what does that mean? ...

jquery click function to focus on textarea?

function insertParamIntoField(anchor, param, field) { var query = anchor.search.substring(1, anchor.search.length).split('&'); for(var i = 0, kv; i < query.length; i++) { kv = query[i].split('=', 2); if (kv[0] == param) { field.value = kv[1]; return; } } ...

radio button doesn't get selected properly

We use the following code to select a choice value from a radio button group. Sometimes the radio button doesn't get selected properly, if you click in between the radio button control and the choice in a horizontal layout (this behaviour is consistently reproducible). How do I ensure that the value gets selected if I click anywhere on t...

calling a function in javascript after a period of time has passed

I'm trying to write a function that will auto suggest what the user means when they type into an input field. Right now I have all of the auto suggest code complete but in my javascript I can't get to the first if in toggleGenusInput no matter what I do (this first if queries the database through php and gets the suggestions). Does anyo...

How can I build Hierarchical Html List from Dataset?

I am getting following output in Dataset ActivityID ParentActivityID ActivityName AcivityLevel 0 NULL Dashboard 0 1 NULL Market Trends 0 2 1 News 1 3 NULL Master 0 4 3 Products 1 5 3 Segments 1 6 3 ...

how to make html.actionlink without text but with image inside.

it is simple html: <%-- <a href="?language=de"> <img src="/Images/Company/de.png" alt="Webseite auf Deutsch" style="border: 0;" /> </a> --%> i would like to make from them html.actionlink: <%= Html.ActionLink("", "ChangeCulture", "Account", new { lang = "de", returnUrl = this.Request.RawUrl }, new { @style = "background-image: u...