html

css of pagination links

i'd like a basic idea of how to go about formatting the following paging of the search result. this is the paging code: //Create and print the Navigation bar $nav=""; $next = $page+1; $prev = $page-1; if($page > 1) { $nav .= "<div class=\"search_mainpg\"><div class=\"searchpage\" style=\"width...

How to change syles of a webpage inside iframe from parent

I would like to load a webpage on an iframe and then change some styles from the parent page through javascript. The webpage to load on an iframe isn't on my domain. I mean, it can be some random page on the web. Is this possible? If so, how? ...

Strip Javascript on(whatever) events from Code using PHP

Hi, I want to strip out all JavaScript from a small snippet (4-6 lines) of HTML, i've read on here before that its best not to use REGEX on HTML, so if anybody knows a better way, please advise. So for example i have the following code: <a href="go/to/my/link" onclick="fetchMeSomeData(this)">My Link</a> <p onfocus="doSomethingAmazing...

Coping with weak typing

I'm a front end Flex developer peeking over the wall at html. One of the things I have a hard time with is weak typing in Javascript. I know many developers say they prefer it. How do I stop worrying and learn to love the weak typing? Are there best practices for variable naming that help make var types human readable? Another thing I h...

How to clear textarea on click?

Given a <textarea> with a default value as follows: <textarea>Please describe why</textarea> How do you clear the default value when the user clicks to edit the field? ...

email validation javascript

is this javascript function (checkValidity) correct? function checkTextBox(textBox) { if (!checkValidity(textBox.getValue())) displayError("Error title", "Error message", textBox); textBox.focus(); } function checkValidity(e) { var email; email = "/^[^@]+@[^@]+.[a-z]{2,}$/i"; if (!e.match(email)){ ...

Browser compatibility; Before or after uploading website to server?

I am on the stage where I need to make my website cross-browser compatible. I need tips on how to get started. I have developed my website on firefox, so it works great with firefox. I guess I have to download a couple of versions of all major browsers now, right? Then just test each browser one by one? Should I do this before uploadi...

Description Class for Navigation Links not working

My problem is with my navigation links. I've created a class for the links so that the link color is different from the typical links throughout. The problem is that the color defined in a:visited is taking precedence over the color defined in a:link. I've tried everything and can't work this out. Any suggestions? ...

How to prevent Firefox from putting shadows around input boxes which have had their background colour changed?

Hi there, I'm creating a set of input fields and using javascript's .style.backgroundColor = "red" to change the colour of any invalid fields. In Chrome, there is no problem. However, in Firefox, as soon as I touch the backgroundColor (even if I set it to white) then I get these strange shadow effects. Does anyone know what's going o...

Google Chrome Extension

Is there a way to replace inside the DOM of a page using the replace() in javascript In the source code I want to replace: <div class="topbar">Bookmark Us</div> to <div class="topbar"><span class="larger-font">Bookmark Us</span></div> When a Google Chrome extenstion is on the matched website of a URL and it will do the above. Any...

Writing all the html of a document with jquery instead of in the page body?

I'm a UI person currently working on a web application, where most of the people I work with are back end developers. I'm currently at a disagreement with them about whether or not the above is a prudent thing to do. This application doe use quite a bit of JavaScript, and wouldn't even work without it unfortunately. This being the cas...

How is xmlhttp.responseText assigned before xmlhttp.send()

Newbie ajax question from this example: How is xmlhttp.responseText assigned before xmlhttp.open() and xmlhttp.send() ? (If we need the data from demo_post.asp) I understand it is in the onreadystatechange but if the javascript is read from top down I do not understand. Thanks, and go easy on me! ...

How to show, not download, images in apache?

I'm dynamically generating some charts using mod_python, in .png and .pdf formats. When a user points to /some/path/some_imagefile_name.png, I want to show the image within the browser, like in this url. I also want the image to be accessible from an HTML <img src=> tag. So far, whenever I point my browser to a .png address from my serv...

Tool for screen drawing (html components)

I am using google docs to draw draft screens for specs. I wonder if there is a tool to simulate draft screens. For example I couldn't put a combobox on google docs easily. Thanks. ...

Is this correct about ajax POST?

Could you confirm I understand this correctly. However, always use POST requests when: - A cached file is not an option (update a file or database on the server) Using POST, the file specified in xmlhttp.open("POST","ajax_test.asp",true); will not be cached (sent to \Temporary Internet Files) ? It will stay on the server...

How can I use AJAX to bring bring pdfs into a div?

Okay, in my first jump into AJAX-like behavior... I'm wanting to load a div with a pdf based on a user click on a link. If the user clicks on a second link, the div should be overwritten with the new pdf. So I figured on testing it with something like: <script> function showPdf() { var pdfDiv = document.getElementById...

Search field using Ultraseek

So i realized today that using IE to do a search on my site, for instance the term "documents" returns the search results. if i use FireFox or Chrome the data in the input field is not recognized... now i looked at the code, and realized that there are no tags around the input fields... BUT if i put them, then IE does not work... wha...

CSS Page Layout w/ Breaks

I'm trying to make a webpage where it basically looks like a word document. There would be multiple boxes that would scroll down and the text would flow and page break from one page to the next. Does anyone have any idea where I would even start? Thanks. Edit: It should be right in the browser, looking similar to this: (Ignore the c...

Android Web App : Position:fixed broken?

Hi all, I'm in the process of developping a Web Application for mobiles. I went with web applications because to me it seems a winning situation having to develop one application that could run also on iPhone / Windows Mobile / Palm etc. I started testing today after a few days of doing concepts, ideas and designs and what I wanted to ...

How do you submit a form with javascript with a <input type="button">

How would you use a div to submit a form, for example? Javascript please ...