html

Is there a way to discern an iPhone 3G/S visitor to an iPhone 4 visitor?

I want to load higher resolution pictures for iPhone 4 users, but the only way I know of detecting users is by a user-agent. But I'm under the impression that the user-agent of MobileSafari on any iOS4 phone is the same across the board. What could I do to detect an iPhone 4? ...

Extending MaRuKu to generate raw html tags, md_html escapes html

I'm working in the Insitiki code and trying to extend the maruku syntax to generate some custom html tags. Example: |youtube 0FWPr6u8YF | Should print the html code as follows: <object data='http://www.youtube.com/v/01hcB2zmMqM' style='width:425px; height:350px;' type='application/x-shockwave-flash'><param name='movie' value='http:/...

Why use HTML markup in languages like ruby, php, asp.net mvc instead of XLST to convert XML to HTML?

I just learned about XLST on stackoverflow today (I love how in computers you can program for years and constantly have 'darn, how did I not know about that technology' moments). I'm wondering how popular XLST it is for web development? I've worked on a few websites (using php, ruby, and asp.net mvc) but I'm not a web developer by any me...

hpricot add attribute to a HTML tag?

Can someone please explain how to add a custom attribute to an HTML tag using Ruby with Hpricot gem? I have a tag that looks like this: <div class="test" id="tag1" style=""> and I want to add a custom integer attribute called 'Readable=0' so it looks like this: <div class="test" id="tag1" style="" readable=0> Is this possible? ...

jQuery in Wordpress

Hello. I am using WP3 and am using some simple JQ to style some elements. However, I cannot get it to work. I am aware of but beyond that I don't know where to put my own code exactly, in which file or place. The code is: <script> $(document).ready(function(){ $("#image" + photoNum).animate({ opacity: 0, scale: 3 }, 0); </script> ...

Repeat function every id named "" with jquery

Ok i have this function what it does is takes the value of id time, user, title, and bodytext. Function to insert into sql. function getblogpost() { var date = $('#time').text(); var user = $('#user').text(); var title = $('#title').text(); var textbody = $('#bodytext').text(); var postid = $('#pid').text(); db...

Getting the dimensions for some <object> HTML code using PHP

I have people inserting video code to be displayed on my website. I want to make sure those videos dimensions don't go over 590 pixels in width. So for example it they insert a video that's 640 x 385 my script would figure out some new dimensions so that it is only 590 pixels in width (e.g: 590 x 366)... I've got all the maths and rati...

Ghost code?Regarding missing tag in html file.

Hi, I'm having a problem regarding html.I got a html script contains no </body> nor </html> closing tags in the file yet when its source code view in the browser,both the </body> and </html> closing tags appears in the source code together with a <div>...</div> block of code. How could this possible to happen? ...

Craigslist, CURL, Simple PHP DOM Issues

I am logging into Craigslist with CURL to scrape the status of my posted listings. The problem I encounter is the transfer of HTML from CURL $output to file_get_html. While Craigslist statuses are actually nested inside TR elements, I just wanted to test the most basic functions to see if things were getting passed through (i.e. link s...

Setting java string variables value depending on html checkbox selected

Hi I have two check boxes with table names when any check box is checked i wants to save that table name in to a java string which i can use in the query to get data from that table or update that table. I have used onClick functions and also got the check box value but not getting how to access it in the rest of the code so that i can ...

HTML table to excel - PHP

I am creating a report in Table format. This report is displayed on the browser. I want to provide a download report in excel format link so that the report can be available in excel file also. How can I do this ...

whats wrong with my flash embed code?

Flash aint my thing. What am I missing? I'm getting these boxes in Internet Explorer. <object width="100" height="65" > <param name="wmode" value="<?php echo $entry_user_fish;?>"> <embed src="<?php echo $entry_user_fish;?>" width="100" height="65" wmode="transparent" > </embed> </object> Edit: A little more Info: The php values t...

jQuery .keyPress() - How to get value of input which triggered event?

Hi Guys, Trying to do some jQuery validation (without the plugin - please no answers like "Just use the validate-js plugin"). I'm wiring up a client-side event handler keypress for each "required field" on doc ready: $(document).ready(function() { $('#myform input.required').each(function() { $(this).keypress(onRequiredFieldKeyP...

How to get the value of a disabled radio button input field

I have a radio button something like this, <input type="radio" value="A" name="NodeLevel" /> When not disabled I could get the value of a pretty easily using, $("input[name=NodeLevel]").click(function () {}, but when the input type is disabled, how can I get the value of a radio button ? any work arounds ? ...

Stop text selection from going outside a div?

I am pretty sure i seen sites that make firefox (and other browsers?) select text only within a div and not span across other divs. How do i do that ...

Exporting R tables to HTML

Is there a way to easily export R tables to a simple HTML page? ...

height=100% do not work

the code below are all height=100%, it works fine in chrome but it displayes very strange in firefox and ie7!it is not exactly the 100% height.anyone knows? thanks a million. <iframe src ="demoFramesetLeftFrame.jsp" name="treeframe" id="treeframe" width=200px height=100% frameborder=0> </iframe> <iframe src="middle.html" name=...

Is it posible to access a javascript which resides in a script file from a iframe.

Hi All, i want to access a javascript function which resides in a script file from another page with iframe. my sample code : Page from which javascript need to be accessed. <iframe id="FRAMESET" src="default.htm" width="0%" height="0%"> <p> Your browser does not support iframes. </p> </iframe> def...

Save highlighted text position in HTML using javascript

I'm able to select the text using window.getSelection() How can I get the character position of the start and end of the selection in the HTML code? So this information can be saved to the server. ...

How to disable the onclick event once it happens?

I had a image which calls add_cart() javascript function when onclick() <img src="images/add.png" onclick="add_cart()"> I want the user to click the image only one time. When the user clicks it first time, add_cart function should be called. If he clicks second time NO EVENT SHOULD HAPPEN Plz help, any help will be appreciated ...