html

Change the content of a <style> element through JavaScript

The Problem I have the following code: <html> <head> <style id="ID_Style"> .myStyle { color : #FF0000 ; } </style> </head> <body> <p class="myStyle"> Hello World ! </p> </body> </html> And I want to modify the contents of <style> through JavaScript. The Expected Solution The first solution was to use the innerHTML ...

How to create XPath for the tags not having id or name

Please look into the tag sequence(click on the link) and want to know xpath for this. None of the tag having ID's or names. I need to use xpath in the following command. selenium.click("XPath goes here"); Regards Sai ...

HTML form with multiple submit options

Hi, I'm trying to create a small web app that is used to remove items from a MySQL table. It just shows the items in a HTML table and for each item a button [delete]: item_1 [delete] item_2 [delete] ... item_N [delete] To achieve this, I dynamically generate the table via PHP into a HTML form. This form has then obviously N [delete]-b...

post all values in select box /listbox

Hi, I have a selectbox on a form - which I've turned in to a list box by putting <select id="Select1" name="D1" size="5" style="width: 220px"> I'm filling this select/listbox with values... When I post the form how can I get all the values in the select box..is this possible or am I only able to get one that has been selected. Tr...

Weird duplicate IE div.

Here's a weird bug I've found, IE8 is duplicating my div, but only a part of it. How it looks in IE8: And here's how it's meant to look in FF: And the HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" ...

Swapping <li> elements with replaceChild possible?

I have a list of <li> elements: <ul id="mylist"> <li id="item1">Item 1</li> <li id="item2">Item 2</li> <li id="item3">Item 3</li> </ul> Can I swap two <li> elements - say item1 and item2 - with the replaceChild, one of the DOM tree modification methods? Will it work in all browsers? ...

Any ideas why this wont print out

Revising for php and cant seem to get this to print the values out that i want Any ideas? Thanks <form action="revision.php" method="GET"> <input type=“text” name=“number[]”/> <input type=“text” name=“number[]”/> <input type=“text” name=“number[]”/> <input type=“text” name=“number[]”/> <input type=“text” name=“number[]”/> <input type=...

Execute javascript in PHP

I'm generating your typical Web 2.0 HTML page with PHP: it contains a lot of <script> tags and javascript code that will substantially change the DOM after the load event. Is there a way to get the final HTML code directly from PHP, without opening the page with any browser? For example, let's say the HTML for the page is (it's just an...

HTML, Javascript function

I have a number of input fields that accept numbers. When the calculate button is pressed, the calculations are sent to a number of other input fields with the results. I then have to go and click each of the result fields to format the contents. I would like to be able to attach code to the calculation button, in order to format all th...

Javascript popup different size in different browsers?

How come this pop-up gets a size other than what I have specified, when testing it in IE6 and FireFox 3.6? Firefox displays it correctly but IE6 is smaller for some reason. (620x530 instead) How can I fix it? <A id="myID" onclick="window.open('/sitecollectiondocuments/myPage.htm',&#13;&#10;'welcome','width=630,height=590')" href="javasc...

Create web site with 200 pages with minimal efforts

Hello, I've to create a static web site, only .html files. Each page will have the same layout. I need a kind of template engine or a tool to generate about 200pages with minimal efforts... only the body of the page will be different Any ideas? Thanks ...

Make page to tell browser not to cache/preserve input values

Most browser cache form input values. So when user refreshes page, the inputs have same values. Here's my problem. When user clicks Save, server validates POSTed data (e.g. checked products), and if not valid, sends it back to browser. However, as stated above, even if server clears selection for some values, they may still be selected ...

Java RegExp ViewState

I am porting some functionality from a C++ application to java. This involves reading non-modifiable data files that contain regular expressions. A lot of the data files contain regular expressions that look similar to the following: (?<=id="VIEWSTATE".*?value=").*?(?=") These regular expressions produce the following error: "Look-...

User clicks link in email, it opens email client, how to close window/tab?

A user clicks a link in their HTML email, it then goes to a page that simply opens up their email client. window.location.href = 'mailto:...'; I don't want this window/tab to stay open, how can I close it? window.close() doesn't work since it wasn't opened using window.open() is it possible? ...

Spacing from outer space

I just wonder where is this space between the end of the image and the end of the li's are coming from: http://bluesys.ch/lussy/ its just a simple UL > li > img code: div#slider { border: 5px solid #fff; } div#slider ul li { border-bottom: 1px solid pink; } div#slider ul li img { border-bottom: 1px solid green; m...

can we assign width to li

i have following html page with UL and LI, i try to assign width to each LI but can't see cay success <html> <head> <style type="text/css"> ul { overflow-x:hidden; white-space:nowrap; height: 1em; width: 100%; } li { display:inline; padding-right:10px; } ...

How can I make this not move and only load beneath it?

Currently, if you click item 2, it will reveal a input box and also widen the <li>. I don't want it to alter the size of the <li> and I want it to open right beneath item 2. How can i achieve this? Also, I want to make it close on click after it's been opened, but my jQuery doesn't seem to work. <html> <head> <script src="http://code.jq...

Jquery: How to target the parent ul and count the li's held?

I am using jstree to build a tree menu. When you select an item in the tree a div on the right brings up certain information. The information can be deleted. When it is deleted I remove that item from the tree. The problem is when the last li is removed from the ul, I need to remove the ul and also remove the "open" and "close" classes...

HTML Encoding Charset Problem I think?

Hi People. I've been asked to add a testimonial to this page... http://www.orchardkitchens.com/Showroom/testimonials.html As you will see there are funny characters showing up all over the place, and it has thrown the structure of the page out. I've since reloaded the backup and the funny chars are still appearing. Any ideas what I...

Table column width as narrow as contained data?

I have three columns. The last two I want to make as narrow as the their contained data and the first column can take the rest of the width (table has 100% width). How can you do this using css? Right now the columns on the right look silly with extra space. Ideas? ...